1、帧中继封装类型
cisco默认情况是cisco类型,还有一种国际通用标注IETF(Internet Engineering Task Force, 因特网工程任务组):
Router(config-if)#encapsulation frame-relay ?
ietf
<cr>
2、数据链路连接标识符(DLCI)
帧中继PVC使用DLCI标识DCE设备。
DLCI是本地有效,远程有效需要ISP付费。
DLCI是由ISP从16-1007开始分配的号码:
Router(config-if)#frame-relay interface-dlci ?
<16-1007> Define a DLCI as part of the current
subinterface
3、本地管理接口(LMI):是路由器和它所连接的第一个帧中继交换机之间使用的信令标准。
Keepalives(保持激活):验证数据的通畅
Multicasting(组播):可选的扩展LMI规范
Global addressing(全局寻址):为DLCI提供全局意义
Status of virtual circuits(虚电路状态):提供DLCI状态信息。
*LMI不是路由器之间的通信--它是路由器和最近的帧中继交换机之间的通信。从IOS 11.2开始,LMI类型可以自动感知。
3种不同的LMI类型:
Router(config-if)#frame-relay lmi-type ?
cisco %cisco默认
ansi
q933a %又称为ITU-T
路由器从ISP帧中继交换机封装接口上接受LMI信息,并将虚电路状态更新为3种状态:
Active state(活动状态)
Inactive state(非活动状态)
Deleted state(删除状态)
4、帧中继拥塞控制
丢弃合格(Discard Eligibity , DE) : 如果ISP的网路发生拥塞,帧中继交换机将丢弃设置了DE 位的包。
前向显式拥塞通知(Forward Explicit Congestion Notification, FECN) :网络发生拥塞,交换机将FECN位设置为1,表明DEC经过的路径发生了拥塞。
后向显式拥塞通知(Backward Explicit Congestion Notification, BECN): 网络发生拥塞,交换机将设置BECN位,即通知源路由器前面遇到了拥塞。
5、帧中继命令
<1>show frame-relay pvc %验证帧中继拥塞控制消息
<2>Router(config )#int s0/0
Router(config-if)#encapsulatin frame-relay %指定接口的封装类型
Router(config-if)#frame-relay lmi-type ansi %指定LMI类型
Router(config-if)#frame-relay interface-dlci 101 %添加101号DLCI,指明使用哪一条PVC
Router(config-if)#ip address 172.16.2.2 255.255.255.0
<3>子接口
Router(config-if)#int s0.16 ?
multipoint %为每个DLCI和地址映射一个IP子网,解决了NBMA水平分割问题
poing-to-point %当路由器位于星状虚电路的中心时,使用。
注意:如果配置子接口,此物理接口不能有IP地址。一个给定的物理接口可以定义无限个子接口,但只有1000个DLCI是可用的。
<4>监控帧中继
show frame-relay lmi %显示本地路由器和帧中继交换机之间的LMI流量统计
show frame-relay pvc %将列出所有设置的PVC和DLCI号
show frame-relay map %显示网路层到DLCI的映射
debug frame lmi %验证帧中继连接性,和排错
6、帧中继的配置
<1>帧中继路由器的配置
int s0/0
encapsulation frame-relay [ietf] itef可以用于非cisco
no frame-relay inverse-arp 关闭逆向ARP解析
frame-relay lmi-type [ansi, q933a, ciso] 设置LMI类型,默认是cisco
frame-relay map ip <对方的ip> <自己DLCI号> broadcost (点对多点是启用)
frame-realy interface-dlci <自己DLCI号> (点对点时启用)
no shutdown
int s0/0.1 mulitpoing (点对多点多路访问,进入子接口)
int s0/0.1 point-to-point (点对点,cisco专用,进入子接口)
ip address <地址加掩码>
no frame-relay inverse-arp (启用point-to-point时就不用关闭)
frame-relay map ip <对方ip号> <自己的DLCI号,本地有效> broadcast [ietf] (点对点时启用)
frame-relay interface-dlci (自己的DLCI号) (点对点时启用)
<2>帧中继在RIP中的配置
RIP,在同一网段中,如果在帧中继启用了RIP路由器协议,主接口默认关闭了水平分割,子接口默认是开启水平分割,在mulitpoint子接口下将影响设置了点对点网络类型,应关闭水平分割
<2>帧中继在EIGRP中的配置
eigrp的水平分割在主接口和子接口默认都是开启的,配置帧中继时,要关闭水平分割:
no ip split-horz eigrp 号
7、帧中继配置实例
<1>点到多点, point-to-mulitpoint
用路由器模拟帧中继, 步骤:
【1】进入全局模式,开启帧中继
【2】进入串行端口,将封装类型设置为frame-relay
【3】帧中继接口配置为DCE,以提高时钟速率
【4】设置时钟速率
【5】建立帧中继路由表
【6】开启端口
FR(config)#frame-relay switching %开启帧中继
FR(config)#int s0/0 % s0/0是作为通往帧中继主干路由器线路
FR(config-if)#encapsulation frame-relay %先封装为帧中继模式
FR(config-if)#frame-relay intf-type dce %帧中继接口都配置为DCE
FR(config-if)#clock rate 64000 %为DCE接口设置时钟速率
FR(config-if)#frame-relay route 103 int s0/1 301 %建立帧中继路由表,103是源DLCI号,s0/1是目标端口,使用DLCI号为301的PVC
FR(config-if)#frame-relay route 104 int s0/2 401
FR(config-if)#no shu
FR(config-if)#exit
FR(config)#int s0/1
FR(config-if)#encapsulation frame-relay
FR(config-if)#frame-relay intf-type dce
FR(config-if)#clock rate 64000
FR(config-if)#frame-relay route 301 int s0/0 103
FR(config-if)#no shu
FR(config-if)#exit
FR(config)#int s0/2
FR(config-if)#encapsulation frame-relay
FR(config-if)#frame-relay intf-type dce
FR(config-if)#clock rate 64000
FR(config-if)#frame-relay route 401 int s0/0 104
FR(config-if)#no shu
远端主干路由器上的配置,步骤:
【1】进入接口设置封装类型为frame-relay
【2】配置ip地址
【3】禁用帧中继反向地址解析
【4】强制FR支持广播
【5】修改模式为点到多点模式
【6】开启端口
Router>en
Router#conf t
Router(config)#hos R1
R1(config)#int loopback 0
R1(config-if)#ip add 1.1.1.1 255.255.255.0 %配置环回接口地址,防止ospf失效
R1(config-if)#no shu
R1(config-if)#exit
R1(config)#int s0/0
R1(config-if)#encapsulation frame-relay
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no frame-relay inverse-arp %禁用帧中继反向地址解析
R1(config-if)#frame-relay map ip 192.168.1.3 103 broadcast %强制FR支持广播
R1(config-if)#frame-relay map ip 192.168.1.4 104 broadcast %103、104是源端口DLCI号
R1(config-if)#ip ospf network point-to-multipoint %修改模式为点到多点模式
R1(config-if)#no shu
R1(config-if)#exit
R1(config)#router ospf 10
R1(config-router)#net 1.1.1.0 0.0.0.255 area 0
R1(config-router)#net 192.168.1.0 0.0.0.255 area 0
R1(config-router)#exit
R1(config)#exit
本地路由器上的配置,步骤:
【1】进入接口设置封装类型为frame-relay
【2】配置ip地址
【3】禁用帧中继反向地址解析
【4】强制FR支持广播
【5】修改模式为点到多点模式
【6】开启端口
Router>en
Router#conf t
Router(config)#hos R3
R3(config)#int loopback 0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#no shu
R3(config-if)#exit
R3(config)#int s0/0
R3(config-if)#ip add 192.168.1.3 255.255.255.0
R3(config-if)#encapsulation frame-relay
R3(config-if)#no frame-relay inverse-arp
R3(config-if)#frame-relay map ip 192.168.1.1 301 broadcast
R3(config-if)#ip ospf network point-to-multipoint
R3(config-if)#no shu
R3(config-if)#exit
R3(config)#router ospf 10
R3(config-router)#net 3.3.3.0 0.0.0.255 area 0
R3(config-router)#net 192.168.1.0 0.0.0.255 area 0
R3(config-router)#exit
<2>点对点,point-to-point
用路由器模拟帧中继, 步骤:
【1】进入全局模式,开启帧中继
【2】进入串行端口,将封装类型设置为frame-relay
【3】帧中继接口配置为DCE,以提高时钟速率
【4】设置时钟速率
【5】建立帧中继路由表
【6】开启端口
路由器上的设置,步骤:
【1】进入主接口,设置封装类型为frame-relay,并开启端口
【2】设置端口的帧中继类型 [cisco, ansi, q933a]
【3】进入子接口,设置为point-to-point模式
【4】配置ip地址
【5】指定point-to-point对应的DLCI值
R1路由器配置:
R1>en
R1#conf t
R1(config)#int s1/0 进入S1/0端口配置
R1(config-if)#no shut 启动端口
R1(config-if)#encapsulation frame-relay 帧中继封装
R1(config-if)#frame-relay lmi-type cisco 帧中继类型为cisco
R1(config)#int s1/0.1 point-to-point 配置子端口,并设置为点对点模式
R1(config-subif)#ip add 192.168.1.1 255.255.255.0 分配子端口ip地址
R1(config-subif)#frame-relay interface-dlci 102 指定点对点对应的DLCI值
R1(config-subif)#exit
R1(config)#int s1/0.2 point-to-point 配置子端口,并设置为点对点模式
R1(config-subif)#ip add 192.168.2.1 255.255.255.0 分配子端口ip地址
R1(config-subif)#frame-relay interface-dlci 103 指定点对点对应的DLCI值
R1(config-subif)#exit