1、R4为ISP,其上只配置IP地址;R4与其他所直连设备间均使用公有IP;
2、R3-R5、R6、R7为MGRE环境,R3为中心站点;
3、整个OSPF环境IP基于172.16.0.0/16划分;除了R12有两个环回,其他路由器均有一个环回IP
4、所有设备均可访问R4的环回;
5、减少LSA的更新量,加快收敛,保障更新安全;
6、全网可达;
目录
1、R4为ISP,其上只配置IP地址;R4与其他所直连设备间均使用公有IP;
3、整个OSPF环境IP基于172.16.0.0/16划分;除了R12有两个环回,其他路由器均有一个环回IP
5、减少LSA的更新量,加快收敛,保障更新安全;6、全网可达;
1、R4为ISP,其上只配置IP地址;R4与其他所直连设备间均使用公有IP;
R1
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 172.16.33.1 24
[r1-GigabitEthernet0/0/0]
Apr 14 2024 20:22:12-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]int l0
[r1-LoopBack0]ip add 172.16.35.1 24
[r1-LoopBack0]
R2
[Huawei]sys r2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 172.16.33.2 24
Apr 14 2024 20:25:52-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]
[r2-GigabitEthernet0/0/0]int l0
[r2-LoopBack0]ip add 172.16.35.2 24
[r2-LoopBack0]
r3
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 172.16.33.3 24
Apr 14 2024 20:27:24-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]int s4/0/0
[Huawei-Serial4/0/0]ip add 34.0.0.1 24
[Huawei-Serial4/0/0]q
[Huawei]sys r3
[r3]int l0
[r3-LoopBack0]ip add 172.16.36.3 24
[r3-LoopBack0]
r4
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r4
[r4]int s4/0/0
[r4-Serial4/0/0]ip add 34.0.0.4 24
[r4-Serial4/0/0]
Apr 14 2024 20:31:16-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
IPCP on the interface Serial4/0/0 has entered the UP state.
[r4-Serial4/0/0]int s4/0/1
[r4-Serial4/0/1]ip add 45.0.0.4 24
[r4-Serial4/0/1]int s3/0/0
[r4-Serial3/0/0]ip add 46.0.0.4 24
[r4-Serial3/0/0]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 47.0.0.4 24
[r4-GigabitEthernet0/0/0]
Apr 14 2024 20:32:58-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r4-GigabitEthernet0/0/0]int l0
[r4-LoopBack0]ip add 172.16.2.4 24
[r4-LoopBack0]
r5
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r5
[r5]int s4/0/0
[r5-Serial4/0/0]ip add 45.0.0.5 24
[r5-Serial4/0/0]
Apr 14 2024 20:36:34-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
IPCP on the interface Serial4/0/0 has entered the UP state.
[r5-Serial4/0/0]int l0
[r5-LoopBack0]ip add 172.16.3.5 24
[r5-LoopBack0]
r6
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r6
[r6]int s4/0/0
[r6-Serial4/0/0]ip add 46.0.0.6 24
[r6-Serial4/0/0]
Apr 14 2024 20:38:23-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
IPCP on the interface Serial4/0/0 has entered the UP state.
[r6-Serial4/0/0]int l0
[r6-LoopBack0]ip add 172.168.4.6 24
[r6-LoopBack0]
[r6-GigabitEthernet0/0/0]ip add 172.16.65.1 30
[r6-GigabitEthernet0/0/0]
Apr 14 2024 20:40:28-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r6-GigabitEthernet0/0/0]
r7
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r7
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 47.0.0.7 24
[r7-GigabitEthernet0/0/0]
Apr 14 2024 20:41:56-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r7-GigabitEthernet0/0/0]int g0/0/1
[r7-GigabitEthernet0/0/1]ip aDD 172.16.97.1 30
Apr 14 2024 20:43:01-08:00 r7 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r7-GigabitEthernet0/0/1]int l0
[r7-LoopBack0]ip add 172.16.5.7 24
[r7-LoopBack0]
r8
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r8
[r8]int g0/0/0
[r8-GigabitEthernet0/0/0]ip add 172.16.97.2 30
[r8-GigabitEthernet0/0/0]
Apr 14 2024 20:44:58-08:00 r8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r8-LoopBack0]int g0/0/1
[r8-GigabitEthernet0/0/1]ip add 172.16.97.5 30
[r8-GigabitEthernet0/0/1]
[r8-GigabitEthernet0/0/1]
Apr 14 2024 20:45:50-08:00 r8 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r8-GigabitEthernet0/0/1]int l0
[r8-LoopBack0]ip add 172.16.98.8 24
[r8-LoopBack0]
r9
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r9
[r9]int g0/0/0
[r9-GigabitEthernet0/0/0]ip add 172.16.97.6 30
Apr 14 2024 20:49:00-08:00 r9 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r9-GigabitEthernet0/0/0]int g0/0/1
[r9-GigabitEthernet0/0/1]ip add 172.16.129.1 30
Apr 14 2024 20:50:26-08:00 r9 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r9-GigabitEthernet0/0/1]int l0
[r9-LoopBack0]ip add 172.16.130.9 24
[r9-LoopBack0]
r10
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r10
[r10]int g0/0/0
[r10-GigabitEthernet0/0/0]ip add 172.16.129.2 30
[r10-GigabitEthernet0/0/0]
Apr 14 2024 20:52:37-08:00 r10 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r10-GigabitEthernet0/0/0]int l0
[r10-LoopBack0]ip add 172.16.131.10 24
[r10-LoopBack0]
r11
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r11
[r11]int g0/0/0
[r11-GigabitEthernet0/0/0]ip add 172.16.65.2 30
Apr 14 2024 20:54:06-08:00 r11 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r11-GigabitEthernet0/0/0]int g0/0/1
[r11-GigabitEthernet0/0/1]ip add 172.16.65.5 30
Apr 14 2024 20:54:32-08:00 r11 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r11-GigabitEthernet0/0/1]int l0
[r11-LoopBack0]ip add 172.16.66.11 24
[r11-LoopBack0]
r12
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r12
[r12]int g 0/0/0
[r12-GigabitEthernet0/0/0]ip add 172.16.65.6 24
[r12-GigabitEthernet0/0/0]
Apr 14 2024 20:55:55-08:00 r12 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r12-GigabitEthernet0/0/0]int l0
[r12-LoopBack0]ip add 172.16.160.12 24
[r12-LoopBack0]int l1
[r12-LoopBack1]ip add 172.16.161.12 24
[r12-LoopBack1]
缺省
[r3]ip route-static 0.0.0.0 0 34.0.0.4
[r5]ip route-static 0.0.0.0 0 45.0.0.4
[r6]ip route-static 0.0.0.0 0 46.0.0.4
[r7]ip route-static 0.0.0.0 0 47.0.0.4
2、R3-R5、R6、R7为MGRE环境,R3为中心站点;
r3
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 172.16.6.3 24
[r3-Tunnel0/0/0]tu
[r3-Tunnel0/0/0]tunnel-protocol gre p
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]so
[r3-Tunnel0/0/0]source s4/0/0
Apr 15 2024 20:52:32-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r3-Tunnel0/0/0]
[r3-Tunnel0/0/0]nhrp n
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp
[r3-Tunnel0/0/0]nhrp mu
[r3-Tunnel0/0/0]nhrp enter
[r3-Tunnel0/0/0]nhrp ent
[r3-Tunnel0/0/0]nhrp entry mu
[r3-Tunnel0/0/0]nhrp entry multicast d
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r3-Tunnel0/0/0]
r5
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 172.16.6.5 24
[r5-Tunnel0/0/0]tun
[r5-Tunnel0/0/0]tunnel-protocol gre p
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]so
[r5-Tunnel0/0/0]source s40/0/0
^
Error: Wrong parameter found at '^' position.
[r5-Tunnel0/0/0]source s4/0/0
Apr 15 2024 20:54:42-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r5-Tunnel0/0/0]
[r5-Tunnel0/0/0]nh
[r5-Tunnel0/0/0]nhrp n
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nh
[r5-Tunnel0/0/0]nhrp ent
[r5-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 r
[r5-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register
[r5-Tunnel0/0/0]
r6
[r6]int t0/0/0
[r6-Tunnel0/0/0]ip add 173.16.6.6 24
[r6-Tunnel0/0/0]tun
[r6-Tunnel0/0/0]tunnel-protocol g
[r6-Tunnel0/0/0]tunnel-protocol gre p
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]so
[r6-Tunnel0/0/0]source s4/0/0
Apr 15 2024 20:56:15-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r6-Tunnel0/0/0]
[r6-Tunnel0/0/0]nh
[r6-Tunnel0/0/0]nhrp ne
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]nhrp en
[r6-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 r
[r6-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register
[r6-Tunnel0/0/0]
r7
[r7]int t0/0/0
[r7-Tunnel0/0/0]ip add 172.16.6.7 24
[r7-Tunnel0/0/0]tun
[r7-Tunnel0/0/0]tunnel-protocol gre p
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp
[r7-Tunnel0/0/0]so
[r7-Tunnel0/0/0]source g0/0/0
Apr 15 2024 20:58:11-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r7-Tunnel0/0/0]
[r7-Tunnel0/0/0]nhrp
[r7-Tunnel0/0/0]nhrp ne
[r7-Tunnel0/0/0]nhrp network-id 100
[r7-Tunnel0/0/0]nhrp
[r7-Tunnel0/0/0]nhrp en
[r7-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 r
[r7-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register
[r7-Tunnel0/0/0]
3、整个OSPF环境IP基于172.16.0.0/16划分;除了R12有两个环回,其他路由器均有一个环回IP
[r1]osp
[r1]ospf 1ro
[r1]ospf 1 ro
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]a 1
[r1-ospf-1-area-0.0.0.1]ne
[r1-ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255
[r1-ospf-1-area-0.0.0.1]
[r2]ospf 1 ro
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]a 1
[r2-ospf-1-area-0.0.0.1]ne
[r2-ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255
[r2-ospf-1-area-0.0.0.1]
[r3]ospf 1 ro
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]net 172.16.36.0 0.0.0.255
[r3-ospf-1-area-0.0.0.1]
[r3-ospf-1-area-0.0.0.1]net 172.16.33.0 0.0.0.255
[r5]ospf 1 ro
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]net
[r5-ospf-1]os
[r5-ospf-1]osp
[r5-ospf-1]a 0
[r5-ospf-1-area-0.0.0.0]net
[r5-ospf-1-area-0.0.0.0]network 172.16.3.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]
[r6]ospf 1 r
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]a 0
[r6-ospf-1-area-0.0.0.0]net 172.16.4.0 0.0.0.255
[r6-ospf-1-area-0.0.0.0]a 2
[r6-ospf-1-area-0.0.0.2]net
[r6-ospf-1-area-0.0.0.2]network 172.16.65.1 0.0.0.0
[r6-ospf-1-area-0.0.0.2]
[r7]osp
[r7]ospf 1 ro
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]a 0
[r7-ospf-1-area-0.0.0.0]ne
[r7-ospf-1-area-0.0.0.0]network 172.16.5.0 0.0.0.255
[r8]ospf 1 ro
[r8]ospf 1 router-id 8.8.8.8
[r8-ospf-1]a 3
[r8-ospf-1-area-0.0.0.3]net 0.0.0.0 255.255.255.255
[r8-ospf-1-area-0.0.0.3]
[r9]ospf 1 ro
[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]a 3
[r9-ospf-1-area-0.0.0.3]net 172.16.97.6 0.0.0.0
[r9-ospf-1]q
[r9]ospf 2 ro
[r9]ospf 2 router-id 9.9.9.9
[r9-ospf-2]a 4
[r9-ospf-2-area-0.0.0.4]net 172.16.129.1 0.0.0.255
[r9-ospf-2-area-0.0.0.4]net 172.16.130.0 0.0.0.255
[r10]ospf 2
[r10-ospf-2]a 4
[r10-ospf-2-area-0.0.0.4]q
[r10-ospf-2]rou
[r10-ospf-2]route-tag
[r10-ospf-2]route-id
[r10-ospf-2]route-i
[r10-ospf-2]ospf 2 ro
[r10-ospf-2]q
[r10]ospf 2 ro
[r10]ospf 2 router-id 10.10.10.10
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r10-ospf-2]a 4
[r10-ospf-2-area-0.0.0.4]net 0.0.0.0 255.255.255.255
[r10-ospf-2-area-0.0.0.4]
[r11]ospf 1 ro
[r11]ospf 1 router-id 11.11.11.11
[r11-ospf-1]a 2
[r11-ospf-1-area-0.0.0.2]net 0.0.0.0 255.255.255.255
[r11-ospf-1-area-0.0.0.2]
[r12]ospf 1 ro
[r12]ospf 1 router-id 12.12.12.12
[r12-ospf-1]a 2
[r12-ospf-1-area-0.0.0.2]net 172.16.65.6 0.0.0.0
[r12-ospf-1-area-0.0.0.2]q
[r12-ospf-1]q
[r12]rip 1
[r12-rip-1]v 2
[r12-rip-1]undo sum
[r12-rip-1]undo summary
[r12-rip-1]net
[r12-rip-1]network 172.16.0.0
[r12-rip-1]import ro
[r12-rip-1]q
[r12]ospf 1
[r12-ospf-1]impo
[r12-ospf-1]import-route r
[r12-ospf-1]import-route rip
[r12-ospf-1]
[r3]ospf 1
[r3-ospf-1]a 0
[r3-ospf-1-area-0.0.0.0]net 172.16.6.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]
[r5]ospf 1
[r5-ospf-1]a 0
[r5-ospf-1-area-0.0.0.0]net
[r5-ospf-1-area-0.0.0.0]network 172.16.6.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]
[r6]ospf 1
[r6-ospf-1]a 0
[r6-ospf-1-area-0.0.0.0]net 172.16.6.0 0.0.0.255
[r6-ospf-1-area-0.0.0.0]
[r7]ospf 1
[r7-ospf-1]a 0
[r7-ospf-1-area-0.0.0.0]net
[r7-ospf-1-area-0.0.0.0]network 172.16.6.0 0.0.0.255
[r7-ospf-1-area-0.0.0.0]
[r3]int t0/0/0
[r3-Tunnel0/0/0]os
[r3-Tunnel0/0/0]ospf net
[r3-Tunnel0/0/0]ospf network-type b
[r3-Tunnel0/0/0]ospf network-type broadcast
[r3-Tunnel0/0/0]
[r5]int t0/0/0
[r5-Tunnel0/0/0]os
[r5-Tunnel0/0/0]ospf ne
[r5-Tunnel0/0/0]ospf network-type b
[r5-Tunnel0/0/0]ospf network-type broadcast
[r5-Tunnel0/0/0]ospf dr
[r5-Tunnel0/0/0]ospf dr-priority 0
[r5-Tunnel0/0/0]
[r6]int t0/0/0
[r6-Tunnel0/0/0]os
[r6-Tunnel0/0/0]ospf n
[r6-Tunnel0/0/0]ospf network-type b
[r6-Tunnel0/0/0]ospf network-type broadcast
[r6-Tunnel0/0/0]ospf dr
[r6-Tunnel0/0/0]ospf dr-priority 0
[r6-Tunnel0/0/0]
[r7]int t0/0/0
[r7-Tunnel0/0/0]os
[r7-Tunnel0/0/0]ospf net
[r7-Tunnel0/0/0]ospf network-type b
[r7-Tunnel0/0/0]ospf network-type broadcast
[r7-Tunnel0/0/0]os
[r7-Tunnel0/0/0]ospf dr
[r7-Tunnel0/0/0]ospf dr-priority 0
[r7-Tunnel0/0/0]
[r9]os
[r9]ospf 1
[r9-ospf-1]im
[r9-ospf-1]import-route os
[r9-ospf-1]import-route ospf 2
[r9-ospf-1]os
[r9-ospf-1]q
[r9]osp
[r9]ospf 2
[r9-ospf-2]im
[r9-ospf-2]import-route osp
[r9-ospf-2]import-route ospf 1
[r9-ospf-2]
4、所有设备均可访问R4的环回;
[r3]acl 2000
[r3-acl-basic-2000]rule per
[r3-acl-basic-2000]rule permit sou
[r3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r3-acl-basic-2000]q
[r3]int s4/0/0
[r3-Serial4/0/0]nat out
[r3-Serial4/0/0]nat outbound 2000
[r3-Serial4/0/0]
[r5]acl 2000
[r5-acl-basic-2000]sou
[r5-acl-basic-2000]sor
[r5-acl-basic-2000]rule per
[r5-acl-basic-2000]rule permit so
[r5-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r5-acl-basic-2000]q
[r5]int s4/0/0
[r5-Serial4/0/0]nat ou
[r5-Serial4/0/0]nat outbound 2000
[r5-Serial4/0/0]
[r6]acl 2000
[r6-acl-basic-2000]rule per
[r6-acl-basic-2000]rule permit so
[r6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r6-acl-basic-2000]q
[r6]int s4/0/0
[r6-Serial4/0/0]nat out
[r6-Serial4/0/0]nat outbound 2000
[r6-Serial4/0/0]
[r7]acl 2000
[r7-acl-basic-2000]rule permi
[r7-acl-basic-2000]rule permit so
[r7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r7-acl-basic-2000]q
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]nat out
[r7-GigabitEthernet0/0/0]nat outbound 2000
[r7-GigabitEthernet0/0/0]
[r3]ospf 1
[r3-ospf-1]abr
[r3-ospf-1]a
^
Error:Ambiguous command found at '^' position.
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]abr
[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0
[r3-ospf-1-area-0.0.0.1]
[r6]ospf 1
[r6-ospf-1]abr
[r6-ospf-1]a 2
[r6-ospf-1-area-0.0.0.2]abr
[r6-ospf-1-area-0.0.0.2]abr-summary 172.16.64.0 255.255.224.0
[r6-ospf-1-area-0.0.0.2]q
[r6-ospf-1]
[r7]ospf 1
[r7-ospf-1]a 3
[r7-ospf-1-area-0.0.0.3]abr
[r7-ospf-1-area-0.0.0.3]abr-summary 172.16.96.0 255.255.224.0
[r7-ospf-1-area-0.0.0.3]q
[r7-ospf-1]
[r12]os
[r12]ospf 1
[r12-ospf-1]as
[r12-ospf-1]asbr-summary 172.16.64.0 255.255.224.0
[r12-ospf-1]q
[r12]
[r1]ospf 1
[r1-ospf-1]a 1
[r1-ospf-1-area-0.0.0.1]stub-
[r1-ospf-1-area-0.0.0.1]stub no
[r1-ospf-1-area-0.0.0.1]stub no-summary
[r2-ospf-1]a 1
[r2-ospf-1-area-0.0.0.1]stub
[r2-ospf-1-area-0.0.0.1]stub no
[r2-ospf-1-area-0.0.0.1]stub no-summary
[r3]os
[r3]ospf 1
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]st
[r3-ospf-1-area-0.0.0.1]stub no
[r3-ospf-1-area-0.0.0.1]stub no-summary
[r6]os
[r6]ospf 1
[r6-ospf-1]nssa
[r6-ospf-1]nss
[r6-ospf-1]a 2
[r6-ospf-1-area-0.0.0.2]nss
[r6-ospf-1-area-0.0.0.2]nssa no
[r6-ospf-1-area-0.0.0.2]nssa no-import-route
[r6-ospf-1-area-0.0.0.2]nssa no-summary
[r7]os
[r7]ospf 1
[r7-ospf-1]a 3
[r7-ospf-1-area-0.0.0.3]nssa no
[r7-ospf-1-area-0.0.0.3]nssa no-summary
[r8]ospf 1
[r8-ospf-1]a 3
[r8-ospf-1-area-0.0.0.3]nssa no
[r8-ospf-1-area-0.0.0.3]nssa no-import-route
[r8-ospf-1-area-0.0.0.3]nssa no-summary
[r9]os
[r9]ospf 1
[r9-ospf-1]a 3
[r9-ospf-1-area-0.0.0.3]nssa no
[r9-ospf-1-area-0.0.0.3]nssa no-summary
[r11-ospf-1]a 2
[r11-ospf-1-area-0.0.0.2]nss
[r11-ospf-1-area-0.0.0.2]nssa no
[r11-ospf-1-area-0.0.0.2]nssa no-import-route
[r11-ospf-1-area-0.0.0.2]nssa no-summary
[r11-ospf-1-area-0.0.0.2]
[r12]os
[r12]ospf 1
[r12-ospf-1]a 2
[r12-ospf-1-area-0.0.0.2]nss
[r12-ospf-1-area-0.0.0.2]nssa no
[r12-ospf-1-area-0.0.0.2]nssa no-import-route
[r12-ospf-1-area-0.0.0.2]nssa no-summary
[r12-ospf-1-area-0.0.0.2]
[r9]os
[r9]ospf 2
[r9-ospf-2]defa
[r9-ospf-2]default-route-advertise
[r9-ospf-2]q
[r9]
实验现象
[r1]dis ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 11 Routes : 11
OSPF routing table status : <Active>
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
172.16.3.5/32 OSPF 10 1563 D 172.16.33.3 GigabitEthernet
0/0/0
172.16.5.7/32 OSPF 10 1563 D 172.16.33.3 GigabitEthernet
0/0/0
172.16.6.0/24 OSPF 10 1563 D 172.16.33.3 GigabitEthernet
0/0/0
172.16.35.2/32 OSPF 10 1 D 172.16.33.2 GigabitEthernet
0/0/0
172.16.36.3/32 OSPF 10 1 D 172.16.33.3 GigabitEthernet
0/0/0
172.16.97.0/30 OSPF 10 1564 D 172.16.33.3 GigabitEthernet
0/0/0
172.16.97.4/30 OSPF 10 1565 D 172.16.33.3 GigabitEthernet
0/0/0
172.16.98.8/32 OSPF 10 1564 D 172.16.33.3 GigabitEthernet
0/0/0
172.16.129.0/30 O_ASE 150 1 D 172.16.33.3 GigabitEthernet
0/0/0
172.16.130.0/24 O_ASE 150 1 D 172.16.33.3 GigabitEthernet
0/0/0
172.16.131.10/32 O_ASE 150 1 D 172.16.33.3 GigabitEthernet
0/0/0
OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0
[r1]display ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 3 Routes : 3
OSPF routing table status : <Active>
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 OSPF 10 2 D 172.16.33.3 GigabitEthernet
0/0/0
172.16.35.2/32 OSPF 10 1 D 172.16.33.2 GigabitEthernet
0/0/0
172.16.36.3/32 OSPF 10 1 D 172.16.33.3 GigabitEthernet
0/0/0
OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0
5、减少LSA的更新量,加快收敛,保障更新安全;
6、全网可达;
[r12-GigabitEthernet0/0/0]ospf timer hello 5
[r12-GigabitEthernet0/0/0]q
[r12]ping 172.16.2.4
PING 172.16.2.4: 56 data bytes, press CTRL_C to break
Reply from 172.16.2.4: bytes=56 Sequence=1 ttl=253 time=70 ms
Reply from 172.16.2.4: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 172.16.2.4: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 172.16.2.4: bytes=56 Sequence=4 ttl=253 time=40 ms
Reply from 172.16.2.4: bytes=56 Sequence=5 ttl=253 time=30 ms
--- 172.16.2.4 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/40/70 ms
[r10-GigabitEthernet0/0/0]q
[r10]ping 172.16.2.4
PING 172.16.2.4: 56 data bytes, press CTRL_C to break
Reply from 172.16.2.4: bytes=56 Sequence=1 ttl=252 time=70 ms
Reply from 172.16.2.4: bytes=56 Sequence=2 ttl=252 time=40 ms
Reply from 172.16.2.4: bytes=56 Sequence=3 ttl=252 time=30 ms
Reply from 172.16.2.4: bytes=56 Sequence=4 ttl=252 time=30 ms
Reply from 172.16.2.4: bytes=56 Sequence=5 ttl=252 time=40 ms
--- 172.16.2.4 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/42/70 ms
[r1-GigabitEthernet0/0/0]ospf timer hello 5
[r2-GigabitEthernet0/0/0]ospf timer hello 5
[r3-GigabitEthernet0/0/0]ospf timer hello 5
其他区域同理
[r6-ospf-1]a 2
[r6-ospf-1-area-0.0.0.2]au
[r6-ospf-1-area-0.0.0.2]authentication-mode md5 1 ci
[r6-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
[r6-ospf-1-area-0.0.0.2]
[r11]ospf 1
[r11-ospf-1]a 2
[r11-ospf-1-area-0.0.0.2]au
[r11-ospf-1-area-0.0.0.2]authentication-mode md5 1 cip
[r11-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
[r11-ospf-1-area-0.0.0.2]
[r12-ospf-1-area-0.0.0.2]authentication-mode md5 1 cip
[r12-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 12345
[r12-ospf-1-area-0.0.0.2]
其他区域同理