配置OSPF邻接路由器和区域路由器认证
http://p2.images22.51img1.com/6000/gzb7115037/2a3dd6f38f48d303e05f95c310adb3fe.jpgR1serial0/0---R0serial0/0
R1serial0/2--R2serial0/2
R1serial0/3--R3serial0/3
R1:
conf t
interface serial0/0
ip add 192.168.2.1 255.255.255.0
clock rate 64000
ip ospf message-digest-key 1 md5 cisco
no shutdown
interface serial0/3
ip add 192.168.1.1 255.255.255.0
clock rate 64000
ip ospf message-digest-key 1 md5 cisco
no shutdown
interface serial0/2
ip add 10.0.0.1 255.255.255.0
clock rate 64000
ip ospf message-digest-key 1 md5 cisco
no shutdown
router ospf 1
network 10.0.0.1 0.0.0.0 area 1
network 192.168.1.10.0.0.0 area 0
network 192.168.2.10.0.0.0 area 0
area 1 authentication message-digest
area 0 authentication message-digest
R2:
conf t
interface serial0/2
ip add 10.0.0.2255.255.255.0
clock rate 64000
ip ospf message-digest-key 1 md5 cisco
no shutdown
router ospf 1
network 10.0.0.20.0.0.0 area 1
area 1 authentication message-digest
R0:
conf t
interface serial0/0
ip add 192.168.2.2255.255.255.0
clock rate 64000
ip ospf message-digest-key 1 md5 cisco
no shutdown
router ospf 1
network 192.168.2.20.0.0.0area 0
area 0 authentication message-digest
R3:
conf t
interface serial0/3
ip add 192.168.1.2255.255.255.0
clock rate 64000
ip ospf message-digest-key 1 md5 cisco
no shutdown
router ospf 1
network 192.168.1.20.0.0.0area 0
area 0 authentication message-digest
R2#show ip route
<output omitted>
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Serial0/2
O IA 192.168.1.0/24 via 10.0.0.1, 00:31:17, Serial0/2
O IA 192.168.2.0/24 via 10.0.0.1, 00:32:16, Serial0/2
已经学到所有区域的路由了,我们再来看看R1上OSPF邻居路由器的建立关系
r1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.1.2 0 FULL/- 00:00:30 192.168.1.2 Serial0/3
192.168.2.2 0 FULL/- 00:00:32 192.168.2.2 Serial0/0
10.0.0.2 0 FULL/- 00:00:34 10.0.0.2 Serial0/2
对不对,是不是已经都与每个邻接路由器建立完全邻接关系呢!
好,下面进行debug命令排错。
debug ip ospf adj
r1#
*Mar1 00:44:35.647: OSPF: Send with youngest Key 1
*Mar1 00:44:35.663: OSPF: Send with youngest Key 1
*Mar1 00:44:36.303: OSPF: Send with youngest Key 1
r1#
*Mar1 00:44:45.647: OSPF: Send with youngest Key 1
*Mar1 00:44:45.663: OSPF: Send with youngest Key 1
*Mar1 00:44:46.303: OSPF: Send with youngest Key 1
r1#
*Mar1 00:44:55.647: OSPF: Send with youngest Key 1
*Mar1 00:44:55.663: OSPF: Send with youngest Key 1
*Mar1 00:44:56.303: OSPF: Send with youngest Key 1
r1#
*Mar1 00:45:05.647: OSPF: Send with youngest Key 1
*Mar1 00:45:05.663: OSPF: Send with youngest Key 1
*Mar1 00:45:06.303: OSPF: Send with youngest Key 1
r1#
*Mar1 00:45:15.647: OSPF: Send with youngest Key 1
*Mar1 00:45:15.663: OSPF: Send with youngest Key 1
*Mar1 00:45:16.303: OSPF: Send with youngest Key 1
r1#
*Mar1 00:45:25.647: OSPF: Send with youngest Key 1
*Mar1 00:45:25.663: OSPF: Send with youngest Key 1
*Mar1 00:45:26.303: OSPF: Send with youngest Key 1
r1#
*Mar1 00:45:35.647: OSPF: Send with youngest Key 1
*Mar1 00:45:35.663: OSPF: Send with youngest Key 1
*Mar1 00:45:36.303: OSPF: Send with youngest Key 1
路由器分别与3台邻接路由器交换KEY1的密匙,所以上面的实验已经完全成立。 {:6_290:}
页:
[1]