您现在的位置: 万盛学电脑网 >> 电脑基础 >> 电脑入门 >> 正文

路由器查看接口状态 电脑技术吧

作者:佚名    责任编辑:admin    更新时间:2022-06-22

查看接口状态   提问 查看当前路由器接 口状态 回答 Router1#show interfaces Router1#show interfaces FastEthernet0/1 Router1#show ip interface brief Router1#show ip interface FastEthernet0/1 注释 show interface命令得输出有很多得信息,网上一些中文文档详细介绍输出得含义,这里不翻译了。Txload和rxload这两个测量值得周期缺省是5分钟,可以使用load-interval 60 命令来修改其为60秒,必须是30得倍数,最长10分钟。再来一个隐藏命令 Router1#show interfaces FastEthernet0/1 stats FastEthernet0/1           Switching path    Pkts In   Chars In   Pkts Out  Chars Out                Processor     294567   18704930     239526   22219870              Route cache       7758     681257      48303    6129834                    Total     302325   19386187     287829   28349704 Processor是process switching,Route cache是Fast Switching 16.2.  配置串行接口 提问 为广域网连接配置串行接口 回答 Router3#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router3(config)#interface Serial1 Router3(config-if)#description WAN Connection to Chicago Router3(config-if)#ip address 192.168.99.5 255.255.255.252 Router3(config-if)#encapsulation hdlc Router3(config-if)#clock rate 56000 Router3(config-if)#no shutdown Router3(config-if)#exit Router3(config)#end Router3# 注释 在DCE侧需要配置clock rate,如果是DTE配置了clock rate路由器会忽略此配置。通过show controller serial 命令来判断连接线缆得类型。缺省情况路由器会认为串口为1.544M带宽,而实际可能不是,为了准确进行路由协议度量值计算,需要人工bandwidth命令来修改,注意这里得单位是Kilobits每秒,而clock rate是bits每秒 16.3.  使用内置T1 CSU/DSU 提问 使用内置T1 CSU/DSU配置广域网连接 回答 Router1#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router1(config)#interface Serial0/1 Router1(config-if)#ip address 192.168.99.9 255.255.255.252 Router1(config-if)#no shutdown Router1(config-if)#service-module t1 timeslots 1-12 Router1(config-if)#exit Router1(config)#end Router1# 注释 缺省每个channel使用64Kbps,如果电路是56k的需要在上述service module命令后面加上speed 56。还有很多的参数,需要和对端一致 Router1(config-if)#service-module t1 linecode ami Router1(config-if)#service-module t1 data-coding inverted Router1(config-if)#service-module t1 framing sf Router1(config-if)#service-module t1 fdl ansi Router1(config-if)#service-module t1 fdl att Router1(config-if)#service-module t1 remote-alarm-enable 通常运营商会提供时钟,如果在实验网络需要其成为DCE需要配置service-module t1 clock source internal 来提供时钟 16.4. 使用内置ISDN PRI 模块 提问 配置内置ISDN PRI 模块 回答 Router8#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router8(config)#isdn switch-type primary-dms100 Router8(config)#controller T1 0 Router8(config-controlle)#framing esf Router8(config-controlle)#clock source line primary Router8(config-controlle)#linecode b8zs Router8(config-controlle)#pri-group timeslots 1-24 Router8(config-controlle)#exit Router8(config)#end Router8# 注释 无 16.5.  使用内置56 Kbps CSU/DSU 提问 配置内置56 Kbps CSU/DSU 回答 Router2#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router2(config)#interface Serial0/1 Router2(config-if)#ip address 192.168.99.25 255.255.255.252 Router2(config-if)#no shutdown Router2(config-if)#service-module 56k clock rate 9.6 Router2(config-if)#exit Router2(config)#end Router2# 注释 这种模块没有见过,有点晕,先略一下 16.6.  配置异步串行接口 提问 配置一个同步/异步串行接口工作于异步模式 回答 Router3#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router3(config)#interface Serial1/7 Router3(config-if)#physical-layer async Router3(config-if)#encapsulation ppp Router3(config-if)#exit Router3(config)#line 40 Router3(config-line)#speed 115200 Router3(config-line)#exit Router3(config)#end Router3# 注释 在配置了physical-layer async命令以后需要查看line号 Router3#show line   Tty Typ    Tx/Rx    A Modem Roty AccO AccI  Uses  Noise  Overruns  Int     0 CTY             -    -     -    -    -     0      0     0/0      -    40 TTY  9600/9600  -    -     -    -    -     0      0     0/0     Se1/7    65 AUX  2400/2400  F    -     -    -    -     0      0     0/0      - 看到Se1/7为line 40,同时其速率变为9600,所以需要使用speed命令来修改速率 16.7.  配置ATM子接口 提问 基于PVC得ATM链路互联 回答 老方法 Router2#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router2(config)#interface ATM0/0 Router2(config-if)#no ip address Router2(config-if)#exit Router2(config)#interface ATM0/0.1 point-to-point Router2(config-subif)#description PVC to New York Router2(config-subif)#ip address 192.168.250.146 255.255.255.252 Router2(config-subif)#atm pvc 1 0 60 aal5snap 10000 5000 3 oam 5 Router2(config-subif)#exit Router2(config)#end Router2# 11.3以后使用思科特性周期性发送ATM OAM信元来测试VC Router2#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router2(config)#interface ATM0/0 Router2(config-if)#no ip address Router2(config-if)#exit Router2(config)#interface ATM0/0.1 point-to-point Router2(config-subif)#description PVC to New York Router2(config-subif)#ip address 192.168.250.146 255.255.255.252 Router2(config-subif)#pvc 0/60 Router2(config-if-atm-vc)#vbr-nrt 10000 5000 30 Router2(config-if-atm-vc)#oam-pvc manage 5 Router2(config-if-atm-vc)#exit Router2(config)#end Router2# 注释 第一种方法验证Router2#show atm pvc 0/60 ATM0/0.1: VCD: 1, VPI: 0, VCI: 60, etype:0×0, AAL5 – LLC/SNAP, Flags: 0×830 PeakRate: 10000, Average Rate: 5000, Burst Cells: 96, VCmode: 0xE000 OAM frequency: 5 second(s), InARP frequency: 15 minute(s) InPkts: 1292959637, OutPkts: 3327374998, InBytes: 2196038015, OutBytes: 813592646 InPRoc: 19959239, OutPRoc: 24660, Broadcasts: 19481389 InFast: 1212924649, OutFast: 3297025318, InAS: 60075750, OutAS: 10843631 OAM F5 cells sent: 6804133, OAM cells received: 6740056 Status: ACTIVE VCD是本地有效,VPI VCI必须和对端相同,至于封装协议推荐是AAL5SNAP,如果需要支持PPP则改为AAL5CISCOPPP 在新方法里面已经没有配置VCD了,并且如果3个OAM信元没有收到就会标记此接口断掉,在12.2(4)T后还引入了Router2(config)#snmp-server enable traps atm pvc extension oam failure loopback 来支持SNMP告警   设置有效载荷绕码(Payload Scrambling) 提问 回答 Router2#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router2(config)#interface ATM0/0 Router2(config-if)#atm ds3-scramble  (atm e3-scramble) Router2(config-if)#exit Router2(config)#end Router2# Router4#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router4(config)#interface ATM0/0 Router4(config-if)#atm scrambling cell-payload Router4(config-if)#exit Router4(config)#end Router4# 注释 暂略 16.9.  传统的ATM承载IP(Classical IP Over ATM) 提问 配置路由器支持SVC和传统的ATM承载IP 回答 首先ATMARP Server Router1#configure terminal Enter configuration commands, one per line.  End with CNTL/Z. Router1(config)#interface ATM1/0 Router1(config-if)#no ip address Router1(config-if)#atm ilmi-keepalive Router1(config-if)#pvc 0/5 qsaal Router1(config-if-atm-vc)#exit Router1(config-if)#pvc 0/16 ilmi Router1(config-if-atm-vc)#exit Router1(config-if)#exit Router1(config)#interface ATM1/0.1 multipoint Router1(config-subif)#ip add