一、实验要求
1,R4为ISP,其上只能配置IP地址;R4与其他所有直连设备间均使用公有IP
2,R3-R5/6/7为MGRE环境,R3为中心站点;
3,整个OSPF环境IP基于172.16.0.0/16划分;
4,所有设备均可访问R4的环回;
5,减少LSA的更新量,加快收敛,保障更新安全;
6,全网可达
二、实验内容
1,R4为ISP,其上只能配置IP地址;R4与其他所有直连设备间均使用公有IP
R1
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip address 172.16.17.1 24
[R1-GigabitEthernet0/0/0]
Jul 16 2024 21:47:18-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 address 172.16.17.1 24
R2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip ad 172.16.16.2 29
Jul 16 2024 21:48:21-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]int l0
[r2-LoopBack0]ip ad 172.16.18.1 24
R3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip ad 172.16.16.3 29
Jul 16 2024 21:49:56-08:00 r3 %%01IFNET/4/LINK_STATE(l)[6]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r3-GigabitEthernet0/0/0]int l0
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip ad 172.16.16.3 29
Jul 16 2024 21:51:43-08:00 r3 %%01IFNET/4/LINK_STATE(l)[8]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r3-GigabitEthernet0/0/0]int l0
[r3-LoopBack0]ip ad 172.16.19.1 24
[r3-LoopBack0]int s4/0/0
[r3-Serial4/0/0]ip ad 34.0.0.3 24
R4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip ad 47.0.0.4 24
Jul 16 2024 21:53:49-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r4-GigabitEthernet0/0/0]int s4/0/0
[r4-Serial4/0/0]ip ad 34.0.0.4 24
[r4-Serial4/0/0]
Jul 16 2024 21:54:22-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]: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 ad 45.0.0.4 24
[r4-Serial4/0/1]int s3/0/0
[r4-Serial3/0/0]ip ad 46.0.0.4 24
[r4-Serial3/0/0]int l0
[r4-LoopBack0]ip ad 4.4.4.4 32
R5
[r5]int s4/0/0
[r5-Serial4/0/0]ip ad 45.0.0.5 24
Jul 16 2024 21:56:33-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 ad 172.16.1.1 24
R6
[r6]int s4/0/0
[r6-Serial4/0/0]ip ad 46.0.0.6 24
[r6-Serial4/0/0]
Jul 16 2024 21:57:24-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 g0/0/0
[r6-GigabitEthernet0/0/0]ip ad 172.16.33.1 30
[r6-GigabitEthernet0/0/0]
Jul 16 2024 21:57:43-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]int l0
[r6-LoopBack0]ip ad 172.16.2.1 24
R7
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]int l0
[r7-LoopBack0]ip ad 172.16.3.1 24
[r7-LoopBack0]int g0/0/1
[r7-GigabitEthernet0/0/1]ip ad 172.16.49.1 30
Jul 16 2024 21:59:50-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r7-GigabitEthernet0/0/1]q
R8
[r8]int g0/0/0
[r8-GigabitEthernet0/0/0]ip ad 172.16.49.2 30
Jul 16 2024 22:00:57-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-GigabitEthernet0/0/0]int g0/0/1
[r8-GigabitEthernet0/0/1]ip ad 172.16.49.5 30
Jul 16 2024 22:01:26-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 ad 172.16.48.1 24
[r8-LoopBack0]q
R9
[r9]int g0/0/0
[r9-GigabitEthernet0/0/0]ip ad 172.16.49.6 30
Jul 16 2024 22:03:20-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 l0
[r9-LoopBack0]ip ad 172.16.64.1 24
[r9-LoopBack0]int g0/0/1
[r9-GigabitEthernet0/0/1]ip ad 172.16.66.1 30
[r9-GigabitEthernet0/0/1]
Jul 16 2024 22:04:02-08:00 r9 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
R10
[R10]int g 0/0/0
[R10-GigabitEthernet0/0/0]ip ad 172.16.66.2 30
[R10-GigabitEthernet0/0/0]int l0
[R10-LoopBack0]ip ad 172.16.65.1 24
R11
[r11]int g0/0/0
[r11-GigabitEthernet0/0/0]ip ad 172.16.33.2 30
[r11-GigabitEthernet0/0/0]
Jul 16 2024 22:06:10-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 ad 172.16.33.5 30
Jul 16 2024 22:06:31-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 ad 172.16.32.1 24
R12
[r12]int g0/0/0
[r12-GigabitEthernet0/0/0]
[r12-GigabitEthernet0/0/0]ip ad 172.16.33.6 30
[r12-GigabitEthernet0/0/0]
Jul 16 2024 22:07:41-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 ad 172.16.128.1 18
[r12-LoopBack0]int l1
[r12-LoopBack1]ip ad 172.16.192.1 18
2,R3-R5/6/7为MGRE环境,R3为中心站点;
[r3]int t 0/0/0
[r3-Tunnel0/0/0]ip ad 172.16.0.1 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp[r3-Tunnel0/0/0]source 34.0.0.3
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r3-Tunnel0/0/0]ip route-static 0.0.0.0 34.0.0.4
[r5]int t 0/0/0
[r5-Tunnel0/0/0]ip ad 172.16.0.2 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source Serial 4/0/0
Jul 16 2024 22:15:12-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]nhrp entry 172.16.0.1 34.0.0.3 register
[r5-Tunnel0/0/0]q
[r5]ip route-static 0.0.0.0 0 45.0.0.4
3,整个OSPF环境IP基于172.16.0.0/16划分;
area 0的OSPF
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]net
[r3-ospf-1-area-0.0.0.0]network 172.16.0.1 0.0.0.0
[r3-ospf-1-area-0.0.0.0]int t0/0/0
[r3-Tunnel0/0/0]ospf network-type p2mp
[r3-Tunnel0/0/0]ospf timer hello 1
[r5-Tunnel0/0/0]ospf network-type p2mp
[r5-Tunnel0/0/0]o
[r5-Tunnel0/0/0]os
[r5-Tunnel0/0/0]ospf t
[r5-Tunnel0/0/0]ospf net
[r5-Tunnel0/0/0]ospf network-type p
[r5-Tunnel0/0/0]ospf ti
[r5-Tunnel0/0/0]ospf timer h
[r5-Tunnel0/0/0]ospf timer hello 1
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 172.16.0.3 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 172.16.2.1 0.0.0.0
[r6-ospf-1-area-0.0.0.0]int t0/0/0
[r6-Tunnel0/0/0]ospf network-type p2mp
[r6-Tunnel0/0/0]ospf timer hello 1
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 172.16.0.0 0.15.255.255
[r7-ospf-1-area-0.0.0.0]int t0/0/0
[r7-Tunnel0/0/0]ospf network-type p2mp
[r7-Tunnel0/0/0]ospf timer hello 1
area 1
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 1
[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]int g0/0/0
[R1-GigabitEthernet0/0/0]ospf timer hello 1
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 1
[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]int g0/0/0
[r2-GigabitEthernet0/0/0]ospf timer hello 1
[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 172.16.16.0 0.15.255.255
[r3-ospf-1-area-0.0.0.1]int g0/0/0
[r3-GigabitEthernet0/0/0]ospf timer hello 1
area 2
[r6]ospf 1
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]network 172.16.33.1 0.0.0.0
[r6-ospf-1-area-0.0.0.2]int g0/0/0
[r6-GigabitEthernet0/0/0]ospf timer hello 1
[r11]ospf 1 router-id 11.11.11.11
[r11-ospf-1]area 2
[r11-ospf-1-area-0.0.0.2]network 0.0.0.0 255.255.255.255
[r11-ospf-1-area-0.0.0.2]int g0/0/0
[r11-GigabitEthernet0/0/0]ospf timer hello 1[r11-GigabitEthernet0/0/0]int g0/0/1
[r11-GigabitEthernet0/0/1]ospf timer hello 1
[r12]ospf 2 router-id 12.12.12.12
[r12-ospf-2]area 2
[r12-ospf-2-area-0.0.0.2]network 172.16.33.6 0.0.0.0
[r12-ospf-2-area-0.0.0.2]int g0/0/0
[r12-GigabitEthernet0/0/0]ospf timer hello 1
area 3
[r7]ospf 1
[r7-ospf-1]area 3
[r7-ospf-1-area-0.0.0.3]network 172.16.49.1 0.0.0.0
[r7-ospf-1-area-0.0.0.3]int g0/0/1
[r7-GigabitEthernet0/0/1]ospf timer hello 1
[r8]ospf 1 router-id 8.8.8.8
[r8-ospf-1]area 3
[r8-ospf-1-area-0.0.0.3]network 0.0.0.0 255.255.255.255
[r8-ospf-1-area-0.0.0.3]int g0/0/0
[r8-GigabitEthernet0/0/0]ospf timer hello 1[r8-GigabitEthernet0/0/0]int g0/0/1
[r8-GigabitEthernet0/0/1]ospf timer hello 1[r8-GigabitEthernet0/0/0]int g0/0/1
[r8-GigabitEthernet0/0/1]ospf timer hello 1
area 4
[r9]ospf 2 router-id 9.9.9.9
[r9-ospf-2]area 4
[r9-ospf-2-area-0.0.0.4]network 172.16.64.0 0.15.255.255
[r9-ospf-2-area-0.0.0.4]int g0/0/0
[r9-GigabitEthernet0/0/0]ospf timer hello 1
[R10]ospf 1 router-id 10.10.10.10
[R10-ospf-1]area 4
[R10-ospf-1-area-0.0.0.4]network 0.0.0.0 255.255.255.255[R10-ospf-1-area-0.0.0.4]int g0/0/0
[R10-GigabitEthernet0/0/0]ospf timer hello 1
r12与r9上做重发布
[r9]ospf 1
[r9-ospf-1]import-route rip 1
[r9-ospf-1]q
[r9]rip 1
[r9-rip-1]import-route ospf 1
[r12]ospf 1
[r12-ospf-1]import-route rip 1
[r12-ospf-1]q
[r12]rip 1
[r12-rip-1]import-route ospf 1
OSPF路由汇总+域外路由汇总
[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.16.0 255.255.240.0
[r6]ospf 1
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]abr-summary 172.16.32.0 255.255.240.0
[r7]ospf 1
[r7-ospf-1]area 3
[r7-ospf-1-area-0.0.0.3]abr-summary 172.16.48.0 255.255.240.0
[r9]ospf 1
[r9-ospf-1]asbr-summary 172.16.64.0 255.255.240.0
[r12]ospf 1
[r12-ospf-1]asbr-summary 172.16.128.0 255.255.128.0
特殊区域
area 1做成Totally Stub Area
[R1]ospf 1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]stub
area 2 做成Totally NSSA
area 3做成Totally NSSA
接口认证
区域认证
空接口防环(优化)
[r3]ip route-static 172.16.16.0 20 NULL 0
[r6]ip route-static 172.16.32.0 20 NULL 0
环回接口(r1---r12)
ospf 1
silent-interface LoopBack 0