实验拓扑
实验需求
- 运行ospf协议
- 区域234为total stub
- R6可以与整个网络通信
- 区域0要求md5认证
- 网络通过R1访问外部R7(下发默认路由,不考虑nat)
- 修改开销使R4优先走34段。
实验配置
R1:
#
router id 1.1.1.1
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface GigabitEthernet0/0/0
ip address 192.168.123.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 100.1.1.1 255.255.255.0
#
ospf 1
default-route-advertise always
area 0.0.0.0
authentication-mode md5 1 cipher %$%$d8.n(vaJ;VV:T=,04u\M/E$;%$%$
network 1.1.1.1 0.0.0.0
network 192.168.123.0 0.0.0.255
area 0.0.0.1
#
ip route-static 0.0.0.0 0.0.0.0 100.1.1.7
R2:
#
router id 2.2.2.2
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
interface GigabitEthernet0/0/0
ip address 192.168.123.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.24.2 255.255.255.0
#
ospf 1
area 0.0.0.0
authentication-mode md5 1 cipher %$%$>:w!D!1dS-W.g(=<V.^O/Kxw%$%$
network 2.2.2.2 0.0.0.0
network 192.168.123.0 0.0.0.255
area 0.0.0.234
network 192.168.24.0 0.0.0.255
stub no-summary
R3:
#
router id 3.3.3.3
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
interface GigabitEthernet0/0/0
ip address 192.168.123.3 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.34.3 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 192.168.35.3 255.255.255.0
#
ospf 1
area 0.0.0.0
authentication-mode md5 1 cipher %$%$wV=2"am%DBuGy<*2bX6)/L;k%$%$
network 3.3.3.3 0.0.0.0
network 192.168.123.0 0.0.0.255
area 0.0.0.35
network 192.168.35.0 0.0.0.255
vlink-peer 5.5.5.5
area 0.0.0.234
network 192.168.34.0 0.0.0.255
stub no-summary
R4:
#
router id 4.4.4.4
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
interface GigabitEthernet0/0/0
ip address 192.168.24.4 255.255.255.0
ospf cost 1000
#
interface GigabitEthernet0/0/1
ip address 192.168.34.4 255.255.255.0
#
ospf 1
area 0.0.0.234
network 4.4.4.4 0.0.0.0
network 192.168.24.0 0.0.0.255
network 192.168.34.0 0.0.0.255
stub no-summary
R5:
#
router id 5.5.5.5
#
interface LoopBack0
ip address 5.5.5.5 255.255.255.255
#
interface GigabitEthernet0/0/0
ip address 192.168.35.5 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 192.168.56.5 255.255.255.0
#
ospf 1
area 0.0.0.0
authentication-mode md5 1 cipher %$%$`<{)Y7(mT9GUc:;9L+l)06J^%$%$
area 0.0.0.35
network 5.5.5.5 0.0.0.0
network 192.168.35.0 0.0.0.255
vlink-peer 3.3.3.3
area 0.0.0.56
network 192.168.56.0 0.0.0.255
R6:
#
router id 6.6.6.6
#
interface LoopBack0
ip address 6.6.6.6 255.255.255.255
#
interface GigabitEthernet0/0/0
ip address 192.168.56.6 255.255.255.0
#
interface GigabitEthernet0/0/1
#
#
ospf 1
area 0.0.0.56
network 6.6.6.6 0.0.0.0
network 192.168.56.0 0.0.0.255
R7:
#
interface GigabitEthernet0/0/0
ip address 100.1.1.7 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 100.1.1.1
大坑!!!
在R3与R5之间建立虚链接的时候,R5也要设置认证,否则虚链接建立不了!