H3C OSPF Stub特殊区域+认证实验
实验拓扑
实验需求
- 按照图示配置 IP 地址,所有路由器配置环回口 IP 地址为
X.X.X.X/32
作为 Router-id,X 为设备编号(R5 除外) - 按照图示分区域配置 OSPF
- R1 上配置默认路由,指向 R5,通往外部网络
- Area 1 为了减小路由表规模,配置为 Stub 区域
- R4 上配置环回口模拟业务网段;要求所有业务网段的路由聚合为一条后发布到 Area 0
- R2 上不允许存在
192.168.2.0/24
网段和192.168.3.0/24
网段的路由 - 为了保证协议安全,Area 0 配置区域验证,验证密钥
123456
实验步骤
设备IP地址配置
R1
[R1]display ip interface brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP address/Mask VPN instance Description
GE0/0 up up 10.1.1.1/24 -- --
GE0/1 up up 10.2.2.1/24 -- --
GE0/2 up up 100.0.0.1/24 -- --
GE5/0 down down -- -- --
GE5/1 down down -- -- --
GE6/0 down down -- -- --
GE6/1 down down -- -- --
Loop0 up up(s) 1.1.1.1/32 -- --
Ser1/0 down down -- -- --
Ser2/0 down down -- -- --
Ser3/0 down down -- -- --
Ser4/0 down down -- -- --
R2
[R2]display ip interface brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP address/Mask VPN instance Description
GE0/0 up up 10.1.1.2/24 -- --
GE0/1 up up 10.4.4.2/24 -- --
GE0/2 up up 10.3.3.2/24 -- --
GE5/0 down down -- -- --
GE5/1 down down -- -- --
GE6/0 down down -- -- --
GE6/1 down down -- -- --
Loop0 up up(s) 2.2.2.2/32 -- --
Ser1/0 down down -- -- --
Ser2/0 down down -- -- --
Ser3/0 down down -- -- --
Ser4/0 down down -- -- --
R3
[R3]display ip interface brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP address/Mask VPN instance Description
GE0/0 up up 10.5.5.3/24 -- --
GE0/1 up up 10.2.2.3/24 -- --
GE0/2 up up 10.3.3.3/24 -- --
GE5/0 down down -- -- --
GE5/1 down down -- -- --
GE6/0 down down -- -- --
GE6/1 down down -- -- --
Loop0 up up(s) 3.3.3.3/24 -- --
Ser1/0 down down -- -- --
Ser2/0 down down -- -- --
Ser3/0 down down -- -- --
Ser4/0 down down -- -- --
R4
[R4]display ip interface brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP address/Mask VPN instance Description
GE0/0 up up 10.5.5.4/24 -- --
GE0/1 up up 10.4.4.4/24 -- --
GE0/2 down down -- -- --
GE5/0 down down -- -- --
GE5/1 down down -- -- --
GE6/0 down down -- -- --
GE6/1 down down -- -- --
Loop0 up up(s) 4.4.4.4/32 -- --
Loop1 up up(s) 192.168.0.1/24 -- --
Loop2 up up(s) 192.168.1.1/24 -- --
Loop3 up up(s) 192.168.2.1/24 -- --
Loop4 up up(s) 192.168.3.1/24 -- --
Ser1/0 down down -- -- --
Ser2/0 down down -- -- --
Ser3/0 down down -- -- --
Ser4/0 down down -- -- --
R5
[R5]display ip interface brief
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP address/Mask VPN instance Description
GE0/0 up up 100.0.0.5/24 -- --
GE0/1 down down -- -- --
GE0/2 down down -- -- --
GE5/0 down down -- -- --
GE5/1 down down -- -- --
GE6/0 down down -- -- --
GE6/1 down down -- -- --
Ser1/0 down down -- -- --
Ser2/0 down down -- -- --
Ser3/0 down down -- -- --
Ser4/0 down down -- -- --
配置基本OSPF,打通去往外部的网络
基本OSPF配置
R1
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.1 0.0.0.0
network 10.2.2.1 0.0.0.0
R2
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.2 0.0.0.0
network 10.3.3.2 0.0.0.0
area 0.0.0.1
network 10.4.4.2 0.0.0.0
R3
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.2.2.3 0.0.0.0
network 10.3.3.3 0.0.0.0
area 0.0.0.1
network 10.5.5.3 0.0.0.0
R4
#
ospf 1 router-id 4.4.4.4
area 0.0.0.1
network 4.4.4.4 0.0.0.0
network 10.4.4.4 0.0.0.0
network 10.5.5.4 0.0.0.0
network 192.168.0.0 0.0.0.255
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
出口配置NAT
依据实际环境模拟,内网不会有互联网的明细路由,所以在出口处做NAT
R1
#
acl basic 2000
rule 0 permit source 192.168.0.0 0.0.0.255
rule 5 permit source 192.168.1.0 0.0.0.255
rule 10 permit source 192.168.2.0 0.0.0.255
rule 15 permit source 192.168.3.0 0.0.0.255
#
interface GigabitEthernet0/2
nat outbound 2000
缺省路由引入
R1
#
ip route-static 0.0.0.0 0 100.0.0.5
#
ospf 1 router-id 1.1.1.1
default-route-advertise
所有业务网段的路由聚合为一条后发布到 Area 0
OSPF路由汇聚只能在ABR或ASBR上配置
R2
#
ospf 1 router-id 2.2.2.2
area 0.0.0.1
abr-summary 192.168.0.0 255.255.252.0
R3
#
ospf 1 router-id 3.3.3.3
area 0.0.0.1
abr-summary 192.168.0.0 255.255.252.0
OSPF Area0 区域认证配置
[R1-ospf-1-area-0.0.0.0]authentication-mode simple plain 123456
[R2-ospf-1-area-0.0.0.0]authentication-mode simple plain 123456
[R3-ospf-1-area-0.0.0.0]authentication-mode simple plain 123456
R2配置路由过滤,不允许存在 192.168.2.0/24
网段和 192.168.3.0/24
网段的路由
#
acl basic 2000
rule 0 deny source 192.168.2.0 0.0.0.255
rule 5 deny source 192.168.3.0 0.0.0.255
rule 10 permit //ACL默认行为为拒绝所有,所以在此处需放行拒绝以外的
#
ospf 1 router-id 2.2.2.2
filter-policy 2000 import //引入ACL到入方向,只影响R2
减小路由表规模配置Area1为Stub区域
方法一:Stub区域配置
[R2-ospf-1-area-0.0.0.1]stub
[R3-ospf-1-area-0.0.0.1]stub
[R4-ospf-1-area-0.0.0.1]stub
方法二:Totally Stub区域配置(扩展配置,非需求)
配置说明:Totally Stub区域只需在ABR路由器上配置,普通路由器开启stub即可
[R2-ospf-1-area-0.0.0.1]stub no-summary
[R3-ospf-1-area-0.0.0.1]stub no-summary
[R4-ospf-1-area-0.0.0.1]stub
实验验证
检验Area0配置区域认证后是否能建立OSPF邻居
分别在R1、R2、R3上重置OSPF进程,Area0依然可以建立邻居,区域认证配置正确
<R1>reset ospf process
Reset OSPF process? [Y/N]:y
<R2>reset ospf process
Reset OSPF process? [Y/N]:y
<R3>reset ospf process
Reset OSPF process? [Y/N]:y
[R1]display ospf peer
OSPF Process 1 with Router ID 1.1.1.1
Neighbor Brief Information
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
2.2.2.2 10.1.1.2 1 31 Full/BDR GE0/0
3.3.3.3 10.2.2.3 1 39 Full/BDR GE0/1
[R2]display ospf peer
OSPF Process 1 with Router ID 2.2.2.2
Neighbor Brief Information
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
1.1.1.1 10.1.1.1 1 37 Full/DR GE0/0
3.3.3.3 10.3.3.3 1 33 Full/BDR GE0/2
[R3]display ospf peer
OSPF Process 1 with Router ID 3.3.3.3
Neighbor Brief Information
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
1.1.1.1 10.2.2.1 1 33 Full/DR GE0/1
2.2.2.2 10.3.3.2 1 39 Full/DR GE0/2
R2路由过滤是否配置成功
R2上配置路由过滤后,不允许存在 192.168.2.0/24
网段和 192.168.3.0/24
网段的路由
[R2]display ip routing-table
Destinations : 26 Routes : 27
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 O_ASE2 150 1 10.1.1.1 GE0/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 O_INTRA 10 1 10.1.1.1 GE0/0
2.2.2.2/32 Direct 0 0 127.0.0.1 InLoop0
3.3.3.3/32 O_INTRA 10 1 10.3.3.3 GE0/2
4.4.4.4/32 O_INTRA 10 1 10.4.4.4 GE0/1
10.1.1.0/24 Direct 0 0 10.1.1.2 GE0/0
10.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.255/32 Direct 0 0 10.1.1.2 GE0/0
10.2.2.0/24 O_INTRA 10 2 10.1.1.1 GE0/0
O_INTRA 10 2 10.3.3.3 GE0/2
10.3.3.0/24 Direct 0 0 10.3.3.2 GE0/2
10.3.3.2/32 Direct 0 0 127.0.0.1 InLoop0
10.3.3.255/32 Direct 0 0 10.3.3.2 GE0/2
10.4.4.0/24 Direct 0 0 10.4.4.2 GE0/1
10.4.4.2/32 Direct 0 0 127.0.0.1 InLoop0
10.4.4.255/32 Direct 0 0 10.4.4.2 GE0/1
10.5.5.0/24 O_INTRA 10 2 10.4.4.4 GE0/1
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
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/22 O_SUM 255 0 0.0.0.0 NULL0
192.168.0.1/32 O_INTRA 10 1 10.4.4.4 GE0/1
192.168.1.1/32 O_INTRA 10 1 10.4.4.4 GE0/1
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
ABR上的路由聚合是否聚合成功
在R1上查看路由表,业务网段成功聚合为192.168.0.0/22
,由ABR发布给了R1
[R1]display ip routing-table
Destinations : 25 Routes : 28
Destination/Mask Proto Pre Cost NextHop Interface
192.168.0.0/22 O_INTER 10 2 10.1.1.2 GE0/0
O_INTER 10 2 10.2.2.3 GE0/1
Area1配置为Stub区域是否减小路由表规模
在R4上查看,发现配置为stub区域后,路由表中的默认路由,由0_ASE2(OSPF第二类外部路由)变为O_INTER(OSPF区域间路由),且查看R4上的LSDB,配置stub区域后无Type5路由,只存在Type1、2、3类型的路由。
原路由表和LSDB
[R4]display ip routing-table
Destinations : 33 Routes : 36
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 O_ASE2 150 1 10.4.4.2 GE0/1
O_ASE2 150 1 10.5.5.3 GE0/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 O_INTER 10 2 10.4.4.2 GE0/1
O_INTER 10 2 10.5.5.3 GE0/0
2.2.2.2/32 O_INTER 10 1 10.4.4.2 GE0/1
3.3.3.3/32 O_INTER 10 1 10.5.5.3 GE0/0
4.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.0/24 O_INTER 10 2 10.4.4.2 GE0/1
10.2.2.0/24 O_INTER 10 2 10.5.5.3 GE0/0
10.3.3.0/24 O_INTER 10 2 10.4.4.2 GE0/1
O_INTER 10 2 10.5.5.3 GE0/0
10.4.4.0/24 Direct 0 0 10.4.4.4 GE0/1
10.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0
10.4.4.255/32 Direct 0 0 10.4.4.4 GE0/1
10.5.5.0/24 Direct 0 0 10.5.5.4 GE0/0
10.5.5.4/32 Direct 0 0 127.0.0.1 InLoop0
10.5.5.255/32 Direct 0 0 10.5.5.4 GE0/0
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
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/24 Direct 0 0 192.168.0.1 Loop1
192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.255/32 Direct 0 0 192.168.0.1 Loop1
192.168.1.0/24 Direct 0 0 192.168.1.1 Loop2
192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.255/32 Direct 0 0 192.168.1.1 Loop2
192.168.2.0/24 Direct 0 0 192.168.2.1 Loop3
192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.2.255/32 Direct 0 0 192.168.2.1 Loop3
192.168.3.0/24 Direct 0 0 192.168.3.1 Loop4
192.168.3.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.3.255/32 Direct 0 0 192.168.3.1 Loop4
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[R4]display ospf lsdb
OSPF Process 1 with Router ID 4.4.4.4
Link State Database
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 3.3.3.3 3.3.3.3 57 36 80000004 0
Router 4.4.4.4 4.4.4.4 56 108 80000004 0
Router 2.2.2.2 2.2.2.2 57 36 80000004 0
Network 10.4.4.4 4.4.4.4 48 32 80000002 0
Network 10.5.5.4 4.4.4.4 51 32 80000002 0
Sum-Net 3.3.3.3 2.2.2.2 110 28 80000001 1
Sum-Net 3.3.3.3 3.3.3.3 105 28 80000001 0
Sum-Net 2.2.2.2 2.2.2.2 110 28 80000001 0
Sum-Net 2.2.2.2 3.3.3.3 105 28 80000001 1
Sum-Net 10.1.1.0 2.2.2.2 110 28 80000001 1
Sum-Net 10.1.1.0 3.3.3.3 105 28 80000001 2
Sum-Net 1.1.1.1 2.2.2.2 110 28 80000001 1
Sum-Net 1.1.1.1 3.3.3.3 105 28 80000001 1
Sum-Net 10.2.2.0 2.2.2.2 110 28 80000001 2
Sum-Net 10.2.2.0 3.3.3.3 105 28 80000001 1
Sum-Net 10.3.3.0 2.2.2.2 110 28 80000001 1
Sum-Net 10.3.3.0 3.3.3.3 105 28 80000001 1
Sum-Asbr 1.1.1.1 2.2.2.2 110 28 80000001 1
Sum-Asbr 1.1.1.1 3.3.3.3 105 28 80000001 1
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 0.0.0.0 1.1.1.1 223 36 80000003 1
配置Stub区域后的路由表和LSDB
[R4]display ip routing-table
Destinations : 33 Routes : 36
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 O_INTER 10 2 10.4.4.2 GE0/1
O_INTER 10 2 10.5.5.3 GE0/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 O_INTER 10 2 10.4.4.2 GE0/1
O_INTER 10 2 10.5.5.3 GE0/0
2.2.2.2/32 O_INTER 10 1 10.4.4.2 GE0/1
3.3.3.3/32 O_INTER 10 1 10.5.5.3 GE0/0
4.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.0/24 O_INTER 10 2 10.4.4.2 GE0/1
10.2.2.0/24 O_INTER 10 2 10.5.5.3 GE0/0
10.3.3.0/24 O_INTER 10 2 10.4.4.2 GE0/1
O_INTER 10 2 10.5.5.3 GE0/0
10.4.4.0/24 Direct 0 0 10.4.4.4 GE0/1
10.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0
10.4.4.255/32 Direct 0 0 10.4.4.4 GE0/1
10.5.5.0/24 Direct 0 0 10.5.5.4 GE0/0
10.5.5.4/32 Direct 0 0 127.0.0.1 InLoop0
10.5.5.255/32 Direct 0 0 10.5.5.4 GE0/0
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
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/24 Direct 0 0 192.168.0.1 Loop1
192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.255/32 Direct 0 0 192.168.0.1 Loop1
192.168.1.0/24 Direct 0 0 192.168.1.1 Loop2
192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.255/32 Direct 0 0 192.168.1.1 Loop2
192.168.2.0/24 Direct 0 0 192.168.2.1 Loop3
192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.2.255/32 Direct 0 0 192.168.2.1 Loop3
192.168.3.0/24 Direct 0 0 192.168.3.1 Loop4
192.168.3.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.3.255/32 Direct 0 0 192.168.3.1 Loop4
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[R4]display ospf lsdb
OSPF Process 1 with Router ID 4.4.4.4
Link State Database
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 3.3.3.3 3.3.3.3 30 36 80000004 0
Router 4.4.4.4 4.4.4.4 29 108 80000004 0
Router 2.2.2.2 2.2.2.2 30 36 80000004 0
Network 10.4.4.4 4.4.4.4 22 32 80000002 0
Network 10.5.5.4 4.4.4.4 23 32 80000002 0
Sum-Net 0.0.0.0 2.2.2.2 85 28 80000001 1
Sum-Net 0.0.0.0 3.3.3.3 78 28 80000001 1
Sum-Net 3.3.3.3 2.2.2.2 85 28 80000001 1
Sum-Net 3.3.3.3 3.3.3.3 77 28 80000001 0
Sum-Net 2.2.2.2 2.2.2.2 85 28 80000001 0
Sum-Net 2.2.2.2 3.3.3.3 77 28 80000001 1
Sum-Net 10.1.1.0 2.2.2.2 85 28 80000001 1
Sum-Net 10.1.1.0 3.3.3.3 77 28 80000001 2
Sum-Net 1.1.1.1 2.2.2.2 85 28 80000001 1
Sum-Net 1.1.1.1 3.3.3.3 77 28 80000001 1
Sum-Net 10.2.2.0 2.2.2.2 85 28 80000001 2
Sum-Net 10.2.2.0 3.3.3.3 77 28 80000001 1
Sum-Net 10.3.3.0 2.2.2.2 85 28 80000001 1
Sum-Net 10.3.3.0 3.3.3.3 77 28 80000001 1
扩展:若Area1配置为Totally Stub区域是否再次减小路由表规模
原配置的stub区域,只是将由ASBR发布过来的Type5类路由通过ABR转成Type3类路由传递给R4,但依然存在着其余网段的路由,并不算非常精简的路由表,将之配置成Totally Stub区域后,发现原传递过来的Type3类路由,仅剩余1条缺省路由,这样极大减小了R4的路由表规模。
原配置Stub区域后的路由表和LSDB
[R4]display ip routing-table
Destinations : 33 Routes : 36
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 O_INTER 10 2 10.4.4.2 GE0/1
O_INTER 10 2 10.5.5.3 GE0/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 O_INTER 10 2 10.4.4.2 GE0/1
O_INTER 10 2 10.5.5.3 GE0/0
2.2.2.2/32 O_INTER 10 1 10.4.4.2 GE0/1
3.3.3.3/32 O_INTER 10 1 10.5.5.3 GE0/0
4.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.0/24 O_INTER 10 2 10.4.4.2 GE0/1
10.2.2.0/24 O_INTER 10 2 10.5.5.3 GE0/0
10.3.3.0/24 O_INTER 10 2 10.4.4.2 GE0/1
O_INTER 10 2 10.5.5.3 GE0/0
10.4.4.0/24 Direct 0 0 10.4.4.4 GE0/1
10.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0
10.4.4.255/32 Direct 0 0 10.4.4.4 GE0/1
10.5.5.0/24 Direct 0 0 10.5.5.4 GE0/0
10.5.5.4/32 Direct 0 0 127.0.0.1 InLoop0
10.5.5.255/32 Direct 0 0 10.5.5.4 GE0/0
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
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/24 Direct 0 0 192.168.0.1 Loop1
192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.255/32 Direct 0 0 192.168.0.1 Loop1
192.168.1.0/24 Direct 0 0 192.168.1.1 Loop2
192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.255/32 Direct 0 0 192.168.1.1 Loop2
192.168.2.0/24 Direct 0 0 192.168.2.1 Loop3
192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.2.255/32 Direct 0 0 192.168.2.1 Loop3
192.168.3.0/24 Direct 0 0 192.168.3.1 Loop4
192.168.3.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.3.255/32 Direct 0 0 192.168.3.1 Loop4
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[R4]display ospf lsdb
OSPF Process 1 with Router ID 4.4.4.4
Link State Database
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 3.3.3.3 3.3.3.3 30 36 80000004 0
Router 4.4.4.4 4.4.4.4 29 108 80000004 0
Router 2.2.2.2 2.2.2.2 30 36 80000004 0
Network 10.4.4.4 4.4.4.4 22 32 80000002 0
Network 10.5.5.4 4.4.4.4 23 32 80000002 0
Sum-Net 0.0.0.0 2.2.2.2 85 28 80000001 1
Sum-Net 0.0.0.0 3.3.3.3 78 28 80000001 1
Sum-Net 3.3.3.3 2.2.2.2 85 28 80000001 1
Sum-Net 3.3.3.3 3.3.3.3 77 28 80000001 0
Sum-Net 2.2.2.2 2.2.2.2 85 28 80000001 0
Sum-Net 2.2.2.2 3.3.3.3 77 28 80000001 1
Sum-Net 10.1.1.0 2.2.2.2 85 28 80000001 1
Sum-Net 10.1.1.0 3.3.3.3 77 28 80000001 2
Sum-Net 1.1.1.1 2.2.2.2 85 28 80000001 1
Sum-Net 1.1.1.1 3.3.3.3 77 28 80000001 1
Sum-Net 10.2.2.0 2.2.2.2 85 28 80000001 2
Sum-Net 10.2.2.0 3.3.3.3 77 28 80000001 1
Sum-Net 10.3.3.0 2.2.2.2 85 28 80000001 1
Sum-Net 10.3.3.0 3.3.3.3 77 28 80000001 1
配置Totally Stub区域后的路由表和LSDB
[R4]display ip routing-table
Destinations : 27 Routes : 28
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 O_INTER 10 2 10.4.4.2 GE0/1
O_INTER 10 2 10.5.5.3 GE0/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
4.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0
10.4.4.0/24 Direct 0 0 10.4.4.4 GE0/1
10.4.4.4/32 Direct 0 0 127.0.0.1 InLoop0
10.4.4.255/32 Direct 0 0 10.4.4.4 GE0/1
10.5.5.0/24 Direct 0 0 10.5.5.4 GE0/0
10.5.5.4/32 Direct 0 0 127.0.0.1 InLoop0
10.5.5.255/32 Direct 0 0 10.5.5.4 GE0/0
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
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/24 Direct 0 0 192.168.0.1 Loop1
192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.255/32 Direct 0 0 192.168.0.1 Loop1
192.168.1.0/24 Direct 0 0 192.168.1.1 Loop2
192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.255/32 Direct 0 0 192.168.1.1 Loop2
192.168.2.0/24 Direct 0 0 192.168.2.1 Loop3
192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.2.255/32 Direct 0 0 192.168.2.1 Loop3
192.168.3.0/24 Direct 0 0 192.168.3.1 Loop4
192.168.3.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.3.255/32 Direct 0 0 192.168.3.1 Loop4
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[R4]display ospf lsdb
OSPF Process 1 with Router ID 4.4.4.4
Link State Database
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 3.3.3.3 3.3.3.3 29 36 8000001A 0
Router 4.4.4.4 4.4.4.4 19 108 8000001F 0
Router 2.2.2.2 2.2.2.2 20 36 8000001A 0
Network 10.4.4.2 2.2.2.2 15 32 80000006 0
Network 10.5.5.3 3.3.3.3 16 32 80000006 0
Sum-Net 0.0.0.0 2.2.2.2 289 28 80000002 1
Sum-Net 0.0.0.0 3.3.3.3 278 28 80000001 1
实验附件
OSPF Stub特殊区域+认证实验.zip