帧中继(背靠背)配置
学习目的
了解帧中继中PVC的功能
理解帧中继协议的工作原理
掌握在串行链路上配置FrameRelay的方法
掌握在帧中继网络上手动定义IP与DLCI号码映射的方法
掌握在帧中继网络上运行RIP的配置方法
掌握在帧中继网络上运行OSPF的配置方法
拓扑图
场景
你是公司的网络管理员,公司总部有一台路由器R1、R2和R3分别是其它两个分部的路由器。现在需要将总部和分部连接到同一网络。广域网链路上尝试使用帧中继协议,在定义FR的DLCI与IP地址对应关系时采用了不同的二层和三层地址映射方式。
学习任务
步骤一.进本配置与IP编址
[Huawei]sysname R1
[R1]interface s1/0/0
[R1-Serial1/0/0]ip add 10.0.12.1 24
[R1-Serial1/0/0]desc this port connectR2-S1/0/0
[R1-Serial1/0/0]interface loopback0
[R1-LoopBack0]ip add 10.0.1.1 24
[R1-LoopBack0]q
[R1]
[Huawei]sysname R2
[R2]interface s1/0/0
[R2-Serial1/0/0]ip add 10.0.12.2 24
[R2-Serial1/0/0]desc this port connect toR1-S1/0/0
[R2-Serial1/0/0]interface s2/0/0
[R2-Serial2/0/0]ip add 10.0.23.2 24
[R2-Serial2/0/0]desc this port connect toR3-S2/0/0
[R2-Serial2/0/0]interface loopback0
[R2-LoopBack0]ip add 10.0.2.2 24
[R2-LoopBack0]q
[Huawei]sysname R3
[R3]interface s2/0/0
[R3-Serial2/0/0]ip add 10.0.23.3 24
[R3-Serial2/0/0]
Jul 3 2014 16:26:59-05:13 R3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocolPPP
IPCP on the interface Serial2/0/0 hasentered the UP state.
[R3-Serial2/0/0]desc this port connect toR2-S2/0/0
[R3-Serial2/0/0]interface loopback0
[R3-LoopBack0]ip add 10.0.3.3 24
[R3-LoopBack0]q
完成后测试网络的连通性。
[R2]ping 10.0.12.1
PING 10.0.12.1: 56 data bytes,press CTRL_C to break
Reply from 10.0.12.1: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 10.0.12.1: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.0.12.1: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 10.0.12.1: bytes=56 Sequence=4 ttl=255 time=10 ms
Reply from 10.0.12.1: bytes=56 Sequence=5 ttl=255 time=20 ms
---10.0.12.1 ping statistics ---
5packet(s) transmitted
5packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/20/40 ms
[R2]ping -c 1 10.0.23.3
PING 10.0.23.3: 56 data bytes,press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=255 time=30 ms
---10.0.23.3 ping statistics ---
1packet(s) transmitted
1packet(s) received
0.00% packet loss
round-tripmin/avg/max = 30/30/30 ms
步骤二.配置R1与R2之间使用帧中继的背靠背形式,使用静态地址映射。
配置帧中继时,串口线缆的DCE端与DTE端配置不同,首先查看时R1还是R2连接到串口线缆的DCE段。
<R1>dis inter s1/0/0
Serial1/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time : 2014-07-0316:22:58 UTC-05:13
Description:this port connect R2-S1/0/0
Route Port,The Maximum Transmit Unit is1500, Hold timer is 10(sec)
Internet Address is 10.0.12.1/24
Link layer protocol is PPP
LCP opened, IPCP opened
Last physical up time : 2014-07-03 16:20:52 UTC-05:13
Last physical down time : 2014-07-0316:15:31 UTC-05:13
Current system time: 2014-07-0316:30:44-05:13
Physical layer is synchronous,Virtualbaudrate is 64000 bps
Interface is DTE, Cabletype is V11, Clock mode is DCECLK
Last 300 seconds input rate 8 bytes/sec 64bits/sec 0 packets/sec
Last 300 seconds output rate 3 bytes/sec 24bits/sec 0 packets/sec
Input: 132 packets, 4614 bytes
Broadcast: 0, Multicast: 0
Errors: 0, Runts: 0
Giants: 0, CRC: 0
Alignments: 0, Overruns: 0
Dribbles: 0, Aborts: 0
NoBuffers: 0, Frame Error: 0
如以上显示R1的S1/0/0接口连接到了串行线缆的DTE端,把dte改成dce
[R1]interface s1/0/0
[R1-Serial1/0/0]link-
[R1-Serial1/0/0]link-protocol fr
Warning: The encapsulation protocol of thelink will be changed. Continue? [Y/N]:y
[R1-Serial1/0/0]fr inter
[R1-Serial1/0/0]fr interface-type dce
[R1-Serial1/0/0]undo fr inarp
[R1-Serial1/0/0]fr dlci 102
[R1-fr-dlci-Serial1/0/0-102]q
[R1-Serial1/0/0]fr map ip 10.0.12.2 102broadcast
[R1-Serial1/0/0]q
R1、R2端串行线缆的DTE端
[R1]interface s1/0/0
[R1-Serial1/0/0]link-protocol fr
Warning: The encapsulation protocol of thelink will be changed. Continue? [Y/N]:y
[R1-Serial1/0/0]fr inter
[R1-Serial1/0/0]fr interface-type dte
[R1-Serial1/0/0]undo fr inarp
[R1-Serial1/0/0]fr map ip 10.0.12.2 102 bro
[R1-Serial1/0/0]fr map ip 10.0.12.2 102broadcast
[R1-Serial1/0/0]
[R2]interface s1/0/0
[R2-Serial1/0/0]link
[R2-Serial1/0/0]link-protocol fr
Warning: The encapsulation protocol of thelink will be changed. Continue? [Y/N]:y
[R2-Serial1/0/0]fr interface-type dte
[R2-Serial1/0/0]undo fr inarp
[R2-Serial1/0/0]fr map ip 10.0.12.1 102broadcast
配置完成后,在此测试R1与R2的连通性。
[R2]ping 10.0.12.1
PING 10.0.12.1: 56 data bytes,press CTRL_C to break
Reply from 10.0.12.1: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 10.0.12.1: bytes=56 Sequence=2 ttl=255 time=10 ms
Reply from 10.0.12.1: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 10.0.12.1: bytes=56 Sequence=4 ttl=255 time=10 ms
Reply from 10.0.12.1: bytes=56 Sequence=5 ttl=255 time=10 ms
---10.0.12.1 ping statistics ---
5packet(s) transmitted
5packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/14/30 ms
注意,如果在配置帧中继之前,在步骤一的最后。测试R1与R2通讯正常。如果不正常,则错误出现在帧中继的配置上面。可以使用如下方式进行故障排除。
以R1为例,注意以下标记的信息,并与R2对应信息对比。
<R1>dis fr ma
<R1>dis fr map-info
Map Statistics for interface Serial1/0/0(DCE)
DLCI = 102, IP10.0.12.2, Serial1/0/0
create time = 2014/07/04 04:59:39, status = ACTIVE
encapsulation =ietf, vlink = 2, broadcast
<R1>dis interface s1/0/0
Serial1/0/0 current state: UP
Line protocol currentstate : UP
Last line protocol up time : 2014-07-0405:01:23 UTC-05:13
Description:this port connect to R2-S1/0/0
Route Port,The Maximum Transmit Unit is1500, Hold timer is 10(sec)
Internet Address is 10.0.12.1/24
Link layer protocol is FRIETF
LMI DLCI is 0, LMI type is Q.933a, framerelay DCE
LMIstatus enquiry received 100, LMI status sent 100
LMIstatus enquiry timeout 9, LMI message discarded 2
Last physical up time : 2014-07-04 04:58:39 UTC-05:13
Last physical down time : 2014-07-0404:58:38 UTC-05:13
Current system time: 2014-07-0405:17:54-05:13
Physical layer is synchronous,Virtualbaudrate is 64000 bps
Interface is DTE, Cable type is V11, Clockmode is TC
Last 300 seconds input rate 3 bytes/sec 24bits/sec 0 packets/sec
Last 300 seconds output rate 1 bytes/sec 8bits/sec 0 packets/sec
Input: 481 packets, 16371 bytes
Broadcast: 0, Multicast: 0
Errors: &n