本实验是用于解决糟糕的设计,area0被area其他区分裂开了。各个路由器上的预配置R1(config)#int lo0R1(config-if)#ip add 1.1.1.1 255.255.255
.
本实验是用于解决糟糕的设计,area0被area其他区分裂开了。
各个路由器上的预配置
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#int s2/1
R1(config-if)#ip add 12.1.1.1 255.255.255.0
R1(config-if)#no sh
R1(config)#router os 11
R1(config-router)#net 1.1.1.1 0.0.0.255 a 0
R1(config-router)#net 12.1.1.1 0.0.0.255 a 0
R1(config-router)#end
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#int s2/1
R2(config-if)#ip add 12.1.1.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int s2/2
R2(config-if)#ip add 23.1.1.2 255.255.255.0
R2(config-if)#no sh
R2(config)#router os 11
R2(config-router)#router-id 2.2.2.2(指定router-id )
R2(config-router)#net 2.2.2.2 0.0.0.0 a 0
R2(config-router)#net 12.1.1.2 0.0.0.0 a 0
R2(config-router)#net 23.1.1.2 0.0.0.0 a 1
R2(config-router)#end
R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#int s2/1
R3(config-if)#ip add 23.1.1.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int s2/2
R3(config-if)#ip add 34.1.1.3 255.255.255.0
R3(config-if)#no sh
R3(config)#router os 11
R3(config-router)#net 1.1.1.1 0.0.0.0 a 1
R3(config-router)#net 23.1.1.3 0.0.0.0 a 1
R3(config-router)#net 34.1.1.3 0.0.0.0 a 1
R3(config-router)#end
R4(config)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.0
R4(config-if)#int s2/1
R4(config-if)#ip add 34.1.1.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#int s2/2
R4(config-if)#ip add 45.1.1.4 255.255.255.0
R4(config-if)#no sh
R4(config)#router os 11
R4(config-router)#router-id 4.4.4.4(指定router-id)
R4(config-router)#net 4.4.4.4 0.0.0.0 a 0
R4(config-router)#net 34.1.1.4 0.0.0.0 area 1
R4(config-router)#net 45.1.1.4 0.0.0.0 area 0
R4(config-router)#end
R5(config)#int lo0
R5(config-if)#ip add 5.5.5.5 255.255.255.0
R5(config-if)#int s2/2
R5(config-if)#ip add 45.1.1.5 255.255.255.0
R5(config-if)#no sh
R5(config)#router os 11
R5(config-router)#net 5.5.5.5 0.0.0.0 a 0
R5(config-router)#net 45.1.1.5 0.0.0.0 a 0
R5(config-router)#exit
实验过程:
第一步:在R2上配置虚链路
R2(config-router)#exit
R4#
*Nov 21 14:42:18.667: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 23.1.1.2, Serial2/1
//在R4上收到错误的日志消息
第二步:在R4上配置虚链路并查看
R4#sh ip o v
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
//到R2的虚链路已经建立成功
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Serial2/1, Cost of using 128
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:07
Adjacency State FULL (Hello suppressed)
//虚链路关系正常
Index 2/3, retransmission queue length 0, number of retransmission 1
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 1, maximum is 1
Last retransmission scan time is 0 msec, maximum is 0 msec
R4#
第三步:在R4上查看虚链路和建立过程
Nov 21 15:26:08.791: OSPF: 2 Way Communication to 2.2.2.2 on OSPF_VL0, state 2WAY
Nov 21 15:26:08.795: OSPF: Send DBD to 2.2.2.2 on OSPF_VL0 seq 0x1E63 opt 0x72 flag 0x7 len 32
Nov 21 15:26:08.827: OSPF: Rcv DBD from 2.2.2.2 on OSPF_VL0 seq 0xEF7 opt 0x72 flag 0x7 len 32 mtu 0 state EXSTART
Nov 21 15:26:08.831: OSPF: First DBD and we are not SLAVE
Nov 21 15:26:08.843: OSPF: Rcv DBD from 2.2.2.2 on OSPF_VL0 seq 0x1E63 opt 0x72 flag 0x2 len 152 mtu 0 state EXSTART
Nov 21 15:26:08.847: OSPF: NBR Negotiation Done. We are the MASTER
Nov 21 15:26:08.847: OSPF: Send DBD to 2.2.2.2 on OSPF_VL0 seq 0x1E64 opt 0x72 flag 0x3 len 232
Nov 21 15:26:08.923: OSPF: Rcv DBD from 2.2.2.2 on OSPF_VL0 seq 0x1E64 opt 0x72 flag 0x0 len 32 mtu 0 state EXCHANGE
Nov 21 15:26:08.927: OSPF: Send DBD to 2.2.2.2 on OSPF_VL0 seq 0x1E65 opt 0x72 flag 0x1 len 32
Nov 21 15:26:08.931: OSPF: Send LS REQ to 2.2.2.2 length 12 LSA count 1
Nov 21 15:26:08.963: OSPF: Rcv LS REQ from 2.2.2.2 on OSPF_VL0 length 96 LSA count 6
Nov 21 15:2
R4#6:08.967: OSPF: Send UPD to 23.1.1.2 on OSPF_VL0 length 280 LSA count 6
Nov 21 15:26:08.991: OSPF: Rcv DBD from 2.2.2.2 on OSPF_VL0 seq 0x1E65 opt 0x72 flag 0x0 len 32 mtu 0 state EXCHANGE
Nov 21 15:26:08.991: OSPF: Exchange Done with 2.2.2.2 on OSPF_VL0
Nov 21 15:26:08.995: OSPF: Rcv LS UPD from 2.2.2.2 on OSPF_VL0 length 88 LSA count 1
Nov 21 15:26:08.995: OSPF: Synchronized with 2.2.2.2 on OSPF_VL0, state FULL
Nov 21 15:26:08.999: %OSPF-5-ADJCHG: Process 11, Nbr 2.2.2.2 on OSPF_VL0 from LOADING to FULL, Loading Done
//这里是ospf起来了
Nov 21 15:26:09.091: OSPF: Build router LSA for area 0, router ID 4.4.4.4, seq 0x80000004
R4#
*Nov 21 15:26:11.871: OSPF: Rcv LS UPD from 3.3.3.3 on Serial2/1 length 56 LSA count 1
第四步:小小测试