R1(config-if)#ip address 12.0.0.1 255.255.255.0 R1(config-if)#no shu
R1(config)#inter lo 0
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R2(config-if)#ip address 12.0.0.2 255.255.255.0 R2(config-if)#no shu
R2(config)#inter s2/2
R2(config-if)#ip address 23.0.0.1 255.255.255.0
R2(config-if)#no shu
R2(config)#inter lo 0
R2(config-if)#ip address 2.2.2.2 255.255.255.0
R3(config-if)#ip add 23.0.0.2 255.255.255.0
R3(config-if)#no shu
R3(config)#inter s2/2
R3(config-if)#ip add 34.0.0.1 255.255.255.0
R3(config-if)#no shu
R3(config)#inter lo 0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R4(config-if)#ip add 34.0.0.2 255.255.255.0
R4(config-if)#no shu
R4(config)#inter lo 0
R4(config-if)#ip add 4.4.4.4 255.255.255.0
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 12.0.0.0 0.255.255.255 area 0
R1(config-router)#network 1.1.1.0 0.255.255.255 area 0
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 2.2.2.0 0.255.255.255 area 1 R2(config-router)#network 12.0.0.0 0.255.255.255 area 0
R2(config-router)#network 23.0.0.0 0.255.255.255 area 1
R3(config-router)#network 23.0.0.0 0.255.255.255 area 1
R3(config-router)#network 3.3.3.0 0.255.255.255 area 1
R3(config-router)#network 34.0.0.0 0.255.255.255 area 0
R3(config-router)#router-id 3.3.3.3
R4(config)#router ospf 1
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 34.0.0.0 0.255.255.255 area 0
R4(config-router)#network 4.4.4.0 0.255.255.255 area 0
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/65] via 12.0.0.2, 00:03:45, Serial2/1
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/129] via 12.0.0.2, 00:02:52, Serial2/1
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.0.0.0 [110/128] via 12.0.0.2, 00:03:54, Serial2/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial2/1
R2(config)#router ospf 1
R2(config-router)#area 1 virtual-link 3.3.3.3
R3(config-router)#area 1 virtual-link 2.2.2.2
Virtual Link OSPF_VL0 to router 3.3.3.3 is up
//建立,其中3.3.3.3为对方的routerID
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Serial2/2, Cost of using 64
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:02
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
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
//建立,2.2.2.2为对方的routerID
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Serial2/1, Cost of using 64
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:00
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
Last retransmission scan time is 0 msec, maximum is 0 msec
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
O 34.0.0.0 [110/192] via 12.0.0.2, 00:09:57, Serial2/1
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/65] via 12.0.0.2, 00:09:57, Serial2/1
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/129] via 12.0.0.2, 00:09:57, Serial2/1
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/193] via 12.0.0.2, 00:09:57, Serial2/1
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.0.0.0 [110/128] via 12.0.0.2, 00:09:57, Serial2/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, Serial2/1