帧中继水平分割问题

时间:2011-10-26 15:02来源:未知 作者:admin 点击:126次
帧中继上的水平分割问题!图 中所示拓扑topoly1,图中R1和R2,R1和R3之间有PVC存在,而R2和R3之间没有PVC.在R1,R2,R3配置RiP路由协议,如过在 R1的S0/0借口开启水平分割,则路由更新将会出现问题R3把192.168.1.0/24路由通过帧中继链路广播给R1,R1路由表中将会有该

帧中继上的水平分割问题!图 中所示拓扑topoly1,图中R1和R2,R1和R3之间有PVC存在,而R2和R3之间没有PVC.在R1,R2,R3配置RiP路由协议,如过在 R1的S0/0借口开启水平分割,则路由更新将会出现问题R3把192.168.1.0/24路由通过帧中继链路广播给R1,R1路由表中将会有该路由, 然而由于水平分割的原因,R1并不会把该路由从S0/0借口广播出去.结果将导致R2没有192.168.1.0/24的路由,同样,R1将有 172.16.0.0/16的路由,而R3没有172.16.0.0/16路由.
  解决该问题的方法有几种:
1.第一种方法是在R1上把水平分割关掉,实际上如果在S0/0封状了帧中继.CISCO路由器默认会把水平分割关闭!
 手工关闭水平分割的命令为:
Router(config)#int S0/0
 Router(config-if)#no ip split –horizon

2.解决水平分割的第二种方法是在R2和R3之间增加一条PVC,这样R3会把192.168.1.0/24的路由通过该PVC广播给R2,然而这样会增加通信费用!

3.第三种方法通过子接口
 所谓子接口实际上是一个逻辑的接口,并不存在真正物理上的子接口.子接口有两中类型:点到点,点到多点,采用点到点子接口时,每一个子接口用来连接一 条PVC,每条PVC的另一端连接到另一路由器的一个子接口或物理接口.这种子接口的连通与通过物理接口的点对点连接效果是一样的,所以路由器从一个子借 口收到路由广播,会把路由广播从另一子接口发送出去解决了水平分割问题!
点到点子接口,。每一对点到点的连接都是在不同的子网,点对点子接口配置、
(1)对主接口进行配置
 Router(config)#int S0/0
 Router(config-if)#no ip addrees
 Router(config-if)#encapsulation frame –Relay
 Router(config-if)#frame–Relay lmi–type cisco
 Router(config-if)#no frame –Relay inverse –arp
 Router(config-if)# no shut
(2)创建点到点子接口
 Router(config)#int S0/0.2 point-to—point
(3)在子接口下进行配置
 Router(config-subif)#ip add 12.12.12.1 255.255.255.0
 Router(config-subif)#frame–Relay interface–dlci 102
在子接口下不能使用frame –Relay map  ip 命令来配置帧中继的映射,而改用命令frame–Relay  interface –dlci.
(4)同样创建S0/0.3子接口
 Router(config)#int S0/0.3     point-to—point
 Router(config-subif)#ip add  13.13.13.1  255.255.255.0
 Router(config-subif)# frame–Relay interface–dlci 103
点到多点子接口
一个点到多点子借口被用来建立多条PVC,这些PVC连接到原段路由器的多个子接口或物理接口。所以加入连接的接口都应该在同一个子网上。点到多点子接口默认时,水平分割是开启的。点对对点子接口配置
(1)对主接口进行配置

 Router(config)#int S0/0
 Router(config-if)#no    ip   addrees
 Router(config-if)#encapsulation frame –Relay
 Router(config-if)#frame –Relay lmi –type cisco
 Router(config-if)#no frame –Relay inverse –arp
 Router(config-if)# no  shut
 Router(config)#int s0/0.34  point–to–multipoint
 Router(config)#ip add  13.13.13.1  255.255.255.0
 Router(config)#frame-relay map ip 13.13.13.3 103 broad
 Router(config)#frame-relay map ip 13.13.13.4 104  broadcast
 Router(config-subif)#no ip split–borizon
案列:帧中继上的RIP 配置
R2的配置
(1)step1:开启帧中继交换功能。
  R2(config)#frame–Relay switching
(2)step1:配置接口封状
  R2(config)#int s0/0
  R2(config-if)#no shut
  R2(config-if)#clcok rate 128000
  R2(config-if)# encapsulation frame –Relay
  S0/1,S0/2与S0/0相同配置略
(3)step3:配置lmi类型
  R2(config)#int s0/0
 R2(config-if)#frame–Relay lmi–type cisco
 R2(config-if)#frame–Relay intf–type dce
 S0/1,S0/2与S0/0相同配置
(4)step4: 配置帧中继交换表
 R2(config)#int s0/0
 R2(config-if)#frame–Relay route 103 interface so0/1 301
 R2(config-if)#frame–Relay route 104 interface so0/2 401
 R2(config)#int s0/1
 R2(config-if)#frame–Relay route 301 interface so0/0 103
 R2(config)#int s0/2
 R2(config - if)#frame –Relay  route 401   interface so0/0  104
R1的配置:
 R1(config)#int lo0
 R1(config-if)#no frame – relay  inverse –arp
 R1(config-if)#frame – relay map ip 192.168.123.3   103  broud
 R1(config-if)#frame – relay map ip 192.168.123.4   104  broud
 R1(config-if)#ip add 1.1.1.1   255.255.255.0
 R1(config)#int s0/0
 R1(config-if)# encapsulation frame –Relay
 R1(config-if)#ip add 192.168.123.1   255.255.255.0
 R1(config-if)#frame ---Relay   lmi—type cisco
R3,R4按相同配置
配置RIP路由协议:
 R1(config)#router RIP
 R1(config-if)#net 1.0.0.0
 R1(config-if)#net 192.168.1.0
 R3,R4按相同配置
检查路由表并测试
R3#sh ip  route
R      1.0.0.0/8 [120/1]via 192.168.123.1,    s0/1
R      2.0.0/8 [120/1]via 192.168.123.1,    s0/1
R      30.0/8 [120/1]via 192.168.123.1,    s0/1
R      40.0/8 [120/1]via 192.168.123.1,    s0/1



R3#ping 4.4.4.4
………………
//在这里,ping4.4.4.4  时,ICMP数据包源IP为192.168.123.3目标为4.4.4.4.路由器R3查询路由表得知该数据包应发送给192.168.123.1,而 192.168.123.1的帧中继映射DLCI为301,数据包到R1,路由器R1查询路由表得知该数据包应该发送给192.168.123.4,而 192.168.123.4的帧中继映射DLCI为104.R4收到数据包,进行响应,此时ICMP数据包源IP变为4.4.4.4,目标IP变为 192.168.123.3,R4有192.168.123.0/24的直连路由,却没有192.168.123.3的帧中继映射,因此无法进行封状,解 决该问题,可以在R4上增加映射!

 R4(config)#int so/1
 R4(config-if)#frame–relay map ip 192.168.123.3  401
同样:R3上也应增加映射
 R3(config)#int so/1
 R3(config-if)#frame–relay map ip 192.168.123.4   301