-----------------------------------------------------------------------------
[R2]dis ip ro
Routing Tables: Public
Destinations : 15 Routes : 15
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 3.3.3.1 S0/6/0
1.1.1.1/32 BGP 255 1562 3.3.3.1 S0/6/0
2.2.2.0/30 BGP 255 0 3.3.3.1 S0/6/0
2.2.2.2/32 BGP 255 0 3.3.3.1 S0/6/0
3.3.3.0/30 Direct 0 0 3.3.3.2 S0/6/0
3.3.3.1/32 Direct 0 0 3.3.3.1 S0/6/0
3.3.3.2/32 Direct 0 0 127.0.0.1 InLoop0
4.4.4.0/30 Direct 0 0 4.4.4.1 S0/6/1
4.4.4.1/32 Direct 0 0 127.0.0.1 InLoop0
4.4.4.2/32 Direct 0 0 4.4.4.2 S0/6/1
5.5.5.1/32 OSPF 10 1562 4.4.4.2 S0/6/1
10.1.1.2/32 BGP 255 0 3.3.3.1 S0/6/0
10.1.1.3/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
[R2]dis ospf ro
OSPF Process 1 with Router ID 10.1.1.3
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
5.5.5.1/32 1562 Stub 4.4.4.2 10.1.1.4 0.0.0.0
4.4.4.0/30 1562 Stub 4.4.4.1 10.1.1.3 0.0.0.0
Total Nets: 2
Intra Area: 2 Inter Area: 0 ASE: 0 NSSA: 0
[R2]dis ospf lsdb
OSPF Process 1 with Router ID 10.1.1.3
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.1.1.4 10.1.1.4 860 60 80000004 0
Router 10.1.1.3 10.1.1.3 56 48 80000006 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 0.0.0.0 10.1.1.3 60 36 80000001 1
[R2]
[R4]dis ip ro
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 O_ASE 150 1 4.4.4.1 S0/6/1
4.4.4.0/30 Direct 0 0 4.4.4.2 S0/6/1
4.4.4.1/32 Direct 0 0 4.4.4.1 S0/6/1
4.4.4.2/32 Direct 0 0 127.0.0.1 InLoop0
5.5.5.1/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.4/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
[R4]
[R4]
[R4]dis ospf ro
OSPF Process 1 with Router ID 10.1.1.4
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
5.5.5.1/32 0 Stub 5.5.5.1 10.1.1.4 0.0.0.0
4.4.4.0/30 1562 Stub 4.4.4.2 10.1.1.4 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
0.0.0.0/0 1 Type2 1 4.4.4.1 10.1.1.3
Total Nets: 3
Intra Area: 2 Inter Area: 0 ASE: 1 NSSA: 0
[R4]
[R4]
[R4]dis ospf lsdb
OSPF Process 1 with Router ID 10.1.1.4
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.1.1.4 10.1.1.4 907 60 80000004 0
Router 10.1.1.3 10.1.1.3 105 48 80000006 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 0.0.0.0 10.1.1.3 109 36 80000001 1
------------------------------------------------------------------------------
附加实验:
在R2上配置如下:ospf 1 router-id 10.1.1.3
default-route-advertise always
area 0.0.0.0
network 4.4.4.0 0.0.0.3
没有配置表态路由
[R2]dis ip ro
Routing Tables: Public
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost NextHop Interface
1.1.1.1/32 BGP 255 1562 3.3.3.1 S0/6/0
2.2.2.0/30 BGP 255 0 3.3.3.1 S0/6/0
2.2.2.2/32 BGP 255 0 3.3.3.1 S0/6/0
3.3.3.0/30 Direct 0 0 3.3.3.2 S0/6/0
3.3.3.1/32 Direct 0 0 3.3.3.1 S0/6/0
3.3.3.2/32 Direct 0 0 127.0.0.1 InLoop0
4.4.4.0/30 Direct 0 0 4.4.4.1 S0/6/1
4.4.4.1/32 Direct 0 0 127.0.0.1 InLoop0
4.4.4.2/32 Direct 0 0 4.4.4.2 S0/6/1
5.5.5.1/32 OSPF 10 1562 4.4.4.2 S0/6/1
10.1.1.2/32 BGP 255 0 3.3.3.1 S0/6/0
10.1.1.3/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
[R2]dis ospf ro
OSPF Process 1 with Router ID 10.1.1.3
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
5.5.5.1/32 1562 Stub 4.4.4.2 10.1.1.4 0.0.0.0
4.4.4.0/30 1562 Stub 4.4.4.1 10.1.1.3 0.0.0.0
Total Nets: 2
Intra Area: 2 Inter Area: 0 ASE: 0 NSSA: 0
[R2]dis ospf lsdb
OSPF Process 1 with Router ID 10.1.1.3
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.1.1.4 10.1.1.4 679 60 80000004 0
Router 10.1.1.3 10.1.1.3 1564 48 80000004 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 0.0.0.0 10.1.1.3 1231 36 80000001 1
[R2]
<R4>
<R4>dis ip ro
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 O_ASE 150 1 4.4.4.1 S0/6/1
4.4.4.0/30 Direct 0 0 4.4.4.2 S0/6/1
4.4.4.1/32 Direct 0 0 4.4.4.1 S0/6/1
4.4.4.2/32 Direct 0 0 127.0.0.1 InLoop0
5.5.5.1/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.4/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
<R4>dis ospf ro
OSPF Process 1 with Router ID 10.1.1.4
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
5.5.5.1/32 0 Stub 5.5.5.1 10.1.1.4 0.0.0.0
4.4.4.0/30 1562 Stub 4.4.4.2 10.1.1.4 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
0.0.0.0/0 1 Type2 1 4.4.4.1 10.1.1.3
Total Nets: 3
Intra Area: 2 Inter Area: 0 ASE: 1 NSSA: 0
<R4>dis ospf lsdb
OSPF Process 1 with Router ID 10.1.1.4
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 10.1.1.4 10.1.1.4 721 60 80000004 0
Router 10.1.1.3 10.1.1.3 1608 48 80000004 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 0.0.0.0 10.1.1.3 1275 36 80000001 1
<R4>