帧中继Word格式文档下载.docx
《帧中继Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《帧中继Word格式文档下载.docx(16页珍藏版)》请在冰豆网上搜索。
R2(config)#ints0/0/1
R2(config-if)#clockrate128000
R2(config)#ints0/1/0
3:
配置LMI类型
R2(config-if)#frame-relaylmi-typecisco
//命令“frame-relaylmi-type{ansi|cisco|q933a}用来配置LMI的类型,默认时是cisco。
R2(config-if)#frame-relayintf-typedce
//命令“frame-relayintf-type{dce|dte}”用来配置接口是帧中继的DCE还是DTE。
这里的帧中继接口DCE和s0/0/0接口是DCE还是DTE无关,也就是说即使s0/0/0是DTE,也可以把它配置成帧中继的DCE。
4:
配置帧中继交换表
R2(config-if)#frame-relayroute103interfaces0/0/1301
R2(config-if)#frame-relayroute104interfaces0/1/0401
//命令“frame-relayroute103interfaces0/0/1301”是配置帧中继交换表的,告诉路由器如果从该接口收到DLCI=103的帧,要从s0/0/1交换出去,并且DLCI改为301。
R2(config)#intSerial0/0/1
R2(config-if)#frame-relayroute301interfaceSerial0/0/0103
R2(config)#intSerial0/1/0
R2(config-if)#frame-relayroute401interfaceSerial0/0/0104
实验调试
R2#showframe-relayroute
InputIntfInputDlciOutputIntfOutputDlciStatus
Serial0/0/0103Serial0/0/1301inactive
Serial0/0/0104Serial0/1/0401inactive
Serial0/0/1301Serial0/0/0103inactive
Serial0/1/0401Serial0/0/0104inactive
R2#showframe-relaypvc
PVCStatisticsforinterfaceSerial0/0/0(FrameRelayDCE)
ActiveInactiveDeletedStatic
Local0000
Switched0200
Unused0000
DLCI=103,DLCIUSAGE=SWITCHED,PVCSTATUS=INACTIVE,INTERFACE=Serial0/0/0
//由于PVC还未被使用,所以状态为inactive
inputpkts0outputpkts0inbytes0
outbytes0droppedpkts0inpktsdropped0
outpktsdropped0outbytesdropped0
inFECNpkts0inBECNpkts0outFECNpkts0
outBECNpkts0inDEpkts0outDEpkts0
实验2帧中继基本配置、帧中继映射
1.
帧中继的基本配置
2.帧中继的动态映射
3.帧中继的静态映射
帧中继接口基本配置
R1(config)#ints0/0/0
R1(config-if)#ipaddress192.168.123.1255.255.255.0
R1(config-if)#noshutdown
R1(config-if)#encapsulationframe-relay
//帧中继有两种封装类型:
cisco和ietf(InternetEngineeringTaskForce)。
对于cisco路由器,cisco是它的默认值;
对于非cisco路由器,须选用ietf类型。
R1(config-if)#frame-relaylmi-typecisco
//如果采用的是cisco路由器且IOS是11.2及以后版本的,路由器可以自动适应LMI的类型,则本步骤可不做。
国内帧中继线路一般采用ansi的LMI信令类型,我们这里采用的是cisco。
R3(config)#ints0/0/1
R3(config-if)#ipaddress192.168.123.3255.255.255.0
R3(config-if)#noshutdown
R3(config-if)#encapsulationframe-relay
R4(config)#ints0/0/1
R4(config-if)#ipaddress192.168.123.4255.255.255.0
R4(config-if)#noshutdown
R4(config-if)#encapsulationframe-relay
步骤1调试1
R1#ping192.168.123.3
Typeescapesequencetoabort.
Sending5,100-byteICMPEchosto192.168.123.3,timeoutis2seconds:
!
Successrateis100percent(5/5),round-tripmin/avg/max=28/28/28ms
R1#ping192.168.123.4
Sending5,100-byteICMPEchosto192.168.123.4,timeoutis2seconds:
步骤1调试2
R1#showframe-relaymap
Serial0/0/0(up):
ip192.168.123.3dlci103(0x67,0x1870),dynamic,
broadcast,,statusdefined,active
ip192.168.123.4dlci104(0x68,0x1880),dynamic,
//默认时,帧中继接口开启了动态映射,会自动建立帧中继映射,“dynamic”表明这是动态映射。
步骤1调试3
R1#showframe-relaypvc
PVCStatisticsforinterfaceSerial0/0/0(FrameRelayDTE)
Local2000
Switched0000
Unused0000
DLCI=103,DLCIUSAGE=LOCAL,PVCSTATUS=ACTIVE,INTERFACE=Serial0/0/0
//可以看到DLCI=103的PVC的状态为active
手工配置帧中继映射
R1(config-if)#noframe-relayinverse-arp
//关闭自动映射
R1(config-if)#frame-relaymapip192.168.123.3103broadcast
R1(config-if)#frame-relaymapip192.168.123.4104broadcast
R3(config-if)#noframe-relayinverse-arp
R3(config-if)#frame-relaymapip192.168.123.1301broadcast
R4(config-if)#noframe-relayinverse-arp
R4(config-if)#frame-relaymapip192.168.123.1401broadcast
调试见步骤1调试
实验3帧中继上的RIP
1.帧中继上路由协议运行的特殊性
2.水平分割
●在实验1基础上继续本实验
●要求在R1、R3、R4配置RIP
实验步骤
配置RIP
R1(config)#interfaceLoopback0
R1(config-if)#ipaddress1.1.1.1255.255.255.0
R1(config)#routerrip
R1(config-router)#network1.0.0.0
R1(config-router)#network192.168.123.0
R3(config)#interfaceLoopback0
R3(config-if)#ipaddress3.3.3.3255.255.255.0
R3(config)#routerrip
R3(config-router)#network3.0.0.0
R3(config-router)#network192.168.123.0
R4(config)#interfaceLoopback0
R4(config-if)#ipaddress4.4.4.4255.255.255.0
R4(config)#routerrip
R4(config-router)#network4.0.0.0
R4(config-router)#network192.168.123.0
检查路由表、测试
R3#showiproute
(此处省略)
C192.168.123.0/24isdirectlyconnected,Serial0/0/1
R1.0.0.0/8[120/1]via192.168.123.1,00:
00:
26,Serial0/0/1
3.0.0.0/24issubnetted,1subnets
C3.3.3.0isdirectlyconnected,Loopback0
R4.0.0.0/8[120/2]via192.168.123.1,00:
//看到正常的路由表,注意RIP路由表中的下一跳都指向192.168.123.1
R3#ping4.4.4.4sourceloopback0
Sending5,100-byteICMPEchosto4.4.4.4,timeoutis2seconds:
Packetsentwithasourceaddressof3.3.3.3
//注意这里是从R3的环回口pingR4的环回口
R3#ping4.4.4.4
....
//没有指明ping使用的源接口时就无法ping通R4的环回口了
//原因:
这里ping命令没指明源地址,则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,目标为192.168.123.3;
R4有192.168.123.0/24的直连路由,然而却没有192.168.123.3的帧中继映射,因此无法进行封装。
水平分割问题
R1#showipints0/0/0
Serial0/0/0isup,lineprotocolisup
Internetaddressis192.168.123.1/24
Securitylevelisdefault
Splithorizonisdisabled
//接口封装了帧中继后,水平分割被自动关闭
ICMPredirectsarealwayssent
(此处省略)
R1(config)#intSerial0/0/0
R1(config-if)#ipsplit-horizon
//在R1上重新打开水平分割,在各路由器上检查路由表。
R1#cleariproute*
//清除路由表
R1#showiproute
C192.168.123.0/24isdirectlyconnected,Serial0/0/0
1.0.0.0/24issubnetted,1subnets
C1.1.1.0isdirectlyconnected,Loopback0
R3.0.0.0/8[120/1]via192.168.123.3,00:
01,Serial0/0/0
R4.0.0.0/8[120/1]via192.168.123.4,00:
//R1可以获得R3和R4的环回口路由
R3#cleariproute*
00,Serial0/0/1
//R3只能获得R1的环回口路由,这是由于R1上的水平分割开启后,R1从R4接收到R4公告的路由后,不从帧中继口发送出来,导致R3没有接收到R4上公告的路由
R4#cleariproute*
R4#showiproute
01,Serial0/0/1
4.0.0.0/24issubnetted,1subnets
C4.4.4.0isdirectlyconnected,Loopback0
//R4也只能获得R1的环回口路由
实验4帧中继点到多点子接口
1.点到多点子接口的配置
实验步骤1:
主接口进行配置
R1(config)#interfaceserial0/0/0
R1(config-if)#noipaddress
主接口下不需要IP地址
R1(config-if)#encapframe-relay
封装帧中继
通常需要关闭主接口下的IARP
实验步骤2:
创建点到多点子接口
R1(config)#ints0/0/0.1multipoint
创建点到多点子接口
R1(config-subif)#ipaddress192.168.123.1255.255.255.0
R1(config-subif)#frame-relaymapip192.168.123.3103broadcast
R1(config-subif)#frame-relaymapip192.168.123.4104broadcast
//以上是配置帧中继映射
实验步骤3:
R1上配置路由协议
实验步骤4:
R3的完整配置
R3(config)#interfaceserial0/0/1
R3(config-if)#noshutdown
实验步骤5:
R4的完整配置
R4(config)#interfaceserial0/0/1
R4(config-if)#noshutdown
实验调试:
C192.168.123.0/24isdirectlyconnected,Serial0/0/0.1
19,Serial0/0/0.1
16,Serial0/0/0.1
R3#showiproute
//R3只能获得R1的环回口路由,这是由于默认时R1的点到多点子接口水平分割是开启的,可以使用命令“ipsplit-horizon”在子接口下关闭水平分割。
R4#showiproute
//R4同样只能获得R1的环回口路由
实验5帧中继点到点子接口
1.点到点子接口的配置
R1(config-if)#encapframe-relay
R1(config-if)#