帧中继承载OSPF – 非广播(Non-Broadcast)
目标:
在R1,R4和R5之间的帧中继网络中配置OSPF,网络类型为non-broadcast,实现VLAN A, VLAN B和VLAN C的互通
配置指南:
• 在R1上配置接口Ethernet0/0地址为1.0.0.1/8
• 在R4上配置接口Ethernet0/0地址为4.0.0.4/8
• 在R5上配置接口Ethernet0/0地址为5.0.0.5/8
• 在R1上配置接口Seria0/0地址为10.0.0.1/8
• 在R4上配置接口Serial0/0地址为10.0.0.4/8
• 在R5上配置接口Serial0/0地址为10.0.0.5/8
• 在R1,R4和R5的Serial接口上配置帧中继封装(Frame Relay encapsulation)
• 在R4和R5上禁用帧中继反向地址解析(Frame-Relay Inverse-ARP)
• 在R1上配置静态映射,通过DCLI104到10.0.0.4和通过DLCI105到10.0.0.5
• 在R4上配置静态映射,通过DLCI401到10.0.0.1和10.0.0.5
• 在R5上配置静态映射,通过DLCI501到10.0.0.1 和10.0.0.4
• 在R4和R5配置Serial接口OSPF优先级为0
• 配置R1, R4和R5中所有接口加入area 0
• 在R1上配置对R4 和R5的邻居命令
自我提问:
• 在多点的帧中继接口(multipoint Frame Relay interface)上缺省的OSPF网络类型是什么?
• 这种网络类型中LSA是单播还是组播发送?
• 这种网络类型支持DR/BDR 选举吗?
• 这些属性对配置有什么影响?
最终配置和验证:
R1:
interface Ethernet0/0
ip address 1.0.0.1 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.1 255.0.0.0
encapsulation frame-relay
frame-relay map ip 10.0.0.4 104
frame-relay map ip 10.0.0.5 105
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
neighbor 10.0.0.4
neighbor 10.0.0.5
R4:
interface Ethernet0/0
ip address 4.0.0.4 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.4 255.0.0.0
encapsulation frame-relay
ip ospf priority 0
frame-relay map ip 10.0.0.1 401
frame-relay map ip 10.0.0.5 401
no frame-relay inverse-arp
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
R5:
interface Ethernet0/0
ip address 5.0.0.5 255.0.0.0
!
interface Serial0/0
ip address 10.0.0.5 255.0.0.0
encapsulation frame-relay
ip ospf priority 0
frame-relay map ip 10.0.0.1 501
frame-relay map ip 10.0.0.4 501
no frame-relay inverse-arp
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.0.0.4 0 FULL/DROTHER 00:01:58 10.0.0.4 serial0/0
10.0.0.5 0 FULL/DROTHER 00:01:49 10.0.0.5 serial0/0
R4#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.0.0.1 1 FULL/DR 00:01:47 10.0.0.1 serial0/0
R5#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
10.0.0.1 1 FULL/DR 00:01:56 10.0.0.1 serial0/0
R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
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
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, Ethernet0/0
O 4.0.0.0/8 [110/74] via 10.0.0.4, 00:01:49, Serial0/0
O 5.0.0.0/8 [110/74] via 10.0.0.5, 00:01:49, Serial0/0
C 10.0.0.0/8 is directly connected, Serial0/0
R4#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
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
Gateway of last resort is not set
O 1.0.0.0/8 [110/74] via 10.0.0.1, 00:02:26, Serial0/0
C 4.0.0.0/8 is directly connected, Ethernet0/0
O 5.0.0.0/8 [110/74] via 10.0.0.5, 00:02:26, Serial0/0
C 10.0.0.0/8 is directly connected, Serial0/0
R5#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
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
Gateway of last resort is not set
O 1.0.0.0/8 [110/74] via 10.0.0.1, 00:00:11, Serial0/0
O 4.0.0.0/8 [110/74] via 10.0.0.4, 00:00:11, Serial0/0
C 5.0.0.0/8 is directly connected, Ethernet0/0
C 10.0.0.0/8 is directly connected, Serial0/0
注解:
对于多点的帧中继接口缺省的网络类型是nonbroadcast,这种网络类型使用单播来传递OSPF hello包,像广播网络一样支持DR/BDR选举。由于hello数据包是单播,所以必须在DR和BDR上手动配置邻居。注意的是在例子的frame-relay map命令中没有使用broadcast选项,因为是单播不是组播包。
前面例子中提到了OSPF不支持抢占和对于hub-spoke网络的特殊要求,所以本例中在R4和R5这两个spoke路由器上配置优先级为0。
通过使用show ip ospf neighbor命令来验证邻居关系,使用show ip ospf interface命令来验证网络类型和DR/BDR。
还有一个有趣的现象就是在show ip route输出中的next-hop 值。比如R4的路由表可以看到到达网络5.0.0.0的下一跳为10.0.0.5,而物理上R4还是先要把数据包发送给R1。这也就是说R4必须有一个针对10.0.0.5地址的三层到二层的解析,同理针对Rr5必须有一个针对10.0.0.4的解析。
相关专题
- OSPF路由协议专题 (486篇文章)
- OSPF协议配置 (103篇文章)
- OSPF协议 (372篇文章)
- 将RIP、HELLO和EGP协议组合起来 (3次浏览)
- L2TP协议与IPSec在VPN网络中的应用 (0次浏览)
- 如何将RIP、HELLO和EGP协议组合起来 (0次浏览)




