一,帧中继配置
r1(config)#inter lo 0
r1(config-if)#ip add 1.1.1.1 255.255.255.0
r1(config-if)#ip ospf network point-to-p 改变环回口主机路由属性
r1(config-if)#inter s1/2
r1(config-if)#en frame-relay
r1(config-if)#ip add 178.1.1.1 255.255.255.0
r1(config-if)#no frame-relay inverse-arp
r1(config-if)#frame-relay map ip 178.1.1.7 107 broadcast
r1(config-if)#frame-relay map ip 178.1.1.8 108 broadcast
r1(config-if)#no shutdown
r8(config)#inter lo 0
r8(config-if)#ip add 8.8.8.8 255.255.255.0
r8(config-if)#ip ospf network point-to-p
r8(config-if)#inter s1/2
r8(config-if)#en frame-relay
r8(config-if)#no frame-relay inv
r8(config-if)#ip add 178.1.1.8 255.255.255.0
r8(config-if)#frame-relay map ip 178.1.1.1 801 br
r8(config-if)#frame-relay map ip 178.1.1.7 801 br
r8(config-if)#no shutdown
r7(config)#inter lo 0
r7(config-if)#ip add 7.7.7.7 255.255.255.0
r7(config-if)#ip ospf network point-to-p
r7(config-if)#inter s1/2
r7(config-if)#en frame-relay
r7(config-if)#no frame-relay inverse-arp
r7(config-if)#ip add 178.1.1.7 255.255.255.0
r7(config-if)#frame-relay map ip 178.1.1.1 701 br
r7(config-if)#frame-relay map ip 178.1.1.8 701 br
二,OSPF配置
r1(config)#router ospf 1
r1(config-router)#router-id 1.1.1.1
r1(config-router)#net 1.1.1.1 0.0.0.0 area 0
r1(config-router)#net 178.1.1.1 0.0.0.0 area 0
r1(config-router)#neighbor 178.1.1.7
r1(config-router)#neighbor 178.1.1.8
r8(config)#router ospf 1
r8(config-router)#router-id 8.8.8.8
r8(config-router)#net 8.8.8.8 0.0.0.0 area 0
r8(config-router)#net 178.1.1.8 0.0.0.0 area 0
r8(config)#inter s1/2
r8(config-if)#ip ospf pri 0 配置成为DR other,以确保R1成为DR
r7(config)#router ospf 1
r7(config-router)#router-id 7.7.7.7
r7(config-router)#net 7.7.7.7 0.0.0.0 area 0
r7(config-router)#net 178.1.1.7 0.0.0.0 area 0
r7(config)#inter s1/2
r7(config-if)#ip ospf pri 0 配置成为DR other,以确保R1成为DR
三,如果各路由器需要ping 自己,需要添加映射
r8(config)#inter s1/2
r8(config-if)#frame-relay map ip 178.1.1.8 801
r7(config)#inter s1/2
r7(config-if)#frame-relay map ip 178.1.1.7 701
r1(config)#inter s1/2
r1(config-if)#frame-relay map ip 178.1.1.8 108
四,查看路由表
r1#show ip ro os
7.0.0.0/24 is subnetted, 1 subnets
O 7.7.7.0 [110/65] via 178.1.1.7, 00:06:08, Serial1/2
8.0.0.0/24 is subnetted, 1 subnets
O 8.8.8.0 [110/65] via 178.1.1.8, 00:06:08, Serial1/2
r8#show ip ro os
1.0.0.0/24 is subnetted, 1 subnets
O 1.1.1.0 [110/65] via 178.1.1.1, 00:06:14, Serial1/2
7.0.0.0/24 is subnetted, 1 subnets
O 7.7.7.0 [110/65] via 178.1.1.7, 00:06:14, Serial1/2
r7#show ip ro os
1.0.0.0/24 is subnetted, 1 subnets
O 1.1.1.0 [110/65] via 178.1.1.1, 00:08:09, Serial1/2
8.0.0.0/24 is subnetted, 1 subnets
O 8.8.8.0 [110/65] via 178.1.1.8, 00:08:09, Serial1/2