目标:
在R1
,R4
和R5
之间的帧中继网络中配置OSPF
,网络类型为point-to-multipoint
,实现VLAN A, VLAN B
和VLAN C
的互通。R4
和R5
通过三层路由而不是静态映射来解析三层地址。
配置指南:
• 在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接口上配置帧中继封装
• 在R4和R5上禁用帧中继反向地址解析
• 在R1上配置静态映射,通过DCLI104到10.0.0.4和通过DLCI105到10.0.0.5
• 在R4上配置静态映射,通过DLCI401到10.0.0.1
• 在R5上配置态映射,通过DLCI501到10.0.0.1
• R4和R5之间不配置静态映射
• 确保链路支持广播和多播数据包传递
• 在R1, R4,
和R5
的Serial
接口上配置OSPF
网络类型为point-to-multipoint
• 配置R1, R4和R5中所有接口加入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