您的位置:首页 > 其它

Frame-relay配置实例

2012-03-22 16:30 411 查看
实验环境
Dynamips模拟器
Cisco IOS Software, 3700 Software (C3745-ADVIPSERVICESK9-M), Version 12.4(4)T, RELEASE SOFTWARE (fc1)

拓扑结构
如下图所示, R1、R2、R3三台路由器通过帧中继云相互连接。
四台设备都是C3475路由器,其中路由器R4用来模拟帧中继交换机FR(注:在实验环境中,模拟帧中继交换机的路由器至少有三个广域网串口)。





实验要求
实现帧中继网络通信;在帧中继网络上运行EIGRP路由选择协议。

操作步骤

一、基本配置(路由器改名等,略)

二、配置帧中继交换机

FR(config)#
FR(config)#frame-relay switching ! 开启frame 交换功能
FR(config)#int s3/1
FR(config-if)#encapsulation frame-relay ietf ! 接口封装帧中继
FR(config-if)#frame-relay intf-type dce ! 为了帧中继交换,将接口配置为DCE
FR(config-if)#frame-relay lmi-type ansi !本地接口封装类型由默认的cisco改为ansi
FR(config-if)#clock rate 64000
FR(config-if)#frame-relay route 102 interface s3/2 201 ! 指定路由
FR(config-if)#frame-relay route 103 interface s3/3 301
FR(config-if)#no shutdown
FR(config-if)#exit
FR(config)#
FR(config)#int s3/2
FR(config-if)#encapsulation frame-relay ietf
FR(config-if)#frame-relay intf-type dce
FR(config-if)#frame-relay lmi-type ansi
FR(config-if)#clock rate 64000
FR(config-if)#frame-relay route 201 interface s3/1 102
FR(config-if)#frame-relay route 203 interface s3/3 302
FR(config-if)#no shutdown
FR(config-if)#exit
FR(config)#
FR(config)#int s3/3
FR(config-if)#encapsulation frame-relay ietf
FR(config-if)#frame-relay intf-type dce
FR(config-if)#frame-relay lmi-type ansi
FR(config-if)#clock rate 64000
FR(config-if)#frame-relay route 301 interface s3/1 103
FR(config-if)#frame-relay route 302 interface s3/2 203
FR(config-if)#no shutdown
FR(config-if)#end
FR#
------------------------------------------------------
查看FR路由
FR#sh frame-relay route
Input Intf Input Dlci Output Intf Output Dlci Status
Serial3/1 102 Serial3/2 201 inactive
Serial3/1 103 Serial3/3 301 inactive
Serial3/2 201 Serial3/1 102 inactive
Serial3/2 203 Serial3/3 302 inactive
Serial3/3 301 Serial3/1 103 inactive
Serial3/3 302 Serial3/2 203 inactive
可以看到,此时的帧中继链路是非激活的。

三、配置R1、R2、R3路由器

R1(config)#int s3/1
R1(config-if)#ip add 192.168.123.1 255.255.255.0
R1(config-if)#encapsulation frame-relay ietf
R1(config-if)#no frame-relay inverse-arp !关闭ARP
R1(config-if)#frame-relay lmi-type ansi
R1(config-if)#frame-relay map ip 192.168.123.2 102 broadcast !指定静态映射
R1(config-if)#frame-relay map ip 192.168.123.3 103 broadcast
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
------------------------------------------------------
R2(config)#int s3/2
R2(config-if)#ip add 192.168.123.2 255.255.255.0
R2(config-if)#encapsulation frame-relay ietf
R2(config-if)#no frame-relay inverse-arp
R2(config-if)#frame-relay lmi-type ansi
R2(config-if)#frame-relay map ip 192.168.123.1 201 broadcast
R2(config-if)#frame-relay map ip 192.168.123.3 203 broadcast
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
------------------------------------------------------
R3(config)#int s3/3
R3(config-if)#ip add 192.168.123.3 255.255.255.0
R3(config-if)#encapsulation frame-relay ietf
R3(config-if)#no frame-relay inverse-arp
R3(config-if)#frame-relay lmi-type ansi
R3(config-if)#frame-relay map ip 192.168.123.1 301 broadcast
R3(config-if)#frame-relay map ip 192.168.123.2 302 broadcast
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#

四、验证配置

查看FR路由
FR#sh frame-relay route
Input Intf Input Dlci Output Intf Output Dlci Status
Serial3/1 102 Serial3/2 201 active
Serial3/1 103 Serial3/3 301 active
Serial3/2 201 Serial3/1 102 active
Serial3/2 203 Serial3/3 302 active
Serial3/3 301 Serial3/1 103 active
Serial3/3 302 Serial3/2 203 active
配置好各路由器后,此时各帧中继链路都自动变为激活状态(前提是配置无误)。
------------------------------------------------------
查看映射
R1#sh frame-relay map
Serial3/1 (up): ip 192.168.123.2 dlci 102(0x66,0x1860), static,
broadcast,
IETF, status defined, active
Serial3/1 (up): ip 192.168.123.3 dlci 103(0x67,0x1870), static,
broadcast,
IETF, status defined, active
------------------------------------------------------
R2#sh frame-relay map
Serial3/2 (up): ip 192.168.123.1 dlci 201(0xC9,0x3090), static,
broadcast,
IETF, status defined, active
Serial3/2 (up): ip 192.168.123.3 dlci 203(0xCB,0x30B0), static,
broadcast,
IETF, status defined, active
------------------------------------------------------
R3#sh frame-relay map
Serial3/3 (up): ip 192.168.123.1 dlci 301(0x12D,0x48D0), static,
broadcast,
IETF, status defined, active
Serial3/3 (up): ip 192.168.123.2 dlci 302(0x12E,0x48E0), static,
broadcast,
IETF, status defined, active
------------------------------------------------------
查看永久虚电路,以R3为例
R3#sh frame-relay pvc

PVC Statistics for interface Serial3/3 (Frame Relay DTE)

Active Inactive Deleted Static
Local 2 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0

DLCI = 301, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial3/3

input pkts 9 output pkts 8 in bytes 540
out bytes 476 dropped pkts 0 in pkts dropped 0
out pkts dropped 0 out bytes dropped 0
in FECN pkts 0 in BECN pkts 0 out FECN pkts 0
out BECN pkts 0 in DE pkts 0 out DE pkts 0
out bcast pkts 2 out bcast bytes 128
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 00:01:39, last time pvc status changed 00:01:39

DLCI = 302, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial3/3

input pkts 8 output pkts 13 in bytes 448
out bytes 676 dropped pkts 0 in pkts dropped 0
out pkts dropped 0 out bytes dropped 0
in FECN pkts 0 in BECN pkts 0 out FECN pkts 0
out BECN pkts 0 in DE pkts 0 out DE pkts 0
out bcast pkts 1 out bcast bytes 64
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
pvc create time 00:01:21, last time pvc status changed 00:01:21

五、测试网络连通性

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 = 28/55/72 ms
------------------------------------------------------
R1#ping 192.168.123.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/40/68 ms
------------------------------------------------------

R2#ping 192.168.123.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.123.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/42/68 ms

------------------------------------------------------

至此,路由器之间能正常通讯。
但此时,路由器ping自己是ping不通的。比如R1:
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 0 percent (0/5)
------------------------------------------------------
为什么呢?因为frame-relay map里面并没有相关信息。需要手工添加,比如在R1上添加:
R1(config)#int s3/1
R1(config-if)#frame-relay map ip 192.168.123.1 102

然后我们再看一下R1上的映射
R1#sh frame-relay map
Serial3/1 (up): ip 192.168.123.1 dlci 102(0x66,0x1860), static,
IETF, status defined, active
Serial3/1 (up): ip 192.168.123.2 dlci 102(0x66,0x1860), static,
IETF, status defined, active
Serial3/1 (up): ip 192.168.123.3 dlci 103(0x67,0x1870), static,
IETF, status defined, active

此时再R1ping自己,便能ping通了。
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 = 56/97/140 ms

六、启动回环口,配置EIGRP

R1(config)#int loop 0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#exit
R1(config)#router eigrp 50
R1(config-router)#net 192.168.123.0 0.0.0.255
R1(config-router)#net 1.1.1.0 0.0.0.255
R1(config-router)#no auto-summary
R1(config-router)#exit
------------------------------------------------------
R2(config)#int loop 0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#exit
R2(config)#router eigrp 50
R2(config-router)#net 192.168.123.0 0.0.0.255
R2(config-router)#net 2.2.2.0 0.0.0.255
R2(config-router)#no auto-summary
R2(config-router)#exit
------------------------------------------------------
R3(config)#int loop 0
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#exit
R3(config)#router eigrp 50
R3(config-router)#net 192.168.123.0 0.0.0.255
R3(config-router)#net 3.3.3.0 0.0.0.255
R3(config-router)#no auto-summary
R3(config-router)

七、查看EIGRP路由

配置完成后,查看R1发现的eigrp邻居及其学习到的路由
R1#sh ip eigrp neighbors
IP-EIGRP neighbors for process 50
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 192.168.123.3 Se3/1 162 00:09:26 1041 5000 0 6
0 192.168.123.2 Se3/1 163 00:09:26 75 450 0 6
------------------------------------------------------
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C 192.168.123.0/24 is directly connected, Serial3/1
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/2297856] via 192.168.123.2, 00:07:26, Serial3/1
3.0.0.0/24 is subnetted, 1 subnets
D 3.3.3.0 [90/2297856] via 192.168.123.3, 00:07:26, Serial3/1
------------------------------------------------------

进行ping测试
R1#ping 3.3.3.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/37/64 ms

注:前面在配置映射时,设定了采用广播方式broadcast(如果不增加这个字段,表示采用非广播方式,则本实验是不能成功的),比如R1,
R1(config-if)#frame-relay map ip 192.168.123.2 102 broadcast
R1(config-if)#frame-relay map ip 192.168.123.3 103 broadcast
由于EIGRP默认是支持广播的,所以EIGRP能自动的发现邻居。
如果运行OSPF,默认是NBMA环境,不支持广播,因而不能自动发现邻居,需要静态的指定邻居,才能学习到其他路由器上的路由。
本文出自 “一树清劲” 博客,请务必保留此出处http://sunshyfangtian.blog.51cto.com/1405751/813815
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: