?? route學(xué)習(xí).txt
字號(hào):
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,
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
以下例子為E1連接3條64K專(zhuān)線, 幀類(lèi)型為NO-CRC4,非平衡鏈路,路由器具體設(shè)置如下:
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
no ip mroute-cache
!
interface Serial0:2
ip address 202.119.96.9 255.255.255.252
no ip mroute-cache
!
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
CISCO路由器配置手冊(cè)-第二章(廣域網(wǎng)協(xié)議設(shè)置PPP)
二、PPP
PPP(Point-to-Point Protocol)是SLIP(Serial Line IP protocol)的繼承者,它提供了跨過(guò)同步和異步電路實(shí)現(xiàn)路由器到路由器(router-to-router)和主機(jī)到網(wǎng)絡(luò)(host-to-network)的連接。
CHAP(Challenge Handshake Authentication Protocol)和PAP(Password Authentication Protocol) (PAP)通常被用于在PPP封裝的串行線路上提供安全性認(rèn)證。使用CHAP和PAP認(rèn)證,每個(gè)路由器通過(guò)名字來(lái)識(shí)別,可以防止未經(jīng)授權(quán)的訪問(wèn)。
CHAP和PAP在RFC 1334上有詳細(xì)的說(shuō)明。
1. 有關(guān)命令
端口設(shè)置
任務(wù)
命令
設(shè)置PPP封裝
encapsulation ppp1
設(shè)置認(rèn)證方法
ppp authentication {chap | chap pap | pap chap | pap} [if-needed] [list-name | default] [callin]
指定口令
username name password secret
設(shè)置DCE端線路速度
clockrate speed
注:1、要使用CHAP/PAP必須使用PPP封裝。在與非Cisco路由器連接時(shí),一般采用PPP封裝,其它廠家路由器一般不支持Cisco的HDLC封裝協(xié)議。
2. 舉例
路由器Router1和Router2的S0口均封裝PPP協(xié)議,采用CHAP做認(rèn)證,在Router1中應(yīng)建立一個(gè)用戶(hù),以對(duì)端路由器主機(jī)名作為用戶(hù)名,即用戶(hù)名應(yīng)為router2。同時(shí)在Router2中應(yīng)建立一個(gè)用戶(hù),以對(duì)端路由器主機(jī)名作為用戶(hù)名,即用戶(hù)名應(yīng)為router1。所建的這兩用戶(hù)的password必須相同。
設(shè)置如下:
Router1:
hostname router1
username router2 password xxx
interface Serial0
ip address 192.200.10.1 255.255.255.0
clockrate 1000000
ppp authentication chap
!
Router2:
hostname router2
username router1 password xxx
interface Serial0
ip address 192.200.10.2 255.255.255.0
ppp authentication chap
!
CISCO路由器配置手冊(cè)-第二章(廣域網(wǎng)協(xié)議設(shè)置x.25)
三、x.25
1. X25技術(shù)
X.25規(guī)范對(duì)應(yīng)OSI三層,X.25的第三層描述了分組的格式及分組交換的過(guò)程。X.25的第二層由LAPB(Link Access Procedure, Balanced)實(shí)現(xiàn),它定義了用于DTE/DCE連接的幀格式。X.25的第一層定義了電氣和物理端口特性。
X.25網(wǎng)絡(luò)設(shè)備分為數(shù)據(jù)終端設(shè)備(DTE)、數(shù)據(jù)電路終端設(shè)備(DCE)及分組交換設(shè)備(PSE)。DTE是X.25的末端系統(tǒng),如終端、計(jì)算機(jī)或網(wǎng)絡(luò)主機(jī),一般位于用戶(hù)端,Cisco路由器就是DTE設(shè)備。DCE設(shè)備是專(zhuān)用通信設(shè)備,如調(diào)制解調(diào)器和分組交換機(jī)。PSE是公共網(wǎng)絡(luò)的主干交換機(jī)。
X.25定義了數(shù)據(jù)通訊的電話(huà)網(wǎng)絡(luò),每個(gè)分配給用戶(hù)的x.25 端口都具有一個(gè)x.121地址,當(dāng)用戶(hù)申請(qǐng)到的是SVC(交換虛電路)時(shí),x.25一端的用戶(hù)在訪問(wèn)另一端的用戶(hù)時(shí),首先將呼叫對(duì)方x.121地址,然后接收到呼叫的一端可以接受或拒絕,如果接受請(qǐng)求,于是連接建立實(shí)現(xiàn)數(shù)據(jù)傳輸,當(dāng)沒(méi)有數(shù)據(jù)傳輸時(shí)掛斷連接,整個(gè)呼叫過(guò)程就類(lèi)似我們撥打普通電話(huà)一樣,其不同的是x.25可以實(shí)現(xiàn)一點(diǎn)對(duì)多點(diǎn)的連接。其中x.121地址、htc均必須與x.25服務(wù)提供商分配的參數(shù)相同。X.25 PVC(永久虛電路),沒(méi)有呼叫的過(guò)程,類(lèi)似DDN專(zhuān)線。
2. 有關(guān)命令:
任務(wù)
命令
設(shè)置X.25封裝
encapsulation x25 [dce]
設(shè)置X.121地址
x25 address x.121-address
設(shè)置遠(yuǎn)方站點(diǎn)的地址映射
x25 map protocol address [protocol2 address2[...[protocol9 address9]]] x121-address [option]
設(shè)置最大的雙向虛電路數(shù)
x25 htc citcuit-number1
設(shè)置一次連接可同時(shí)建立的虛電路數(shù)
x25 nvc count2
設(shè)置x25在清除空閑虛電路前的等待周期
x25 idle minutes
重新啟動(dòng)x25,或清一個(gè)svc,啟動(dòng)一個(gè)pvc相關(guān)參數(shù)
clear x25 {serial number | cmns-interface mac-address} [vc-number] 3
清x25虛電路
clear x25-vc
顯示接口及x25相關(guān)信息
show interfaces serial
show x25 interface
show x25 map
show x25 vc
注:1、虛電路號(hào)從1到4095,Cisco路由器默認(rèn)為1024,國(guó)內(nèi)一般分配為16。
2、虛電路計(jì)數(shù)從1到8,缺省為1。
3、在改變了x.25各層的相關(guān)參數(shù)后,應(yīng)重新啟動(dòng)x25(使用clear x25 {serial number | cmns-interface mac-address} [vc-number]或clear x25-vc命令),否則新設(shè)置的參數(shù)可能不能生效。同時(shí)應(yīng)對(duì)照服務(wù)提供商對(duì)于x.25交換機(jī)端口的設(shè)置來(lái)配置路由器的相關(guān)參數(shù),若出現(xiàn)參數(shù)不匹配則可能會(huì)導(dǎo)致連接失敗或其它意外情況。
3. 實(shí)例:
3.1. 在以下實(shí)例中每二個(gè)路由器間均通過(guò)svc實(shí)現(xiàn)連接。
路由器設(shè)置如下:
Router1:
interface Serial0
encapsulation x25
ip address 192.200.10.1 255.255.255.0
x25 address 110101
x25 htc 16
x25 nvc 2
x25 map ip 192.200.10.2 110102 broadcast
x25 map ip 192.200.10.3 110103 broadcast
!
Router2:
interface Serial0
encapsulation x25
ip address 192.200.10.2 255.255.255.0
x25 address 110102
x25 htc 16
x25 nvc 2
x25 map ip 192.200.10.1 110101 broadcast
x25 map ip 192.200.10.3 110103 broadcast
!
Router:
interface Serial0
encapsulation x25
ip address 192.200.10.3 255.255.255.0
x25 address 110103
x25 htc 16
x25 nvc 2
x25 map ip 192.200.10.1 110101 broadcast
x25 map ip 192.200.10.2 110102 broadcast
!
相關(guān)調(diào)試命令:
clear x25-vc
show interfaces serial
show x25 map
show x25 route
show x25 vc
3.2. 在以下實(shí)例中路由器router1和router2均通過(guò)svc與router連接,但router1和router2不通過(guò)svc直接連接,此三個(gè)路由器的串口運(yùn)行RIP路由協(xié)議,使用了子接口的概念。由于使用子接口,router1和router2均學(xué)習(xí)到了訪問(wèn)對(duì)方局域網(wǎng)的路徑,若不使用子接口,router1和router2將學(xué)不到到對(duì)方局域網(wǎng)的路由。
子接口(Subinterface)是一個(gè)物理接口上的多個(gè)虛接口,可以用于在同一個(gè)物理接口上連接多個(gè)網(wǎng)。我們知道為了避免路由循環(huán),路由器支持split horizon法則,它只允許路由更新被分配到路由器的其它接口,而不會(huì)再分配路由更新回到此路由被接收的接口。
無(wú)論如何,在廣域網(wǎng)環(huán)境使用基于連接的接口(象 X.25和Frame Relay),同一接口通過(guò)虛電路(vc)連接多臺(tái)遠(yuǎn)端路由器時(shí),從同一接口來(lái)的路由更新信息不可以再被發(fā)回到相同的接口,除非強(qiáng)制使用分開(kāi)的物理接口連接不同的路由器。Cisco提供子接口(subinterface)作為分開(kāi)的接口對(duì)待。你可以將路由器邏輯地連接到相同物理接口的不同子接口, 這樣來(lái)自不同子接口的路由更新就可以被分配到其他子接口,同時(shí)又滿(mǎn)足split horizon法則。
Router1:
interface Serial0
encapsulation x25
ip address 192.200.10.1 255.255.255.0
x25 address 110101
x25 htc 16
x25 nvc 2
x25 map ip 192.200.10.3 110103 broadcast
!
router rip
network 192.200.10.0
!
Router2:
interface Serial0
encapsulation x25
ip address 192.200.11.2 255.255.255.0
x25 address 110102
x25 htc 16
x25 nvc 2
x25 map ip 192.200.11.3 110103 broadcast
!
router rip
network 192.200.11.0
!
Router:
interface Serial0
encapsulation x25
x25 address 110103
x25 htc 16
x25 nvc 2
!
interface Serial0.1 point-to-point
ip address 192.200.10.3 255.255.255.0
x25 map ip 192.200.10.1 110101 broadcast
!
interface Serial0.2 point-to-point
ip address 192.200.11.3 255.255.255.0
x25 map ip 192.200.11.2 110102 broadcast
!
router rip
network 192.200.10.0
network 192.200.11.0
!
返回目錄
CISCO路由器配置手冊(cè)-第二章(廣域網(wǎng)協(xié)議設(shè)置Frame Relay)
四、Frame Relay
1. 幀中繼技術(shù)
幀中繼是一種高性能的WAN協(xié)議,它運(yùn)行在OSI參考模型的物理層和數(shù)據(jù)鏈路層。它是一種數(shù)據(jù)包交換技術(shù),是X.25的簡(jiǎn)化版本。它省略了X.25的一些強(qiáng)健功能,如提供窗口技術(shù)和數(shù)據(jù)重發(fā)技術(shù),而是依靠高層協(xié)議提供糾錯(cuò)功能,這是因?yàn)閹欣^工作在更好的WAN設(shè)備上,這些設(shè)備較之X.25的WAN設(shè)備具有更可靠的連接服務(wù)和更高的可靠性,它嚴(yán)格地對(duì)應(yīng)于OSI參考模型的最低二層,而X.25還提供第三層的服務(wù),所以,幀中繼比X.25具有更高的性能和更有效的傳輸效率。
幀中繼廣域網(wǎng)的設(shè)備分為數(shù)據(jù)終端設(shè)備(DTE)和數(shù)據(jù)電路終端設(shè)備(DCE),Cisco路由器作為 DTE設(shè)備。
幀中繼技術(shù)提供面向連接的數(shù)據(jù)鏈路層的通信,在每對(duì)設(shè)備之間都存在一條定義好的通信鏈路,且該鏈路有一個(gè)鏈路識(shí)別碼。這種服務(wù)通過(guò)幀中繼虛電路實(shí)現(xiàn),每個(gè)幀中繼虛電路都以數(shù)據(jù)鏈路識(shí)別碼(DLCI)標(biāo)識(shí)自己。DLCI的值一般由幀中繼服務(wù)提供商指定。幀中繼即支持PVC也支持SVC。
幀中繼本地管理接口(LMI)是對(duì)基本的幀中繼標(biāo)準(zhǔn)的擴(kuò)展。它是路由器和幀中繼交換機(jī)之間信令標(biāo)準(zhǔn),提供幀中繼管理機(jī)制。它提供了許多管理復(fù)雜互聯(lián)網(wǎng)絡(luò)的特性,其中包括全局尋址、虛電路狀態(tài)消息和多目發(fā)送等功能。
2. 有關(guān)命令:
端口設(shè)置
任務(wù)
命令
設(shè)置Frame Relay封裝
encapsulation frame-relay[ietf] 1
設(shè)置Frame Relay LMI類(lèi)型
frame-relay lmi-type {ansi | cisco | q933a}2
設(shè)置子接口
interface interface-type interface-number.subinterface-number [multipoint|point-to-point]
映射協(xié)議地址與DLCI
frame-relay map protocol protocol-address dlci [broadcast]3
設(shè)置FR DLCI編號(hào)
frame-relay interface-dlci dlci [broadcast]
注:1.若使Cisco路由器與其它廠家路由設(shè)備相連,則使用Internet工程任務(wù)組(IETF)規(guī)定的幀中繼封裝格式。
2.從Cisco IOS版本11.2開(kāi)始,軟件支持本地管理接口(LMI)“自動(dòng)感覺(jué)”, “自動(dòng)感覺(jué)”使接口能確定交換機(jī)支持的LMI類(lèi)型,用戶(hù)可以不明確配置LMI接口類(lèi)型。
3.broadcast選項(xiàng)允許在幀中繼網(wǎng)絡(luò)上傳輸路由廣播信息。
3. 幀中繼point to point配置實(shí)例:
Router1:
interface serial 0
encapsulation frame-relay
!
interface serial 0.1 point-to-point
ip address 172.16.1.1 255.255.255.0
frame-reply interface-dlci 105
!
interface serial 0.2 point-to-point
ip address 172.16.2.1 255.255.255.0
frame-reply interface-dlci 102
!
interface serial 0.3 point-to-point
ip address 172.16.4.1 255.255.255.0
frame-reply interface-dlci 104
!
Router2:
interface serial 0
encapsulation frame-relay
!
interface serial 0.1 point-to-point
ip address 172.16.2.2 255.255.255.0
frame-reply interface-dlci 201
!
interface serial 0.2 point-to-point
ip address 172.16.3.1 255.255.255.0
frame-reply interface-dlci 203
!
相關(guān)調(diào)試命令:
show frame-relay lmi
show frame-relay map
show frame-relay pvc
show frame-relay route
show interfaces serial
go top
4. 幀中繼 Multipoint 配置實(shí)例:
Router1:
interface serial 0
encapsulation frame-reply
!
interface serial 0.1 multipoint
ip address 172.16.1.2 255.255.255.0
frame-reply map ip 172.16.1.1 201 broadcast
frame-reply map ip 172.16.1.3 301 broadcast
frame-reply map ip 172.16.1.4 401 broadcast
!
Router2:
interface serial 0
encapsulation frame-reply
!
interface serial 0.1 multipoint
ip address 172.16.1.1 255.255.255.0
frame-reply map ip 172.16.1.2 102 broadcast
frame-reply map ip 172.16.1.3 102 broadcast
frame-reply map ip 172.16.1.4 102 broadcast
!
CISCO路由器配置手冊(cè)-第二章(廣域網(wǎng)協(xié)議設(shè)置ISDN)
五、ISDN
1. 綜合數(shù)字業(yè)務(wù)網(wǎng)(ISDN)
綜合數(shù)字業(yè)務(wù)網(wǎng)(ISDN)由數(shù)字電話(huà)和數(shù)據(jù)傳輸服務(wù)兩部分組成,一般由電話(huà)局提供這種服務(wù)。ISDN的基本速率接口(BRI)服務(wù)提供2個(gè)B信道和1個(gè)D信道(2B+D)。BRI的B信道速率為64Kbps,用于傳輸用戶(hù)數(shù)據(jù)。D信道的速率為16Kbps,主要傳輸控制信號(hào)。在北美和日本,ISDN的主速率接口(PRI)提供23個(gè)B信道和1個(gè)D信道,總速率可達(dá)1.544Mbps,其中D信道速率為64Kbps。而在歐洲、澳大利亞等國(guó)家,ISDN的PRI提供30個(gè)B信道和1個(gè)64Kbps D信道,總速率可達(dá)2.048Mbps。我國(guó)電話(huà)局所提供ISDN PRI為30B+D。
2. 基本命令
任務(wù)
命令
設(shè)置ISDN交換類(lèi)型
isdn switch-type switch-type1
接口設(shè)置
interface bri 0
設(shè)置PPP封裝
encapsulation ppp
設(shè)置協(xié)議地址與電話(huà)號(hào)碼的映射
dialer map protocol next-hop-address [name hostname] [broadcast] [dial-string]
啟動(dòng)PPP多連接
ppp multilink
設(shè)置啟動(dòng)另一個(gè)B通道的閾值
dialer load-threshold load
顯示ISDN有關(guān)信息
show isdn {active | history | memory | services | status [dsl | interface-type number] | timers}
注:1.交換機(jī)類(lèi)型如下表,國(guó)內(nèi)交換機(jī)一般為basic-net3。
按區(qū)域分關(guān)鍵字
交換機(jī)類(lèi)型
Australia
basic-ts013
Australian TS013 switches
Europe
basic-1tr6
German 1TR6 ISDN switches
basic-nwnet3
Norway NET3 switches (phase 1)
basic-net3
NET3 ISDN switches (UK, Denmark, and other nations); covers the Euro-ISDN E-DSS1 signalling system
primary-net5
NET5 switches (UK and Europe)
vn2
French VN2 ISDN switches
vn3
French VN3 ISDN switches
Japan
ntt
Japanese NTT ISDN switches
primary-ntt
Japanese ISDN PRI switches
North America
basic-5ess
AT&T basic rate switches
basic-dms100
NT DMS-100 basic rate switches
basic-ni1
National ISDN-1 switches
primary-4ess
AT&T 4ESS switch type for the U.S. (ISDN PRI only)
primary-5ess
AT&T 5ESS switch type for the U.S. (ISDN PRI only)
primary-dms100
NT DMS-100 switch type for the U.S. (ISDN PRI only)
New Zealand
basic-nznet3
New Zealand Net3 switches
3. ISDN實(shí)現(xiàn)DDR(dial-on-demand routing)實(shí)例:
設(shè)置如下:
Router1:
hostname router1
user router2 password cisco
!
isdn switch-type basic-net3
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -