实验拓扑:
1.要求全网运行OSPF协议实现互通,5台设备的环回口可以相互之间 ping 通
2.R5 的环回口,通过路由引入的方式进入OSPF 协议中
3.骨干区域 Area 0 ,采用区域认证,认证类型为明文simple ,密钥为 huawei
一:配置各互联接口的IP地址跟环回口IP地址
二:按要求配置OSPF协议和area 0的区域认证
R1上配置OSPF:
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
authentication-mode simple plain huawei
network 192.168.123.1 0.0.0.0
network 1.1.1.1 0.0.0.0
area 0.0.0.1
network 192.168.14.1 0.0.0.0
area 0.0.0.2
network 192.168.15.1 0.0.0.0
#
R2上配置OSPF:
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
authentication-mode simple plain huawei
network 192.168.123.2 0.0.0.0
network 2.2.2.2 0.0.0.0
#
R3上配置OSPF:
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
authentication-mode simple plain huawei
network 3.3.3.3 0.0.0.0
network 192.168.123.3 0.0.0.0
#
R4上配置OSPF:
#
ospf 10 router-id 4.4.4.4
area 0.0.0.1
network 4.4.4.4 0.0.0.0
network 192.168.14.4 0.0.0.0
#
R5上配置OSPF:
#
ospf 1 router-id 5.5.5.5
area 0.0.0.2
network 192.168.15.5 0.0.0.0
#
三:在R5上OSPF引入直连Loopback 0路由,修改cost值为30、类型type-1
#
acl number 2000
rule 5 permit source 5.5.5.0 0.0.0.255
#
route-policy 10 permit node 1
if-match acl 2000
apply cost 30
apply cost-type type-1
#
ospf 1 router-id 5.5.5.5
import-route direct route-policy 10
#
四:结果验证
本文暂时没有评论,来添加一个吧(●'◡'●)