查看接口狀態
提問 查看當前路由器接 口狀態
回答
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