设为首页 收藏本站
查看: 1299|回复: 0

[经验分享] 把一个Cisco路由器配置为帧中继交换机

[复制链接]

尚未签到

发表于 2018-7-21 06:21:42 | 显示全部楼层 |阅读模式
实验是把一个Cisco路由器配置为帧中继交换机,我所使用的Router为3640!


注意:记住虽然一个路由器可以用做帧中继交换机,但是这种情况只在实验及例子中使用。


实验拓扑图,如下:





实验连线:


R1 S0/0 <---->Framechs0/0


R3 S0/1 <----> FramechS0/1



实验IP地址表:

R1 S0/0192.1.1.1/24

R3 S0/1192.1.1.3/24



实验的基本详细配置如下:


R1:


router>en

router#config t

Enter configuration commands, .e per line. End with CNTL/Z.

router(config)#hostname R1

R1(config)#int s0/0

R1(config-if)#ip address 192.1.1.1 255.255.255.0 //为接口配置IP地址和子网掩码

R1(config-if)#encapsulation frame-relay //默认为Cisco,有两种封装的方式,分别为RFC 1490和Cisco专有封装。

R1(config-if)#frame-relay lmi-type ansi //设置LMI(本地管理接口)类型为ANSI 附件D

R1(config-if)#frame-relay interface-dlci 100 //设置本地DICI号为100,这个号码一般是提供商分给我们的,只具有本地意义。

R1(config-fr-dlci)#exit

R1(config-if)#no shut //别忘记开启接口!

R1(config-if)#exit

R1(config)#router rip //启动RIP协议

R1(config-router)#network 192.1.1.0

R1(config-router)#end

R1#



R3:



router>en

router#config t

Enter configuration commands, .e per line. End with CNTL/Z.

router(config)#hostname R3

R3(config)#int s0/1

R3(config-if)#ip address 192.1.1.3 255.255.255.0

R3(config-if)#encapsulation frame-relay

R3(config-if)#frame-relay lmi-type ansi

R3(config-if)#frame-relay interface-dlci 101

R3(config-fr-dlci)#no shut

R3(config-if)#end

R3#config t

Enter configuration commands, .e per line. End with CNTL/Z.

R3(config)#router rip

R3(config-router)#network 192.1.1.0

R3(config-router)#end

R3#



注意:

LMI(本地管理接口)---路由器和帧中继交换机之间的信令协议。有三种 分别为ANSI附件D,CCITT附件A,Cisco.




Framech:


Router>en

Router#config t

Enter configuration commands, .e per line. End with CNTL/Z.

Router(config)#hostname Framech

Framech(config)#frame-relay switching //在全局模式下,把router配置为具有帧中继交换机的能力!

Framech(config)#int s0/0

Framech(config-if)#clock rate 64000 //给R1的S0/0口提供时钟

Framech(config-if)#encapsulation frame-relay

Framech(config-if)#frame-relay lmi-type ansi

Framech(config-if)#frame-relay intf-type dce //配置帧中继交换机的类型,当然使用这个命令的时候是把Router当Frame-relayswitching用时才使用的

Framech(config-if)#frame-relay route 100 int s0/1 101 //两个接口间的一条PVC.

Framech(config-if)#no shut

Framech(config-if)#int s0/1

Framech(config-if)#clock rate 64000

Framech(config-if)#enca

Framech(config-if)#encapsulation frame-relay

Framech(config-if)#frame-relay lmi-type ansi

Framech(config-if)#frame-relay intf-type dce

Framech(config-if)#frame-relay route 101 int s0/0 100

Framech(config-if)#no shut

Framech(config-if)#end

Framech#



注意:

帧中继PVC是通过frame-relay route命令来定义的。举个例子,frame-relay route 100 int s0/1 101 这个命令告诉路由器:任何一个以DLCI 100 进入接口S0/0的帧中继业务,应该以DLCI 101 发出到接口S0/1.


到这里实验已经配置完全,下面我介绍一些Frame-relay 常用到的命令。


检测配置:

1.使用show frame pvc


Framech>en

Framech#show frame pvc

PVC Statistics for interface Serial0/0(Frame>


Active Inactive Deleted Static

Local 0 0 0 0

Switched 1 0 0 0

Unused 0 0 0 0


DLCI = 100, DLCI USAGE = SWITCHED, PVCSTATUS = ACTIVE, INTERFACE = Serial0/0


input pkts 52 output pkts 51 in bytes 3348

out bytes 3314 dropped pkts 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 0 out bcast bytes 0

switched pkts 52

Detailed packet drop counters:

no out intf 0 out intf down 0 no out PVC 0

in PVC down 0 out PVC down 0 pkt too big 0

shaping Q full 0 pkt above DE 0 policing drop 0

pvc create time 00:21:39, lasttime pvc status changed 00:19:34


注意:

PVC统计表表明了S0/0接口在这里的作用是帧中继DCE接口。在交换过程中也体现出了DLCI的用途,Pkt交换数目也显示出一共有多少帧通过接口,并被转发.。FECN\,BECN.ED,的数目,这些性能对于网络是否阻塞是非常关键的。最后一句表明了PVC维持了多少时间和它最后一次状态改变是什么时候


2. show frame lmi //路由器和交换机间的LMI相联的详细统计表。


Framech>en

Framech#show framelmi

LMI Statistics forinterface Serial0/0 (Frame>LMI TYPE = ANSI

Invalid Unnumbered info 0 Invalid Prot Disc 0

Invalid dummy Call Ref 0 Invalid Msg Type 0

Invalid Status Message 0 Invalid Lock Shift 0


Invalid Information>
Invalid Report Request 0 Invalid Keep IE Len 0

Num Status Enq. Rcvd 221 Num Status msgs Sent 221

Num Update Status Sent 0 Num St Enq. Timeouts 0


3. show frame route //显示所有配置的DLCI。

Framech#show frame route

Input Intf Input Dlci Output Intf Output Dlci Status

Serial0/0 100 Serial0/1 101 active

Serial0/1 101 Serial0/0 100 active


4.show int s0/0 //显示接口的状态信息。

Framech#show int s0/0

Serial0/0 is up, line protocol is up

Hardware is M4T

MTU 1500 bytes, BW 2048 Kbit, DLY20000 usec,

reliability 255/255, txload1/255, rxload 1/255

Encapsulation FRAME-RELAY, crc 16, loopback not set

Keepalive set (10 sec)

LMI enq sent 0, LMI stat recvd0, LMI upd recvd 0

LMI enq recvd 255, LMI stat sent 255, LMI upd sent 0, DCE LMI up

LMI DLCI 0 LMI type is ANSI AnnexD frame>

FR SVC disabled, LAPF state down

Broadcast queue 0/64, broadcastssent/dropped 0/0, interface broadcasts 0

Last input 00:00:08, output00:00:08, output hang never

Last clearing of &quot;showinterface&quot; counters 00:43:47

Input queue: 0/75/0/0(size/max/drops/flushes); Total output drops: 0

Queueing strategy: weighted fair

Output queue: 0/1000/64/0(size/max total/threshold/drops)

Conversations 0/1/256 (active/max active/max total)

Reserved Conversations 0/0(allocated/max allocated)

Available Bandwidth 1536 kilobits/sec

5 minute input rate 0 bits/sec, 0packets/sec

5 minute output rate 0 bits/sec, 0packets/sec

353 packets input, 9494 bytes,0 no buffer

Received 0 broadcasts, 0 runts,0 giants, 0 throttles

0 input errors, 0 CRC, 0 frame,0 overrun, 0 ignored, 0 abort

352 packets output, 9680 bytes,0 underruns

0 output errors, 0 collisions,1 interface resets

0 output buffer failures, 0output buffers swapped out

1 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up


在R1上:


使用 show frame map


R1>en

R1#show frame map

Serial0/0 (up): ip 192.1.1.3 dlci 100(0x64,0x1840), dynamic,

broadcast,, statusdefined, active


情况表明这里使用DLCI to IP 的方法,这样的方法我们称为动态方法,这是通过反向地址解析协议形成的。后面我再写相关文章时再介绍一下。


使用 show int s0/0


R1#show int s0/0

Serial0/0 is up, line protocol isup //表明接口正在接收从帧中继交换机来载波监听帧

Hardware is M4T

Internet address is 192.1.1.1/24

MTU 1500 bytes, BW 2048 Kbit, DLY20000 usec,

reliability 255/255, txload1/255, rxload 1/255

Encapsulation FRAME-RELAY, crc 16, loopback not set

Keepalive set (10 sec)

LMI enq sent 620, LMI stat recvd 501, LMI upd recvd 0, DTE LMI up

LMI enq recvd 48, LMI statsent 0, LMI upd sent 0


LMI DLCI 0 LMI type is ANSI Annex D frame>
FR SVC disabled, LAPF state down

……..

情况表明路由器是帧中继DTE设备


下面我们来看一下,R1与R3能否通信。


R1#ping 192.1.1.3


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.1.1.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 24/34/60 ms



R3#ping 192.1.1.1


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 20/39/92 ms


情况表明R1,R3是可以互相通信的。

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-539293-1-1.html 上篇帖子: cisco 交换机密码还原 下篇帖子: 你了解Cisco的PVST、PVST+和Rapid-PVST+吗? .
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表