实验室之OSPF篇:帧中继承载OSPF – 点对多点(Point-to-Multipoint)

来源: 作者: 2007-12-03 出处:pcdog.com

arp  cisco  vlan  xml  广播  

帧中继承载OSPF – 点对多点(Point-to-Multipoint)

目标:

在R1,R4和R5之间的帧中继网络中配置OSPF,网络类型为point-to-multipoint,实现VLAN A, VLAN B和VLAN C的互通。R4和R5通过三层路由而不是静态映射来解析三层地址。

实验室之OSPF篇:帧中继承载OSPF – 点对多点(Point-to-Multipoint)


配置指南:

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,R4R5Serial接口上配置帧中继封装

R4R5上禁用帧中继反向地址解析

R1上配置静态映射,通过DCLI10410.0.0.4和通过DLCI10510.0.0.5

R4上配置静态映射,通过DLCI40110.0.0.1

R5上配置态映射,通过DLCI50110.0.0.1

R4R5之间不配置静态映射

确保链路支持广播和多播数据包传递

在R1, R4, 和R5的Serial接口上配置OSPF网络类型为point-to-multipoint

配置R1, R4R5中所有接口加入area 0

自我提问:

帧中继网络中缺省的OSPF网络类型是什么?

point-to-multipoint的网络类型和其他网络类型有什么不同?

这种网络类型中LSA是单播还是组播发送?

这种类型会对三层到二层的解析产生什么 影响?

point-to-multipoint的网络类型对下一跳的处理和其他网络类型有什么不同?

这种类型会对是否配置需要配置三层到二层的解析产生什么影响?

最终配置和验证:

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

ip ospf network point-to-multipoint

frame-relay map ip 10.0.0.4 104 broadcast

frame-relay map ip 10.0.0.5 105 broadcast

!

router ospf 1

network 0.0.0.0 255.255.255.255 area 0

 

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 network point-to-multipoint

frame-relay map ip 10.0.0.1 401 broadcast

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 network point-to-multipoint

frame-relay map ip 10.0.0.1 501 broadcast

no frame-relay inverse-arp

!

router ospf 1

network 0.0.0.0 255.255.255.255 area 0

 

R1#show frame-relay map

Serial0 (up): ip 10.0.0.4 dlci 104(0x68,0x1880), static,

broadcast,

CISCO, status defined, active

Serial0 (up): ip 10.0.0.5 dlci 105(0x69,0x1890), static,

broadcast,

CISCO, status defined, active

R4#show frame-relay map

Serial0 (up): ip 10.0.0.1 dlci 401(0x191,0x6410), static,

broadcast,

CISCO, status defined, active

R5#show frame-relay map

Serial0 (up): ip 10.0.0.1 dlci 501(0x191,0x6410), static,

broadcast,

CISCO, status defined, active

R1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

10.0.0.5 1 FULL/ - 00:01:49 10.0.0.5 Serial0/0

10.0.0.4 1 FULL/ - 00:01:49 10.0.0.4 Serial0/0

R4#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface

10.0.0.1 1 FULL/ - 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/ - 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, 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

O 4.0.0.0/8 [110/74] via 10.0.0.4, 00:55:30, Serial0

O 5.0.0.0/8 [110/74] via 10.0.0.5, 00:55:30, Serial0

10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

C 10.0.0.0/8 is directly connected, Serial0

O 10.0.0.4/32 [110/64] via 10.0.0.4, 00:55:30, Serial0

O 10.0.0.5/32 [110/64] via 10.0.0.5, 00:55:30, Serial0

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, 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, 02:32:17, Serial0

C 4.0.0.0/8 is directly connected, Ethernet0

O 5.0.0.0/8 [110/138] via 10.0.0.1, 02:32:17, Serial0

10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

C 10.0.0.0/8 is directly connected, Serial0

O 10.0.0.1/32 [110/64] via 10.0.0.1, 02:32:17, Serial0

O 10.0.0.5/32 [110/128] via 10.0.0.1, 02:32:17, Serial0

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, 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:44:06, Serial0

O 4.0.0.0/8 [110/138] via 10.0.0.1, 00:44:06, Serial0

C 5.0.0.0/8 is directly connected, Ethernet0

10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

C 10.0.0.0/8 is directly connected, Serial0

O 10.0.0.1/32 [110/64] via 10.0.0.1, 00:44:06, Serial0

O 10.0.0.4/32 [110/128] via 10.0.0.1, 00:44:06, Serial0

R4#ping 10.0.0.5

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.0.0.5, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 116/116/120 ms

R4#ping 5.0.0.5

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 5.0.0.5, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 116/116/120 ms

R1#sh ip ospf interface

Serial0 is up, line protocol is up

Internet Address 10.0.0.1/8, Area 0

Process ID 1, Router ID 10.0.0.1, Network Type POINT_TO_MULTIPOINT,

Neighbor Count is 2, Adjacent neighbor count is 2

Adjacent with neighbor 10.0.0.4

Adjacent with neighbor 10.0.0.5

 

注解:

不像前面提到的broadcast 和non-broadcast, 网络类型为point-to-multipoint的网络不需要DR和BDR的选举。发送hello数据包到组播地址224.0.0.5,因此在NBMA网络中如果是点到多点就必须支持广播。由于对于多点帧中继接口缺省网络类型是non-broadcast, 因此point-to-multipoint的网络类型必须通过命令ip ospf network point-to-multipoint在相应接口配置。和前面提到网络类型在功能上的最大不同就是在非广播媒介中怎么对下一跳解析的处理。这种网络类型会把网络认为是多个点到点链路的集合而不是一个扁平的广播网络。对于非广播和广播网络,OSPF 不知道真实的二层网络拓扑,在NBMA网络中更新传递时下一跳值是不会被修改的,这也就意味着对任何注入路由到网络的设备都必须有三层到二层的解析。对于点到多点的网络进行路由宣告时,下一跳值会被修改为直连的邻居地址,这也就意味着只需要对直连邻居进行三层到二层的解析。

在上述例子中R5学到的R4宣告的路由的下一跳被修改为R1的地址10.0.0.1,对于R4学到的R5宣告的路由同样。这样所有的数据包都会封装至10.0.0.1,就不需要R4和R5之间的三层二层映射,而是通过三层路由来告知其通过R1到达目的地。至于另外网络类型下一跳的处理参考前面的例子。

除了对下一跳处理不同以外,还有就是处理宣告点对多点对端为主机路由而不是实际的网络,我们可以参看一下R1,R4和R5的路由输出。R4到达R5的10.0.0.5不是通过映射而是通过三层路由。当这个网络被宣告到剩余的OSPF domain的话只是主机路由,比如看到的只是10.0.0.1/32,10.0.0.4/32, 和10.0.0.5/32 来代表网络10.0.0.0/8


更多内容请看PCdog.com--OSPF路由协议  OSPF协议  OSPF协议配置专题
上一篇:实验室之OSPF篇:帧中继承载OSPF- 点对多点 非广播(Point-to-Multipoint No-broadcast)
下一篇:实验室之OSPF篇:OSPF DR和BDR选举