使用前面的拓扑
hostname R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Serial0.1 point-to-point
ip address 192.168.1.1 255.255.255.0
frame-relay interface-dlci 100 //必须在每一个子接口指定dlci号
!
interface Serial0.2 point-to-point
ip address 192.168.2.1 255.255.255.0
frame-relay interface-dlci 200 //必须在每一个子接口指定dlci号
ip address 1.1.1.1 255.255.255.255
!
interface Serial0.1 point-to-point
ip address 192.168.1.1 255.255.255.0
frame-relay interface-dlci 100 //必须在每一个子接口指定dlci号
!
interface Serial0.2 point-to-point
ip address 192.168.2.1 255.255.255.0
frame-relay interface-dlci 200 //必须在每一个子接口指定dlci号
router ospf 1
network 1.1.1.1 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 1.1.1.1 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
hostname R2
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Serial1
ip address 192.168.1.2 255.255.255.0
encapsulation frame-relay
frame-relay map ip 192.168.1.1 100 broadcast
!
router ospf 1
network 2.2.2.2 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
!
ip address 192.168.1.2 255.255.255.0
encapsulation frame-relay
frame-relay map ip 192.168.1.1 100 broadcast
!
router ospf 1
network 2.2.2.2 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
!
hostname R3
no ip domain-lookup
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial1
ip address 192.168.2.2 255.255.255.0
encapsulation frame-relay
frame-relay map ip 192.168.2.1 200 broadcast
!
router ospf 1
network 3.3.3.3 0.0.0.0 area 0
network 192.168.2.0 0.0.0.255 area 0
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial1
ip address 192.168.2.2 255.255.255.0
encapsulation frame-relay
frame-relay map ip 192.168.2.1 200 broadcast
!
router ospf 1
network 3.3.3.3 0.0.0.0 area 0
network 192.168.2.0 0.0.0.255 area 0
转载于:https://blog.51cto.com/xiaomu205/150884