R1 OSPF配置:
router ospf 1
router-id 1.1.1.1
network 10.1.12.0 0.0.0.255 area 0
network 12.1.1.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0
R2 OSPF配置:
router ospf 1
router-id 2.2.2.2
network 10.1.12.0 0.0.0.255 area 0
network 10.1.23.0 0.0.0.255 area 0
R3 OSPF配置:
router ospf 1
router-id 3.3.3.3
network 10.1.23.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
三、OSPF配置验证
R1查看OSPF路由学习正常
R2查看OSPF路由:
R3查看OSPF路由:
三、ACL配置
access-list 1 deny 10.1.12.2 配置拒绝源
access-list 100 deny ospf any any 配置拒绝ospf所有报文
R1(config)#int e 0/1
R1(config-if)#ip access-group 100 in
此时OSPF邻居关系建立失败