目录
3.R4为ISP,只配置IP地址,R4与其他直连设备见使用公网IP
4.R3、R5、R6和R7配置MGRE的VPN环境,R3为中心
题目
需求分析
1.基于172.16.0.0/16为整个网络划分IP地址
2.为全网的设备配置IP地址
3.R4为ISP,只配置IP地址,R4与其他直连设备见使用公网IP
4.R3、R5、R6和R7配置MGRE的VPN环境,R3为中心
5.全网络配置题目要求配置OSPF协议
6.所有设备均可访问R4的环回
7.减少LSA的更新量,加快收敛,保障更新安全
需求实现
1.基于172.16.0.0/16为整个网络划分IP地址
先划分成OSPF和RIP两个部分,再将OSPF化为5个区域,再接着往下细化
2.为全网的设备配置IP地址
按照上述划分的IP依次为所有设备配置IP地址
R1
[R1]interface l0
[R1-LoopBack0]ip add
[R1-LoopBack0]ip address 172.16.20.1 24
[R1-LoopBack0]q
[R1]int
[R1]interface g
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip add
[R1-GigabitEthernet0/0/0]ip address 172.16.16.0 24
Error: The specified IP address is invalid.
[R1-GigabitEthernet0/0/0]ip address 172.16.16.1 24
Jul 14 2024 21:03:15-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]
R2
[R2]interface l0
[R2-LoopBack0]ip add
[R2-LoopBack0]ip address 172.16.24.1 24
[R2-LoopBack0]q
[R2]int
[R2]interface g
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip add
[R2-GigabitEthernet0/0/0]ip address 172.16.16.2 24
Jul 14 2024 21:04:06-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]
R3
[R3]interface l0
[R3-LoopBack0]ip add
[R3-LoopBack0]ip address 172.16.28.1 24
[R3-LoopBack0]q
[R3]int
[R3]interface g
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip add
[R3-GigabitEthernet0/0/0]ip address 172.16.16.3 24
Jul 14 2024 21:04:51-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R3-GigabitEthernet0/0/0]q
[R3]int
[R3]interface s
[R3]interface Serial 4/0/0
[R3-Serial4/0/0]ip add
[R3-Serial4/0/0]ip address 172.16.0.2 24
[R3-Serial4/0/0]undo ip address 172.16.0.2 24
[R3-Serial4/0/0]ip add
[R3-Serial4/0/0]ip address 34.0.0.1 24
R5
[R5]interface l0
[R5-LoopBack0]ip add
[R5-LoopBack0]ip address 172.16.6.1 24
[R5-LoopBack0]q
[R5]int
[R5]interface s
[R5]interface Serial 4/0/0
[R5-Serial4/0/0]ip add
[R5-Serial4/0/0]ip address 54.0.0.1 24
[R5-Serial4/0/0]
Jul 14 2024 21:08:48-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]
R6
[R6]interface LoopBack 0
[R6-LoopBack0]ip add
[R6-LoopBack0]ip address 172.16.7.1 24
[R6-LoopBack0]q
[R6]int s
[R6]int Serial 4/0/0
[R6-Serial4/0/0]ip add
[R6-Serial4/0/0]ip address 64.0.0.1 24
[R6-Serial4/0/0]
Jul 14 2024 21:10:07-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]q
[R6]int
[R6]interface g
[R6]interface GigabitEthernet 0/0/0
[R6-GigabitEthernet0/0/0]ip add
[R6-GigabitEthernet0/0/0]ip address 172.16.32.1 24
Jul 14 2024 21:10:24-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
[R7]interface l0
[R7-LoopBack0]ip add
[R7-LoopBack0]ip address 172.16.8.1 24
[R7-LoopBack0]q
[R7]int
[R7]interface g
[R7]interface GigabitEthernet 0/0/0
[R7-GigabitEthernet0/0/0]ip add
[R7-GigabitEthernet0/0/0]ip address 74.0.0.1 24
Jul 14 2024 21:11:08-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]q
[R7]int
[R7]interface g
[R7]interface GigabitEthernet 0/0/1
[R7-GigabitEthernet0/0/1]ip add
[R7-GigabitEthernet0/0/1]ip address 172.16.48.1 24
Jul 14 2024 21:11:20-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]
R8
[R8]interface LoopBack 0
[R8-LoopBack0]172.16.56.1 24
^
Error: Unrecognized command found at '^' position.
[R8-LoopBack0]ip add
[R8-LoopBack0]ip address 172.16.56.1 24
[R8-LoopBack0]q
[R8]int
[R8]interface g
[R8]interface GigabitEthernet 0/0/0
[R8-GigabitEthernet0/0/0]ip add
[R8-GigabitEthernet0/0/0]ip address 172.16.48.2 24
Jul 14 2024 21:12:18-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]q
[R8]int
[R8]interface g
[R8]interface GigabitEthernet 0/0/1
[R8-GigabitEthernet0/0/1]ip ad
[R8-GigabitEthernet0/0/1]ip address 172.16.52.1 24
[R8-GigabitEthernet0/0/1]
Jul 14 2024 21:12:36-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]
R9
[R9]interface GigabitEthernet 0/0/0
[R9-GigabitEthernet0/0/0]ip add
[R9-GigabitEthernet0/0/0]ip address 172.16.52.2 24
Jul 14 2024 21:13:03-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]q
[R9]int
[R9]interface l0
[R9-LoopBack0]ip add
[R9-LoopBack0]ip address 172.16.68.1 24
[R9-LoopBack0]q
[R9]int
[R9]interface g
[R9]interface GigabitEthernet 0/0/1
[R9-GigabitEthernet0/0/1]ip add
[R9-GigabitEthernet0/0/1]ip address 172.16.64.1 24
Jul 14 2024 21:13:28-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]
R10
[R10]interface l0
[R10-LoopBack0]ip ad
[R10-LoopBack0]ip address 172.16.72.1 24
[R10-LoopBack0]q
[R10]int
[R10]interface g
[R10]interface GigabitEthernet 0/0/0
[R10-GigabitEthernet0/0/0]ip add
[R10-GigabitEthernet0/0/0]ip address 172.16.64.2 24
Jul 14 2024 21:14:25-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]
R11
[R11]interface l0
[R11-LoopBack0]ip ad
[R11-LoopBack0]ip address 172.16.40.1 24
[R11-LoopBack0]q
[R11]int
[R11]interface g
[R11]interface GigabitEthernet 0/0/0
[R11-GigabitEthernet0/0/0]ip add
[R11-GigabitEthernet0/0/0]ip address 172.16.32.2 24
Jul 14 2024 21:15:00-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]q
[R11]int
[R11]interface g
[R11]interface GigabitEthernet 0/0/1
[R11-GigabitEthernet0/0/1]ip add
[R11-GigabitEthernet0/0/1]ip address 172.16.36.2 24
[R11-GigabitEthernet0/0/1]
Jul 14 2024 21:15:25-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]
R12
[R12]interface LoopBack 0
[R12-LoopBack0]ip add
[R12-LoopBack0]ip address 172.16.128.1 24
[R12-LoopBack0]q
[R12]int
[R12]interface l
[R12]interface LoopBack 1
[R12-LoopBack1]ip add
[R12-LoopBack1]ip address 172.16.192.1 24
[R12-LoopBack1]q
[R12]int
[R12]interface g
[R12]interface GigabitEthernet 0/0/0
[R12-GigabitEthernet0/0/0]ip add
[R12-GigabitEthernet0/0/0]ip address 172.16.36.1 24
Jul 14 2024 21:16:17-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]
3.R4为ISP,只配置IP地址,R4与其他直连设备见使用公网IP
R4
[R4]interface l0
[R4-LoopBack0] ip add
[R4-LoopBack0]ip address 100.0.0.1 24
[R4-LoopBack0]q
[R4]int
[R4]interface s
[R4]interface Serial 4/0/0
[R4-Serial4/0/0]ip add
[R4-Serial4/0/0]ip address 34.0.0.2 24
[R4-Serial4/0/0]
Jul 14 2024 21:07:08-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]q
[R4]int
[R4]interface s
[R4]interface Serial 3/0/0
[R4-Serial3/0/0]ip add
[R4-Serial3/0/0]ip address 64.0.0.2 24
[R4-Serial3/0/0]q
[R4]int
[R4]interface s
[R4]interface Serial 4/0/1
[R4-Serial4/0/1]ip add
[R4-Serial4/0/1]ip address 54.0.0.2 24
[R4-Serial4/0/1]q
[R4]int
[R4]interface g
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]ip ad
[R4-GigabitEthernet0/0/0]ip address 74.0.0.2 24
Jul 14 2024 21:07:52-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]
4.R3、R5、R6和R7配置MGRE的VPN环境,R3为中心
R3
[R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]ip add
[R3-Tunnel0/0/0]ip address 172.16.0.2 24
[R3-Tunnel0/0/0]tun
[R3-Tunnel0/0/0]tunnel-protocol gre p2
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source
[R3-Tunnel0/0/0]source s
[R3-Tunnel0/0/0]source Serial 4/0/0
[R3-Tunnel0/0/0]nhrp e
[R3-Tunnel0/0/0]nhrp en
[R3-Tunnel0/0/0]nhrp entry m
[R3-Tunnel0/0/0]nhrp entry multicast d
[R3-Tunnel0/0/0]nhrp entry multicast dynamic
[R3-Tunnel0/0/0]nhrp
[R3-Tunnel0/0/0]nhrp net
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]q
[R3]ip rou
[R3]ip route
[R3]ip route-static 0.0.0.0 0 34.0.0.2
R5
[R5]interface Tunnel 0/0/0
[R5-Tunnel0/0/0]ip add
[R5-Tunnel0/0/0]ip address 172.16.0.1 24
[R5-Tunnel0/0/0]tun
[R5-Tunnel0/0/0]tunnel-protocol
[R5-Tunnel0/0/0]tunnel-protocol gre p2
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp
[R5-Tunnel0/0/0]source
[R5-Tunnel0/0/0]source s
[R5-Tunnel0/0/0]source Serial 4/0/0
[R5-Tunnel0/0/0]nhrp e
[R5-Tunnel0/0/0]nhrp entry 172.16.0.2 34.0.0.1 r
[R5-Tunnel0/0/0]nhrp entry 172.16.0.2 34.0.0.1 register
[R5-Tunnel0/0/0]nhrp ne
[R5-Tunnel0/0/0]nhrp network-id 100
[R5-Tunnel0/0/0]q
[R5]ip rou
[R5]ip route
[R5]ip route-static 0.0.0.0 172.16.0.2 34.0.0.1 r
[R5]ip route-static 0.0.0.0 172.16.0.2 34.0.0.1
Error: The mask is invalid.
[R5]ip route-static 0.0.0.0 0 54.0.0.2
R6
[R6]interface Tunnel 0/0/0
[R6-Tunnel0/0/0]ip add
[R6-Tunnel0/0/0]ip address 172.16.0.3 24
[R6-Tunnel0/0/0]tun
[R6-Tunnel0/0/0]tunnel-protocol gre p2
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp
[R6-Tunnel0/0/0]sourc
[R6-Tunnel0/0/0]source 4/0/0
^
Error: Wrong parameter found at '^' position.
[R6-Tunnel0/0/0]source s
[R6-Tunnel0/0/0]source Serial 4/0/0
[R6-Tunnel0/0/0]nhrp
[R6-Tunnel0/0/0]nhrp net
[R6-Tunnel0/0/0]nhrp network-id 100
[R6-Tunnel0/0/0]nhrp
[R6-Tunnel0/0/0]nhrp e
[R6-Tunnel0/0/0]nhrp entry 172.16.0.2 34.0.0.1 r
[R6-Tunnel0/0/0]nhrp entry 172.16.0.2 34.0.0.1 register
[R6-Tunnel0/0/0]q
[R6]ip rou
[R6]ip route
[R6]ip route-static 0.0.0.0 0 64.0.0.2
R7
[R7]interface Tunnel 0/0/0
[R7-Tunnel0/0/0]ip add
[R7-Tunnel0/0/0]ip address 172.16.0.4 24
[R7-Tunnel0/0/0]nhrp
[R7-Tunnel0/0/0]tu
[R7-Tunnel0/0/0]tunnel-protocol gre p2
[R7-Tunnel0/0/0]tunnel-protocol gre p2mp
[R7-Tunnel0/0/0]sour
[R7-Tunnel0/0/0]source s
[R7-Tunnel0/0/0]source s
[R7-Tunnel0/0/0]so
[R7-Tunnel0/0/0]source g
[R7-Tunnel0/0/0]source GigabitEthernet 0/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 e
[R7-Tunnel0/0/0]nhrp entry 172.16.0.2 34.0.0.1 r
[R7-Tunnel0/0/0]nhrp entry 172.16.0.2 34.0.0.1 register
[R7-Tunnel0/0/0]q
[R7]ip rout
[R7]ip route
[R7]ip route-static
[R7]ip rout
[R7]ip route-static 0.0.0.0 0 74.0.0.2 24
^
Error:Too many parameters found at '^' position.
[R7]ip route-static 0.0.0.0 0 74.0.0.2
[R7]
5.全网络按照题目要求配置OSPF协议
area0
R3
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[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
[R3-ospf-1-area-0.0.0.0]q
[R3-ospf-1]q
[R3]int
[R3]interface t
[R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]ospf net
[R3-Tunnel0/0/0]ospf network-type p2mp
R5
[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.0.255
[R5-ospf-1-area-0.0.0.0]q
[R5-ospf-1]q
[R5]int
[R5]interface t
[R5]interface Tunnel 0/0/
^
Error: Wrong parameter found at '^' position.
[R5]interface Tunnel 0/0/0
[R5-Tunnel0/0/0]ospf net
[R5-Tunnel0/0/0]ospf network-type p2mp
[R5-Tunnel0/0/0]
R6
[R6]ospf 1 router-id 6.6.6.6
[R6-ospf-1]area 0
[R6-ospf-1-area-0.0.0.0]netw
[R6-ospf-1-area-0.0.0.0]network 172.16.7.1 0.0.0.0
[R6-ospf-1-area-0.0.0.0]ne
[R6-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.0.255
[R6-ospf-1-area-0.0.0.0]q
[R6-ospf-1]q
[R6]int
[R6]interface t
[R6]interface Tunnel 0/0/0
[R6-Tunnel0/0/0]ospf net
[R6-Tunnel0/0/0]ospf network-type p2
[R6-Tunnel0/0/0]ospf network-type p2mp
R7
[R7]ospf 1 router-id 7.7.7.7
[R7-ospf-1]area 0
[R7-ospf-1-area-0.0.0.0]net
[R7-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.0.255
[R7-ospf-1-area-0.0.0.0]network 172.16.8.1 0.0.0.0
[R7-ospf-1-area-0.0.0.0]q
[R7-ospf-1]q
[R7]int t
[R7]int Tunnel 0/0/0
[R7-Tunnel0/0/0]ospf net
[R7-Tunnel0/0/0]ospf network-type p2
[R7-Tunnel0/0/0]ospf network-type p2mp
area1
R1
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]netw
[R1-ospf-1-area-0.0.0.1]network 172.16.20.1 24
^
Error: Wrong parameter found at '^' position.
[R1-ospf-1-area-0.0.0.1]network 172.16.20.1 0.0.0.0
[R1-ospf-1-area-0.0.0.1]network 172.16.16.0 0.0.0.255
[R1-ospf-1-area-0.0.0.1]
R2
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]net
[R2-ospf-1-area-0.0.0.1]network 172.16.16.0 0.0.0.255
[R2-ospf-1-area-0.0.0.1]network 172.16.24.1 0.0.0.0
R3
[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]network 172.16.16.0 0.0.0.255
[R3-ospf-1-area-0.0.0.1]network 172.16.28.1 0.0.0.0
area2(OSPF与RIP)
R6
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]network 172.16.32.0 0.0.0.255
[R6-ospf-1-area-0.0.0.2]
R11
[R11]ospf 1 router-id 11.11.11.11
[R11-ospf-1]area 2
[R11-ospf-1-area-0.0.0.2]network 172.16.40.1 0.0.0.0
[R11-ospf-1-area-0.0.0.2]network 172.16.32.0 0.0.0.255
[R11-ospf-1-area-0.0.0.2]network 172.16.36.0 0.0.0.255
R12
[R12]ospf 1 router-id 12.12.12.12
[R12-ospf-1]area 2
[R12-ospf-1-area-0.0.0.2]netwo
[R12-ospf-1-area-0.0.0.2]network 172.16.36.0 0.0.0.255
[R12-ospf-1-area-0.0.0.2]q
[R12-ospf-1]q
[R12]rip 1
[R12-rip-1]vers
[R12-rip-1]version 2
[R12-rip-1]net
[R12-rip-1]network 172.16.128.0
Error: The network address is invalid, and the specified address must be major-n
et address without any subnets.
[R12-rip-1]network 172.16.0.0
[R12-rip-1]undo sum
[R12-rip-1]undo summary
[R12-rip-1]
area3
R7
[R7-ospf-1]area 3
[R7-ospf-1-area-0.0.0.3]networ
[R7-ospf-1-area-0.0.0.3]network 172.16.48.0 0.0.0.255
[R7-ospf-1-area-0.0.0.3]
R8
[R8]ospf 1 router-id 8.8.8.8
[R8-ospf-1]area 3
[R8-ospf-1-area-0.0.0.3]network 172.16.56.1 0.0.0.0
[R8-ospf-1-area-0.0.0.3]net
[R8-ospf-1-area-0.0.0.3]network 172.16.48.0 0.0.0.255
[R8-ospf-1-area-0.0.0.3]net
[R8-ospf-1-area-0.0.0.3]network 172.16.52.0 0.0.0.255
R9
[R9]ospf 1 router-id 9.9.9.9
[R9-ospf-1]area 3
[R9-ospf-1-area-0.0.0.3]netw
[R9-ospf-1-area-0.0.0.3]network 172.16.52.0 0.0.0.255
area4
R9
[R9]ospf 2 router-id 9.9.9.9
[R9-ospf-2]netwr
[R9-ospf-2]netw
[R9-ospf-2]net
[R9-ospf-2]area 4
[R9-ospf-2-area-0.0.0.4]net
[R9-ospf-2-area-0.0.0.4]network 172.16.68.1 0.0.0.0
[R9-ospf-2-area-0.0.0.4]net
[R9-ospf-2-area-0.0.0.4]network 172.16.64.0 0.0.0.255
[R9-ospf-2-area-0.0.0.4]
R10
[R10]ospf 2 router-id 10.10.10.10
[R10-ospf-2]area 4
[R10-ospf-2-area-0.0.0.4]net
[R10-ospf-2-area-0.0.0.4]network 172.16.64.0 0.0.0.255
[R10-ospf-2-area-0.0.0.4]net
[R10-ospf-2-area-0.0.0.4]network 172.16.72.1 0.0.0.0
R9和R12重发布
[R12]ospf 1
[R12-ospf-1]im
[R12-ospf-1]import-route rip 1
[R12-ospf-1]q
[R12]rip 1
[R12-rip-1]im
[R12-rip-1]import-route ospf 1
[R12-rip-1]
[R9]ospf 1
[R9-ospf-1]im
[R9-ospf-1]import-route ospf 2
[R9-ospf-1]q
[R9]ospf 2
[R9-ospf-2]im
[R9-ospf-2]import-route os
[R9-ospf-2]import-route ospf 1
6.所有设备均可访问R4的环回
均可访问公网的资源,即做nat
R3
[R3]acl 2000
[R3-acl-basic-2000]rule p
[R3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255\
^
Error: Wrong parameter found at '^' position.
[R3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R3-acl-basic-2000]q
[R3]int
[R3]interface s
[R3]interface Serial 4/0/0
[R3-Serial4/0/0]nat out
[R3-Serial4/0/0]nat outbound 2000
R6
[R6]acl 2000
[R6-acl-basic-2000]rule p
[R6-acl-basic-2000]rule permit s
[R6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R6-acl-basic-2000]q
[R6]int
[R6]interface s
[R6]interface Serial 4/0/0
[R6-Serial4/0/0]nat ou
[R6-Serial4/0/0]nat outbound 2000
[R6-Serial4/0/0]
R7
[R7]acl 2000
[R7-acl-basic-2000]rule p
[R7-acl-basic-2000]rule permit s
[R7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R7-acl-basic-2000]q
[R7]int
[R7]interface g
[R7]interface GigabitEthernet 0/0/0
[R7-GigabitEthernet0/0/0]nat ou
[R7-GigabitEthernet0/0/0]nat outbound 2000
7.减少LSA的更新量,加快收敛,保障更新安全
减少更新量即做路由汇总和特殊区域;加快收敛即减少所有设备的hello和dead时间;保障更新安全即做一些接口认证和区域认证
路由汇总
R3
[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]abr
[R3-ospf-1-area-0.0.0.1]abr-summary 172.16.16.0 255.255.240.0
R6
[R6]ospf 1
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]ab
[R6-ospf-1-area-0.0.0.2]abr-summary 172.16.32.0 255.255.240.0
[R6-ospf-1-area-0.0.0.2]
R7
[R7-ospf-1]area 3
[R7-ospf-1-area-0.0.0.3]abr
[R7-ospf-1-area-0.0.0.3]abr-summary 172.16.48.0 255.255.240.0
[R7-ospf-1-area-0.0.0.3]
域外路由汇总
R9
[R9]ospf 1
[R9-ospf-1]asbr
[R9-ospf-1]asbr-summary 172.16.64.0 255.255.240.0
[R9-ospf-1]
R12
[R12]ospf 1
[R12-ospf-1]asbr
[R12-ospf-1]asbr-summary 172.16.128.0 255.255.128.0
特殊区域
特殊区域1,将area1配置为Totally Stub Area
R1
[R1]ospf 1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]stub
[R1-ospf-1-area-0.0.0.1]
R2
[R2]ospf 1
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]stub
[R2-ospf-1-area-0.0.0.1]
R3
[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]stub no
[R3-ospf-1-area-0.0.0.1]stub no-summary
[R3-ospf-1-area-0.0.0.1]
特殊区域2,将区域2配置为Totally NSSA
[R6]ospf 1
[R6-ospf-1]ar
[R6-ospf-1]area 2
[R6-ospf-1-area-0.0.0.2]nssa no
[R6-ospf-1-area-0.0.0.2]nssa no-summary
[R6-ospf-1-area-0.0.0.2]
[R11]ospf 1
[R11-ospf-1]area 2
[R11-ospf-1-area-0.0.0.2]nssa
[R11-ospf-1-area-0.0.0.2]
[R12]ospf 1
[R12-ospf-1]area 2
[R12-ospf-1-area-0.0.0.2]nssa
[R12-ospf-1-area-0.0.0.2]
特殊区域3,将区域3配置为Totally NSSA
[R7]ospf 1
[R7-ospf-1]area 3
[R7-ospf-1-area-0.0.0.3]nss
[R7-ospf-1-area-0.0.0.3]nssa no
[R7-ospf-1-area-0.0.0.3]nssa no-import-route
[R7-ospf-1-area-0.0.0.3]nssa no-summary
[R7-ospf-1-area-0.0.0.3]
[R8]ospf 1
[R8-ospf-1]area 3
[R8-ospf-1-area-0.0.0.3]nssa
[R8-ospf-1-area-0.0.0.3]
[R9]ospf 1
[R9-ospf-1]area 3
[R9-ospf-1-area-0.0.0.3]nssa
[R9-ospf-1-area-0.0.0.3]q
[R9-ospf-1]q
[R9]ospf 2
[R9-ospf-2]d
[R9-ospf-2]default
[R9-ospf-2]default-route-advertise
[R9-ospf-2]
加快收敛
所有设备对应接口都要配置,不然会导致建立邻居关系失败
[r3-Tunnel0/0/0]ospf timer hello 1
提高安全性
做一下area3到area4的接口认证,再做一下area的区域认证
[R9]interface GigabitEthernet 0/0/1
[R9-GigabitEthernet0/0/1]osp
[R9-GigabitEthernet0/0/1]ospf authen
[R9-GigabitEthernet0/0/1]ospf authentication-mode md5 1 c
[R9-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456
[R9-GigabitEthernet0/0/1]
[R10]interface GigabitEthernet 0/0/0
[R10-GigabitEthernet0/0/0]ospf au
[R10-GigabitEthernet0/0/0]ospf authentication-mode md5 1 c
[R10-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[R10-GigabitEthernet0/0/0]
[R1]ospf 1
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]au
[R1-ospf-1-area-0.0.0.1]authentication-mode md5 1 c
[R1-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
[R1-ospf-1-area-0.0.0.1]
[R2]ospf 1
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]au
[R2-ospf-1-area-0.0.0.1]authentication-mode md5 1 c
[R2-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
[R2-ospf-1-area-0.0.0.1]
[R3]ospf 1
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]au
[R3-ospf-1-area-0.0.0.1]authentication-mode md
[R3-ospf-1-area-0.0.0.1]authentication-mode md5 1 c
[R3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
[R3-ospf-1-area-0.0.0.1]
测试
R1环回 ping R4环回
R1环回 ping R10环回
R1环回 ping R12环回
R12环回 ping R10环回
总结
1.子网划分十分重要,尽量做到细致划分,方便后期做路由汇总
2.在area0,OSPF会和MGRE冲突,需要在中心站点开启伪广播,最好把站点的接口网络类型都该成p2mp,可以减少很多麻烦
3.要在R9上给area4下发一个缺省,不然R10中既没有缺省,也没有其他路由
4.更改hello和dead时间需要修改所有设备对应接口,不然会导致建立邻居关系失败