- 积分
- 985
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 最后登录
- 1970-1-1
- 阅读权限
- 40
- 听众
- 收听
中级工程师
   
|

R1serial0/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.1 0.0.0.0 area 0
network 192.168.2.1 0.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.2 255.255.255.0
clock rate 64000
ip ospf message-digest-key 1 md5 cisco
no shutdown
router ospf 1
network 10.0.0.2 0.0.0.0 area 1
area 1 authentication message-digest
R0:
conf t
interface serial0/0
ip add 192.168.2.2 255.255.255.0
clock rate 64000
ip ospf message-digest-key 1 md5 cisco
no shutdown
router ospf 1
network 192.168.2.2 0.0.0.0 area 0
area 0 authentication message-digest
R3:
conf t
interface serial0/3
ip add 192.168.1.2 255.255.255.0
clock rate 64000
ip ospf message-digest-key 1 md5 cisco
no shutdown
router ospf 1
network 192.168.1.2 0.0.0.0 area 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 [110/128] via 10.0.0.1, 00:31:17, Serial0/2
O IA 192.168.2.0/24 [110/128] 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#
*Mar 1 00:44:35.647: OSPF: Send with youngest Key 1
*Mar 1 00:44:35.663: OSPF: Send with youngest Key 1
*Mar 1 00:44:36.303: OSPF: Send with youngest Key 1
r1#
*Mar 1 00:44:45.647: OSPF: Send with youngest Key 1
*Mar 1 00:44:45.663: OSPF: Send with youngest Key 1
*Mar 1 00:44:46.303: OSPF: Send with youngest Key 1
r1#
*Mar 1 00:44:55.647: OSPF: Send with youngest Key 1
*Mar 1 00:44:55.663: OSPF: Send with youngest Key 1
*Mar 1 00:44:56.303: OSPF: Send with youngest Key 1
r1#
*Mar 1 00:45:05.647: OSPF: Send with youngest Key 1
*Mar 1 00:45:05.663: OSPF: Send with youngest Key 1
*Mar 1 00:45:06.303: OSPF: Send with youngest Key 1
r1#
*Mar 1 00:45:15.647: OSPF: Send with youngest Key 1
*Mar 1 00:45:15.663: OSPF: Send with youngest Key 1
*Mar 1 00:45:16.303: OSPF: Send with youngest Key 1
r1#
*Mar 1 00:45:25.647: OSPF: Send with youngest Key 1
*Mar 1 00:45:25.663: OSPF: Send with youngest Key 1
*Mar 1 00:45:26.303: OSPF: Send with youngest Key 1
r1#
*Mar 1 00:45:35.647: OSPF: Send with youngest Key 1
*Mar 1 00:45:35.663: OSPF: Send with youngest Key 1
*Mar 1 00:45:36.303: OSPF: Send with youngest Key 1
路由器分别与3台邻接路由器交换KEY1的密匙,所以上面的实验已经完全成立。 |
-
|