routerA:
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Serial0/1
no ip address
encapsulation frame-relay
!
interface Serial0/1.2 point-to-point
ip address 192.1.1.1 255.255.255.0
frame-relay interface-dlci 102
!
interface Serial0/1.3 point-to-point
ip address 192.1.2.1 255.255.255.0
frame-relay interface-dlci 103
!
router ospf 10
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 0
network 192.1.1.0 0.0.0.255 area 0
network 192.1.2.0 0.0.0.255 area 0
routerB:
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial0/2
ip address 192.1.1.2 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-point
!
router ospf 10
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 192.1.1.0 0.0.0.255 area 0
routerC:
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Serial0/3
ip address 192.1.2.3 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-point
!
router ospf 10
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 192.1.2.0 0.0.0.255 area 0
看一下邻居状态,因为是点到点的,所以是full状态
routerA#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:00:32 192.1.2.3 Serial0/1.3
2.2.2.2 0 FULL/ - 00:00:39 192.1.1.2 Serial0/1.2
routerB#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 0 FULL/ - 00:00:35 192.1.1.1 Serial0/2
routerC#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 0 FULL/ - 00:00:35 192.1.2.1 Serial0/3
路由能够互相学到
routerA#sh ip route
Gateway of last resort is not set
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 2.2.2.2 [110/65] via 192.1.1.2, 00:06:25, Serial0/1.2
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/65] via 192.1.2.3, 00:06:25, Serial0/1.3
C 192.1.1.0/24 is directly connected, Serial0/1.2
C 192.1.2.0/24 is directly connected, Serial0/1.3
routerB#sh ip route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 192.1.1.1, 00:06:41, Serial0/2
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/129] via 192.1.1.1, 00:06:41, Serial0/2
C 192.1.1.0/24 is directly connected, Serial0/2
O 192.1.2.0/24 [110/128] via 192.1.1.1, 00:06:41, Serial0/2
routerC#sh ip route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 192.1.2.1, 00:07:15, Serial0/3
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/129] via 192.1.2.1, 00:07:15, Serial0/3
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
O 192.1.1.0/24 [110/128] via 192.1.2.1, 00:07:15, Serial0/3
C 192.1.2.0/24 is directly connected, Serial0/3
转载于:https://blog.51cto.com/cbbzyj/402331