|
路由器配置成帧中继交换机
每台路由器都不能ping通自己的串行接口的ip地址,但是可以ping通远程封装帧中继的串行接口的ip地址 是因为自己的帧中继映射表中没有自己的接口ip地址和DLCI的映射条目。 逆向ARP做动态映射解决不了该问题,只能通过静态映射解决
Router(config)#frame-relay switching把路由器模拟成帧中继交换机 Router(config)#inter s1/1 Router(config-if)#clock rate 128000 Router(config-if)#encapsulation frame-relay 配置接口封装帧中继 接口上启用的默认帧中继封装为Cisco封装,如果连接到非思科路由器,要使用itef参数 Router(config-if)#no shu Router(config)#inter s1/2 Router(config-if)#clo rate 128000 Router(config-if)#encapsulation fr Router(config-if)#no shu changed state to upnointer s1/3 Router(config-if)#clo rate 128000 Router(config-if)#encapsulation fr Router(config-if)#no shu Router(config)#inter s1/1 Router(config-if)#frame-relay lmi-type cisco 配置LMI类型 Router(config-if)#frame-relay intf-type dce 配置接口为帧中继的DCE Router(config-if)#inter s1/2 Router(config-if)#frame-relay lmi-type cisco Router(config-if)#frame-relay intf-type dce Router(config-if)#inter s1/3 Router(config-if)#frame-relay lmi-type cisco Router(config-if)#frame-relay intf-type dce 配置路由器两个接口之间的pvc Router(config)#inter s1/1 Router(config-if)#frame-relay route 103 inter s1/2 301 Router(config-if)#frame-relay route 104 inter s1/3 401 Router(config-if)#exit Router(config)#inter s1/2 Router(config-if)#frame-relay route 301 inter s1/1 103 Router(config-if)#frame-relay route 304 inter s1/3 403 Router(config-if)#exit Router(config)#inter s1/3 Router(config-if)#frame-relay route 401 inter s1/1 104 Router(config-if)#frame-relay route 403 inter s1/2 304 Router(config-if)# Router#show frame-relay route Input IntfInput DlciOutput Intf Output Dlci Status Serial1/1 103 Serial1/2 301 active Serial1/1 104 Serial1/3 401 active Serial1/2 301 Serial1/1 103 active Serial1/2 304 Serial1/3 403 active Serial1/3 401 Serial1/1 104 active Serial1/3 403 Serial1/2 304 active 表明路由器R2上配置3条PVC 状态都是活动的 R1的配置 Router(config)#inter s1/1 Router(config-if)#ip address 172.16.134.1 255.255.255.0 Router(config-if)#encapsulation fr 接口封装帧中继 Router(config-if)#frame-relay lmi-type cisco Router(config)#inter fa0/0 Router(config-if)#ip add Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shu 如果采用Cisco路由器的IOS是11.2及以后的版本,路由器可以自动协商LMI是类型 所以可以不配 Router(config)#router rip Router(config-router)#ver 2 Router(config-router)#no auto-summary Router(config-router)#network 172.16.134.0 Router(config-router)#network 192.168.1.0 Router(config-router)#exit R3和R4同R1 ping测试 Router#ping 172.16.134.1 source 192.168.4.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.134.1, timeout is 2 seconds: Packet sent with a source address of 192.168.4.1 Success rate is 100 percent (5/5), round-trip min/avg/max = 120/155/200 ms 查看帧中继的映射 Router#show frame-relay map Serial1/1 (up): ip 172.16.134.3 dlci 103(_0x67,_0x1870), dynamic, broad_cast,, status defined, active Serial1/1 (up): ip 172.16.134.4 dlci 104(_0x68,_0x1880), dynamic, broad_cast,, status defined, active 以上输出显示了逆向ARP的作用结果 表明路由器R1每个封装帧中继的接口都包含2条处于活动状态的DLCI,每条都显示了远程Ip地址与本地的DLCI的映射关系 broad_cast“参数允许在PVC上传输广播或组播流量 “dynamic 表明动态映射 每台路由器都不能ping通自己的串行接口的ip地址,但是可以ping通远程封装帧中继的串行接口的ip地址 是因为自己的帧中继映射表中没有自己的接口ip地址和DLCI的映射条目。 逆向ARP做动态映射解决不了该问题,只能通过静态映射解决 Router#show ip route rip R192.168.4.0/24 [120/1] via 172.16.134.4, 00:00:07, Serial1/1 R192.168.3.0/24 [120/1] via 172.16.134.3, 00:00:27, Serial1/1 Router#show ip route rip R192.168.4.0/24 [120/1] via 172.16.134.4, 00:00:00, Serial1/2 R192.168.1.0/24 [120/1] via 172.16.134.1, 00:00:05, Serial1/2 Router#show ip route rip R192.168.1.0/24 [120/1] via 172.16.134.1, 00:00:18, Serial1/3 R192.168.3.0/24 [120/1] via 172.16.134.3, 00:00:27, Serial1/3 在本实验中,帧中继交换机在路由器R2上采用了PVC全互连的拓扑结构 但是在实际应用中,为了节省费用,一般采用(中心--分支)的拓扑结构 即只有分支到中心的PVC,假如R1是中心路由 R2和R3是分支路由 在R2上是配置如下 Router(config)#inter s1/2 Router(config-if)#no frame-relay route 304 interface s1/3 403 Router(config-if)#inter s1/3 Router(config-if)#no frame-relay route 403 interface s1/2 304 在R3和R4上 Router#show frame-relay map Serial1/2 (up): ip 172.16.134.1 dlci 301(_0x12D,_0x48D0), dynamic, broad_cast,, status defined, active Router#show frame-relay map Serial1/3 (up): ip 172.16.134.1 dlci 401(_0x191,_0x6410), dynamic, broad_cast,, status defined, active 可以看到R3和R4上只有一条到中心站点路由器R1的映射 R4和R3的网络不可达 R1 配置帧中继的静态映射 Router(config)#inter s1/1 Router(config-if)#no frame-relay inverse-arp 关闭逆向ARP ,默认是开启的 Router(config-if)#frame-relay map ip 172.16.134.3 103 broad_cast 配置帧中继静态映射 Router(config-if)#frame-relay map ip 172.16.134.4 104 broad_cast Router(config-if)#frame-relay map ip 172.16.134.1 104 broad_cast 配置自己接口的ip地址的映射,目的是允许ping路由器该接口的ip地址 R3 Router(config)#inter s1/2 Router(config-if)#no frame-relay inverse-arp Router(config-if)#frame-relay map ip 172.16.134.1 301 broad_cast Router(config-if)#frame-relay map ip 172.16.134.4 304 broad_cast Router(config-if)#frame-relay map ip 172.16.134.3 301 broad_cast R4 Router(config)#inter s1/3 Router(config-if)#no frame-relay inverse-arp Router(config-if)#frame-relay map ip 172.16.134.1 401 broad_cast Router(config-if)#frame-relay map ip 172.16.134.3 403 broad_cast Router(config-if)#frame-relay map ip 172.16.134.4 401 broad_cast R1#show frame-relay map Serial1/1 (up): ip 172.16.134.1 dlci 104(_0x68,_0x1880), static, broad_cast, CISCO, status defined, active Serial1/1 (up): ip 172.16.134.3 dlci 103(_0x67,_0x1870), static, broad_cast, CISCO, status defined, active Serial1/1 (up): ip 172.16.134.4 dlci 104(_0x68,_0x1880), static, broad_cast, CISCO, status defined, active R3#show frame-relay map Serial1/2 (up): ip 172.16.134.1 dlci 301(_0x12D,_0x48D0), static, broad_cast, CISCO, status defined, active Serial1/2 (up): ip 172.16.134.3 dlci 301(_0x12D,_0x48D0), static, broad_cast, CISCO, status defined, active Serial1/2 (up): ip 172.16.134.4 dlci 301(_0x12D,_0x48D0), static, broad_cast, CISCO, status defined, active R4#show frame-relay map Serial1/3 (up): ip 172.16.134.1 dlci 401(_0x191,_0x6410), static, broad_cast, CISCO, status defined, active Serial1/3 (up): ip 172.16.134.3 dlci 401(_0x191,_0x6410), static, broad_cast, CISCO, status defined, active Serial1/3 (up): ip 172.16.134.4 dlci 401(_0x191,_0x6410), static, broad_cast, CISCO, status defined, active 封装帧中继每个接口都采用了静态映射 R1#show ip route rip R192.168.4.0/24 [120/1] via 172.16.134.4, 00:00:26, Serial1/1 R192.168.3.0/24 [120/1] via 172.16.134.3, 00:00:07, Serial1/1 R1#show ip interface s1/1 Serial1/1 is up, line protocol is up Internet address is 172.16.134.1/24 Broad_cast address is 255.255.255.255 Split horizon is disabled接口封装帧中继后,水平分割被自动关闭 R1(R1(config)#inter s1/1 R1(config-if)#ip split-horizon 开启水平分割 R1#clear ip route_*清除路由表 R1#show ip route rip R192.168.4.0/24 [120/1] via 172.16.134.4, 00:00:07, Serial1/1 R192.168.3.0/24 [120/1] via 172.16.134.3, 00:00:11, Serial1/1 重新获得 R3#show ip route rip R192.168.1.0/24 [120/1] via 172.16.134.1, 00:00:15, Serial1/2 R4#show ip route rip R192.168.1.0/24 [120/1] via 172.16.134.1, 00:00:06, Serial1/3 R3没有了R4的路由 R4没有了R3的路由
责编:孔维维
微信扫一扫实时了解行业动态
微信扫一扫分享本文给好友
著作权声明:kaiyun体育官方人口 文章著作权分属kaiyun体育官方人口 、网友和合作伙伴,部分非原创文章作者信息可能有所缺失,如需补充或修改请与我们联系,工作人员会在1个工作日内配合处理。
|
最新专题
|
|