第二章 廣域網協定設定
一、HDLC
HDLC是CISCO路由器使用的預設協定,一台新路由器在未指定封裝協定時預設使用HDLC封裝。
1. 有關指令
端口設定
任務 指令
設定HDLC封裝 encapsulation hdlc
設定DCE端線路速度 clockrate speed
複位一個硬體接口 clear interface serial unit
顯示接口狀态 show interfaces serial [unit] 1
注:1.以下給出一個顯示Cisco同步序列槽狀态的例子.
Router#show interface serial 0
Serial 0 is up, line protocol is up
Hardware is MCI Serial
Internet address is 150.136.190.203, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:07, output 0:00:00, output hang never
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 0 bits/sec, 0 packets/sec
Five minute output rate 0 bits/sec, 0 packets/sec
16263 packets input, 1347238 bytes, 0 no buffer
Received 13983 broadcasts, 0 runts, 0 giants
2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort
22146 packets output, 2383680 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets, 0 restarts
1 carrier transitions
3. 舉例使用E1線路實作多個64K專線連接配接.
相關指令:
進入controller配置模式 controller {t1 | e1} number
選擇幀類型 framing {crc4 | no-crc4}
選擇line-code類型 linecode {ami | b8zs | hdb3}
建立邏輯通道組與時隙的映射 channel-group number timeslots range1
顯示controllers接口狀态 show controllers e1 [slot/port]2
注: 1. 當鍊路為T1時,channel-group編号為0-23, Timeslot範圍1-24; 當鍊路為E1時, channel-group編号為0-30, Timeslot範圍1-31.
2.使用show controllers e1觀察controller狀态,以下為幀類型為crc4時controllers正常的狀态.
Router# show controllers e1
e1 0/0 is up.
Applique type is Channelized E1 - unbalanced
Framing is CRC4, Line Code is HDB3 No alarms detected.
Data in current interval (725 seconds elapsed):
0 Line Code Violations, 0 Path Code Violations
0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
Total Data (last 24 hours) 0 Line Code Violations, 0 Path Code Violations,
0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,
以下例子為E1連接配接3條64K專線, 幀類型為NO-CRC4,非平衡鍊路,路由器具體設定如下:
shanxi#wri t
Building configuration...
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
hostname shanxi
enable secret 5 $1$XN08$Ttr8nfLoP9.2RgZhcBzkk/
enable password shanxi
ip subnet-zero
controller E1 0
framing NO-CRC4
channel-group 0 timeslots 1
channel-group 1 timeslots 2
channel-group 2 timeslots 3
interface Ethernet0
ip address 133.118.40.1 255.255.0.0
media-type 10BaseT
interface Ethernet1
no ip address
shutdown
interface Serial0:0
ip address 202.119.96.1 255.255.255.252
no ip mroute-cache
interface Serial0:1
ip address 202.119.96.5 255.255.255.252
interface Serial0:2
ip address 202.119.96.9 255.255.255.252
no ip classless
ip route 133.210.40.0 255.255.255.0 Serial0:0
ip route 133.210.41.0 255.255.255.0 Serial0:1
ip route 133.210.42.0 255.255.255.0 Serial0:2
line con 0
line aux 0
line vty 0 4
password shanxi
login
end
PPP
PPP(Point-to-Point Protocol)是SLIP(Serial Line IP protocol)的繼承者,它提供了跨過同步和異步電路實作路由器到路由器(router-to-router)和主機到網絡(host-to-network)的連接配接。
CHAP(Challenge Handshake Authentication Protocol)和PAP(Password Authentication Protocol) (PAP)通常被用于在PPP封裝的串行線路上提供安全性認證。使用CHAP和PAP認證,每個路由器通過名字來識别,可以防止未經授權的通路。
CHAP和PAP在RFC 1334上有詳細的說明。
設定PPP封裝 encapsulation ppp1
設定認證方法 ppp authentication {chap | chap pap | pap chap | pap} [if-needed] [list-name | default] [callin]
指定密碼 username name password secret
注:1、要使用CHAP/PAP必須使用PPP封裝。在與非Cisco路由器連接配接時,一般采用PPP封裝,其它廠家路由器一般不支援Cisco的HDLC封裝協定。
X.25
1. X25技術
X.25規範對應OSI三層,X.25的第三層描述了分組的格式及分組交換的過程。X.25的第二層由LAPB(Link Access Procedure, Balanced)實作,它定義了用于DTE/DCE連接配接的幀格式。X.25的第一層定義了電氣和實體端口特性。
X.25網絡裝置分為資料終端裝置(DTE)、資料電路終端裝置(DCE)及分組交換裝置(PSE)。DTE是X.25的末端系統,如終端、計算機或網絡主機,一般位于使用者端,Cisco路由器就是DTE裝置。DCE裝置是專用通信裝置,如數據機和分組交換機。PSE是公共網絡的主幹交換機。
X.25定義了資料通訊的電話網絡,每個配置設定給使用者的x.25 端口都具有一個x.121位址,當使用者申請到的是SVC(交換虛電路)時,x.25一端的使用者在通路另一端的使用者時,首先将呼叫對方x.121位址,然後接收到呼叫的一端可以接受或拒絕,如果接受請求,于是連接配接建立實作資料傳輸,當沒有資料傳輸時挂斷連接配接,整個呼叫過程就類似我們撥打普通電話一樣,其不同的是x.25可以實作一點對多點的連接配接。其中x.121位址、htc均必須與x.25服務提供商配置設定的參數相同。X.25 PVC(永久虛電路),沒有呼叫的過程,類似DDN專線。
2. 有關指令:
設定X.25封裝 encapsulation x25 [dce]
設定X.121位址 x25 address x.121-address
設定遠方站點的位址映射 x25 map protocol address [protocol2 address2[...[protocol9 address9]]] x121-address [option]
設定最大的雙向虛電路數 x25 htc citcuit-number1
設定一次連接配接可同時建立的虛電路數 x25 nvc count2
設定x25在清除空閑虛電路前的等待周期 x25 idle minutes
重新啟動x25,或清一個svc,啟動一個pvc相關參數 clear x25 {serial number | cmns-interface mac-address} [vc-number] 3
清x25虛電路 clear x25-vc
顯示接口及x25相關資訊 show interfaces serialshow x25 interfaceshow x25 mapshow x25 vc
注:1、虛電路号從1到4095,Cisco路由器預設為1024,國内一般配置設定為16。
2、虛電路計數從1到8,預設為1。
3、在改變了x.25各層的相關參數後,應重新啟動x25(使用clear x25 {serial number | cmns-interface mac-address} [vc-number]或clear x25-vc指令),否則新設定的參數可能不能生效。同時應對照服務提供商對于x.25交換機端口的設定來配置路由器的相關參數,若出現參數不比對則可能會導緻連接配接失敗或其它意外情況。
本文轉自xubenxin 51CTO部落格,原文連結:http://blog.51cto.com/windows/13461,如需轉載請自行聯系原作者