本文主要是介绍帧中继子接口配置,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
帧中继子接口配置
帧中继子接口
帧中继有两种类型的接口:主接口和子接口。其中子接口是一个逻辑结构,可以配置协议地址和虚电路等,一个物理接口可以有多个子接口。虽然子接口是逻辑结构,并不实际存在,但对于网络层而言,子接口和主接口是没有区别的,都可以配置虚电路与远端设备相连。帧中继的子接口又可以分为两种类型:点到点(point-to-point)子接口和点到多点(point-to-multipoint)子接口。点到点子接口用于连接单个远端目标,点到多点子接口用于连接多个远端目标。点到多点子接口在一个子接口上配置多条虚电路,每条虚电路都和它相连的远端网络地址建立一个地址映射,这样不同的虚电路就可以到达不同的远端而不会混淆。
地址映射的建立可以用手工配置的方法,也可以利用逆向地址解析协议来动态建立。点到点子接口和多点子接口配置虚电路及地址映射的方法是不同的。
点到点子接口:对点到点子接口而言,因为只有唯一的一个对端地址,所以在给子接口配置一条PVC 时实际已经确定了对端地址,不能配置静态地址映射,也不能动态学习地址映射。
多点子接口:对点到多点子接口,对端地址与本地DLCI映射可以通过配置静态地址映射,或者通过逆向地址解析协议来确定(Inverse ARP在主接口上配置即可)。如果要建立静态地址映射,则应该对每一条虚电路建立静态地址映射关系。
拓扑图
设备参数:
设备 | 接口 | IP地址 | 子网掩码 | 默认网关 | DLCI |
R1 | S0/0/0 | N/A | 102 | ||
S0/0/0.12 | 192.168.123.1 | 255.255.255.0 | |||
R2 | S0/0/0.21 | 192.168.123.2 | 255.255.255.0 | N/A | 201 |
实验内容:
帧中继配置:
R1配置:
Router>enableRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hoRouter(config)#hostname R1R1(config)#intR1(config)#interface s0/0/0R1(config-if)#no ip addressR1(config-if)#encapsulation frame-relayR1(config-if)#no frame-relay inverse-arpR1(config-if)#no shutdown
R1(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
R1(config)#interface s0/0/0.12 point-to-point
R1(config)#interface s0/0/0.12 point-to-point
R1(config-subif)#
%LINK-5-CHANGED: Interface Serial0/0/0.12, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0.12, changed state to up
R1(config-subif)#ip address 192.168.123.1 255.255.255.0R1(config-subif)#frame-relay interface-dlci 102R1(config-subif)#end
R1(config-subif)#ip address 192.168.123.1 255.255.255.0
R1(config-subif)#frame-relay interface-dlci 102
R1(config-subif)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#show frame-relay map
Serial0/0/0.12 (up): point-to-point dlci, dlci 102, broadcast, status defined, active
R1#ping 192.168.123.1
R1#ping 192.168.123.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/30/43 ms
R1#ping 192.168.123.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/18/29 ms
R1#
R2配置:
Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface s0/0/0
R2(config-if)#no ip address
R2(config-if)#encapsulation frame-relay
R2(config-if)#no frame-relay inverse-arp
R2(config-if)#no shutdown
Router>enableRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2R2(config)#interface s0/0/0R2(config-if)#no ip addressR2(config-if)#encapsulation frame-relayR2(config-if)#no frame-relay inverse-arpR2(config-if)#no shutdown
R2(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
R2(config-if)#exit
R2(config)#interface s0/0/0.12 point-to-point
R2(config)#interface s0/0/0.12 point-to-point
R2(config-subif)#
%LINK-5-CHANGED: Interface Serial0/0/0.12, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0.12, changed state to up
R2(config-subif)#ip address 192.168.123.2 255.255.255.0R2(config-subif)#frame-relay interface-dlci 201R2(config-subif)#no shutdownR2(config-subif)#end
R2(config-subif)#ip address 192.168.123.2 255.255.255.0
R2(config-subif)#frame-relay interface-dlci 201
R2(config-subif)#no shutdown
R2(config-subif)#end
R2#
%SYS-5-CONFIG_I: Configured from console by console
R2#show fr
R2#show frame-relay m
R2#show frame-relay map
Serial0/0/0.12 (up): point-to-point dlci, dlci 201, broadcast, status defined, active
R2#ping 192.168.123.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 10/16/19 ms
R2#ping 192.168.123.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 25/30/37 ms
R2#
不积跬步无以至千里,不积小流无以成江海;
千里之行,始于足下;
每天一个小实验。
这篇关于帧中继子接口配置的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!