路由器配置全攻略第2/4頁(yè)
更新時(shí)間:2006年12月27日 00:00:00 作者:
子接口(Subinterface)是一個(gè)物理接口上的多個(gè)虛接口,可以用于在同一個(gè)物理接口上連接多個(gè)網(wǎng)。我們知道為了避免路由循環(huán),路由器支持split horizon法則,它只允許路由更新被分配到路由器的其它接口,而不會(huì)再分配路由更新回到此路由被接收的接口。
無論如何,在廣域網(wǎng)環(huán)境使用基于連接的接口(象 X.25和Frame Relay),同一接口通過虛電路(vc)連接多臺(tái)遠(yuǎn)端路由器時(shí),從同一接口來的路由更新信息不可以再被發(fā)回到相同的接口,除非強(qiáng)制使用分開的物理接口連接不同的路由器。Cisco提供子接口(subinterface)作為分開的接口對(duì)待。你可以將路由器邏輯地連接到相同物理接口的不同子接口, 這樣來自不同子接口的路由更新就可以被分配到其他子接口,同時(shí)又滿足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
!
四、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ù)通過幀中繼虛電路實(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類型 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開始,軟件支持本地管理接口(LMI)“自動(dòng)感覺”, “自動(dòng)感覺”使接口能確定交換機(jī)支持的LMI類型,用戶可以不明確配置LMI接口類型。
3.broadcast選項(xiàng)允許在幀中繼網(wǎng)絡(luò)上傳輸路由廣播信息。
4. ISDN訪問首都在線263網(wǎng)實(shí)例:
本地局部網(wǎng)地址為10.0.0.0/24,屬于保留地址,通過NAT地址翻譯功能,局域網(wǎng)用戶可以通過ISDN上263網(wǎng)訪問Internet。263的ISDN電話號(hào)碼為2633,用戶為263,口令為263,所涉及的命令如下表:
任務(wù) 命令
指定接口通過PPP/IPCP地址協(xié)商獲得IP地址 ip address negotiated
指定內(nèi)部和外部端口 ip nat {inside | outside}
使用ppp/pap作認(rèn)證 ppp authentication pap callin
指定接口屬于撥號(hào)組1 dialer-group 1
定義撥號(hào)組1允許所有IP協(xié)議 dialer-list 1 protocol ip permit
設(shè)定撥號(hào),號(hào)碼為2633 dialer string 2633
設(shè)定登錄263的用戶名和口令 ppp pap sent-username 263 password 263
設(shè)定默認(rèn)路由 ip route 0.0.0.0 0.0.0.0 bri 0
設(shè)定符合訪問列表2的所有源地址被翻譯為bri 0所擁有的地址 ip nat inside source list 2 interface bri 0 overload
設(shè)定訪問列表2,允許所有協(xié)議 access-list 2 permit any
具體配置如下:
hostname Cisco2503
!
isdntch-type basic-net3
!
ip subnet-zero
no ip domain-lookup
ip routing
!
interface Ethernet 0
ip address 10.0.0.1 255.255.255.0
ip nat inside
no shutdown
!
interface Serial 0
shutdown
no des cription
no ip address
!
interface Serial 1
shutdown
no des cription
no ip address
!
interface bri 0
ip address negotiated
ip nat outside
encapsulation ppp
ppp authentication pap callin
ppp multilink
dialer-group 1
dialer hold-queue 10
dialer string 2633
dialer idle-timeout 120
ppp pap sent-username 263 password 263
no cdp enable
no ip split-horizon
no shutdown
!
ip classless
!
! Static Routes
!
ip route 0.0.0.0 0.0.0.0 bri 0
!
! Access Control List 2
!
access-list 2 permit any
!
dialer-list 1 protocol ip permit
!
! Dynamic NAT
!
ip nat inside source list 2 interface bri 0 overload
snmp-server community public ro
!
line console 0
exec-timeout 0 0
!
line vty 0 4
!
end
5. Cisco765M通過ISDN撥號(hào)上263
由于Cisco765的設(shè)置命令與我們常用的Cisco路由器的命令不同,所以以下列舉了通過Cisco765上263訪問Internet的具體命令行設(shè)置步驟。
>set system c765
c765> set multidestination on
c765> settch net3
c765> set ppp multilink on
c765> cd lan
c765:LAN> set ip routing on
c765:LAN> set ip address 10.0.0.1
c765:LAN> set ip netmask 255.0.0.0
c765:LAN> set briding off
c765:LAN>cd
c765> set user remotenet
New user remotenet being created
c765:remotenet> set ip routing on
c765:remotenet> set bridging off
c765:remotenet> set ip framing none
c765:remotenet> set ppp clientname 263
c765:remotenet> set ppp password client
Enter new Password: 263
Re-Type new Password: 263
c765:remotenet> set ppp authentication out none
c765:remotenet> set ip address 0.0.0.0
c765:remotenet> set ip netmask 0.0.0.0
c765:remotenet> set ppp address negotiation local on
c765:remotenet> set ip pat on
c765:remotenet> set ip route destination 0.0.0.0/0 gateway 0.0.0.0
c765:remotenet> set number 2633
c765:remotenet> set active
命令描述如下:
任務(wù) 命令
設(shè)置路由器系統(tǒng)名稱 set system c765
允許路由器呼叫多個(gè)目的地 set multidestination on
設(shè)置ISDN交換機(jī)類型為NET3 settch net3
允許點(diǎn)到點(diǎn)間多條通道連接實(shí)現(xiàn)負(fù)載均衡 set ppp multilink on
關(guān)掉橋接 set briding off
建立用戶預(yù)制文件用于設(shè)置撥號(hào)連接參數(shù)- 可以設(shè)置多個(gè)用戶預(yù)制文件用于相同的物理端口對(duì)應(yīng)于不同的連接。 set user remotenet
使用PPP/IPCP set ip framing none
設(shè)置上網(wǎng)用戶帳號(hào) set ppp clientname 263
設(shè)置上網(wǎng)口令 set ppp password client Enter new Password: 263 Re-Type new Password: 263
不用PPP/CHAP或PAP做認(rèn)證 set ppp authentication out none
允許地址磋商 set ppp address negotiation local on
設(shè)置地址翻譯 set ip pat on
設(shè)置默認(rèn)路由 set ip route destination 0.0.0.0/0 gateway 0.0.0.0
設(shè)置ISP的電話號(hào)碼 set number 2633
激活用戶預(yù)制文件 set active
六、PSTN
電話網(wǎng)絡(luò)(PSTN)是目前普及程度最高、成本最低的公用通訊網(wǎng)絡(luò),它在網(wǎng)絡(luò)互連中也有廣泛的應(yīng)用。電話網(wǎng)絡(luò)的應(yīng)用一般可分為兩種類型,一種是同等級(jí)別機(jī)構(gòu)之間以按需撥號(hào)(DDR)的方式實(shí)現(xiàn)互連,一種是ISP為撥號(hào)上網(wǎng)為用戶提供的遠(yuǎn)程訪問服務(wù)的功能。
1. 遠(yuǎn)程訪問
1.1.Access Server基本設(shè)置:
選用Cisco2511作為訪問服務(wù)器,采用IP地址池動(dòng)態(tài)分配地址.遠(yuǎn)程工作站使用WIN95撥號(hào)網(wǎng)絡(luò)實(shí)現(xiàn)連接。
全局設(shè)置:
任務(wù) 命令
設(shè)置用戶名和密碼 username username password password
設(shè)置用戶的IP地址池 ip local pool {default | pool-name low-ip-address [high-ip-address]}
指定地址池的工作方式 ip address-pool [dhcp-proxy-client | local]
基本接口設(shè)置命令:
任務(wù) 命令
設(shè)置封裝形式為PPP encapsulation ppp
啟動(dòng)異步口的路由功能 async default routing
設(shè)置異步口的PPP工作方式 async mode {dedicated | interactive}
設(shè)置用戶的IP地址 peer default ip address {ip-address | dhcp | pool [pool-name]}
設(shè)置IP地址與Ethernet0相同 ip unnumbered ethernet0
line撥號(hào)線設(shè)置:
任務(wù) 命令
設(shè)置modem的工作方式 modem {inout|dialin}
自動(dòng)配置modem類型 modem autoconfig discovery
設(shè)置撥號(hào)線的通訊速率 speed speed
設(shè)置通訊線路的流控方式 flowcontrol {none | software [lock] [in | out] | hardware [in | out]}
連通后自動(dòng)執(zhí)行命令 autocommand command
訪問服務(wù)器設(shè)置如下:
Router:
hostname Router
enable secret 5 $1$EFqU$tYLJLrynNUKzE4bx6fmH//
!
interface Ethernet0
ip address 10.111.4.20 255.255.255.0
!
interface Async1
ip unnumbered Ethernet0
encapsulation ppp
keepalive 10
async mode interactive
peer default ip address pool Cisco2511-Group-142
!
ip local pool Cisco2511-Group-142 10.111.4.21 10.111.4.36
!
line con 0
exec-timeout 0 0
password cisco
!
line 1 16
modem InOut
modem autoconfigure discovery
flowcontrol hardware
!
line aux 0
transport input all
line vty 0 4
password cisco
!
end
相關(guān)調(diào)試命令:
show interface
show line
1.2. Access Server通過Tacacs服務(wù)器實(shí)現(xiàn)安全認(rèn)證:
使用一臺(tái)WINDOWS NT服務(wù)器作為Tacacs服務(wù)器,地址為10.111.4.2,運(yùn)行Cisco2511隨機(jī)帶的Easy ACS 1.0軟件實(shí)現(xiàn)用戶認(rèn)證功能.
相關(guān)設(shè)置:
任務(wù) 命令
激活A(yù)AA訪問控制 aaa new-model
用戶登錄時(shí)默認(rèn)起用Tacacs+做AAA認(rèn)證 aaa authentication login default tacacs+
列表名為no_tacacs使用ENABLE口令做認(rèn)證 aaa authentication login no_tacacs enable
在運(yùn)行PPP的串行線上采用Tacacs+做認(rèn)證 aaa authentication ppp default tacacs+
由TACACS+服務(wù)器授權(quán)運(yùn)行EXEC aaa authorization exec tacacs+
由TACACS+服務(wù)器授權(quán)與網(wǎng)絡(luò)相關(guān)的服務(wù)請(qǐng)求。 aaa authorization network tacacs+
為EXEC會(huì)話運(yùn)行記帳.進(jìn)程開始和結(jié)束時(shí)發(fā)通告給TACACS+服務(wù)器。 aaa accounting exec start-stop tacacs+
為與網(wǎng)絡(luò)相關(guān)的服務(wù)需求運(yùn)行記帳包括SLIP,PPP,PPP NCPs,ARAP等.在進(jìn)程開始和結(jié)束時(shí)發(fā)通告給TACACS+服務(wù)器。 aaa accounting network start-stop tacacs+
指定Tacacs服務(wù)器地址 tacacs-server host 10.111.4.2
在Tacacs+服務(wù)器和訪問服務(wù)器設(shè)定共享的關(guān)鍵字,訪問服務(wù)器和Tacacs+服務(wù)器使用這個(gè)關(guān)鍵字去加密口令和響應(yīng)信息。這里使用tac作為關(guān)鍵字。 tacacs-server key tac
訪問服務(wù)器設(shè)置如下:
hostname router
!
aaa new-model
aaa authentication login default tacacs+
aaa authentication login no_tacacs enable
aaa authentication ppp default tacacs+
aaa authorization exec tacacs+
aaa authorization network tacacs+
aaa accounting exec start-stop tacacs+
aaa accounting network start-stop tacacs+
enable secret 5 $1$kN4g$CvS4d2.rJzWntCnn/0hvE0
!
interface Ethernet0
ip address 10.111.4.20 255.255.255.0
!
interface Serial0
no ip address
shutdown
interface Serial1
no ip address
shutdown
!
interface Group-Async1
ip unnumbered Ethernet0
encapsulation ppp
async mode interactive
peer default ip address pool Cisco2511-Group-142
no cdp enable
group-range 1 16
!
ip local pool Cisco2511-Group-142 10.111.4.21 10.111.4.36
tacacs-server host 10.111.4.2
tacacs-server key tac
!
line con 0
exec-timeout 0 0
password cisco
login authentication no_tacacs
line 1 16
login authentication tacacs
modem InOut
modem autoconfigure type usr_courier
autocommand ppp
transport input all
stopbits 1
rxspeed 115200
txspeed 115200
flowcontrol hardware
line aux 0
transport input all
line vty 0 4
password cisco
!
end
2. DDR(dial-on-demand routing)實(shí)例
此例通過Cisco 2500系列路由器的aux端口實(shí)現(xiàn)異步撥號(hào)DDR連接。Router1撥號(hào)連接到Router2。其中采用PPP/CHAP做安全認(rèn)證,在Router1中應(yīng)建立一個(gè)用戶,以對(duì)端路由器主機(jī)名作為用戶名,即用戶名應(yīng)為Router2。同時(shí)在Router2中應(yīng)建立一個(gè)用戶,以對(duì)端路由器主機(jī)名作為用戶名,即用戶名應(yīng)為Router1。所建的這兩用戶的password必須相同。
相關(guān)命令如下:
任務(wù) 命令
設(shè)置路由器與modem的接口指令 chat-s cript s cript-name EXPECT SEND EXPECT SEND (etc.)
設(shè)置端口在掛斷前的等待時(shí)間 dialer idle-timeout seconds
設(shè)置協(xié)議地址與電話號(hào)碼的映射 dialer map protocol next-hop-address [name hostname] [broadcast] [modem-s cript modem-regexp] [system-s cript system-regexp] [dial-string]
設(shè)置電話號(hào)碼 dialer string dial-string
指定在特定線路下路由器默認(rèn) 使用的chat-s cript s cript {dialer|reset} s cript-name
Router1:
hostname Router1
!
enable secret 5 $1$QKI7$wXjpFqC74vDAyKBUMallw/
!
username Router2 password cisco
chat-s cript cisco-default "" "AT" TIMEOUT 30 OK "ATDT \T" TIMEOUT 30 CONNECT \c
!
interface Ethernet0
ip address 10.0.0.1 255.255.255.0
!
interface Async1
ip address 192.200.10.1 255.255.255.0
encapsulation ppp
async default routing
async mode dedicated
dialer in-band
dialer idle-timeout 60
dialer map ip 192.200.10.2 name Router2 modem-s cript cisco-default 573
dialer-group 1
ppp authentication chap
!
ip route 10.0.1.0 255.255.255.0 192.200.10.2
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
modem InOut
modem autoconfigure discovery
flowcontrol hardware
Router2:
hostname Router2
!
enable secret 5 $1$F6EV$5U8puzNt2/o9g.t56PXHo.
!
username Router1 password cisco
!
interface Ethernet0
ip address 10.0.1.1 255.255.255.0
!
interface Async1
ip address 192.200.10.2 255.255.255.0
encapsulation ppp
async default routing
async mode dedicated
dialer in-band
dialer idle-timeout 60
dialer map ip 192.200.10.1 name Router1
dialer-group 1
ppp authentication chap
!
ip route 10.0.0.0 255.255.255.0 192.200.10.1
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
modem InOut
modem autoconfigure discovery
flowcontrol hardware
!
相關(guān)調(diào)試命令:
debug dialer
debug ppp authentication
debug ppp error
debug ppp negotiation
debug ppp packet
show dialer
3. 異步撥號(hào)備份DDN專線:
此例主連接采用DDN專線,備份線路為電話撥號(hào)。當(dāng)DDN專線連接正常時(shí),主端口S0狀態(tài)為up,line protocol亦為up,則備份線路狀態(tài)為standby,line protocol為down,此時(shí)所有通信均通過主接口進(jìn)行。當(dāng)主接口連接發(fā)生故障時(shí),端口狀態(tài)為down,則激活備份接口,完成數(shù)據(jù)通信。此方法不適合為X.25做備份。因?yàn)?,配置封裝為X.25的接口只要和X.25交換機(jī)之間的連接正常其接口及l(fā)ine protocol的狀態(tài)亦為 up,它并不考慮其它地方需與之通信的路由器的狀態(tài)如何,所以若本地路由器狀態(tài)正常,而對(duì)方路由器連接即使發(fā)生故障,本地也不會(huì)激活備份線路。例4將會(huì)描述如何為X.25做撥號(hào)備份。
以下是相關(guān)命令:
任務(wù) 命令
指定主線路改變后,次線路狀態(tài)發(fā)生改變的延遲時(shí)間 backup delay {enable-delay | never} {disable-delay | never}
指定一個(gè)接口作為備份接口 backup interface type number
hostname c2522rb
!
enable secret 5 $1$J5vn$ceYDe2FwPhrZi6qsIIz6g0
enable password cisco
!
username c4700 password 0 cisco
ip subnet-zero
chat-s cript cisco-default "" "AT" TIMEOUT 30 OK "ATDT \T" TIMEOUT 30 CONNECT \c
chat-s cript reset atz
!
interface Ethernet0
ip address 16.122.51.254 255.255.255.0
no ip mroute-cache
!
interface Serial0
backup delay 10 10
backup interface Serial2
ip address 16.250.123.18 255.255.255.252
no ip mroute-cache
no fair-queue
!
interface Serial1
no ip address
no ip mroute-cache
shutdown
!
interface Serial2
physical-layer async
ip address 16.249.123.18 255.255.255.252
encapsulation ppp
async mode dedicated
dialer in-band
dialer idle-timeout 60
dialer map ip 16.249.123.17 name c4700 6825179
dialer-group 1
ppp authentication chap
!
interface Serial3
no ip address
shutdown
no cdp enable
!
interface Serial4
no ip address
shutdown
no cdp enable
!
interface Serial5
no ip address
no ip mroute-cache
shutdown
!
interface Serial6
no ip address
no ip mroute-cache
shutdown
!
interface Serial7
no ip address
no ip mroute-cache
shutdown
!
interface Serial8
no ip address
no ip mroute-cache
shutdown
!
interface Serial9
no ip address
no ip mroute-cache
shutdown
!
interface BRI0
no ip address
no ip mroute-cache
shutdown
!
router eigrp 200
network 16.0.0.0
!
ip classless
!
dialer-list 1 protocol ip permit
!
line con 0
line 2
s cript dialer cisco-default
s cript reset reset
modem InOut
modem autoconfigure discovery
rxspeed 38400
txspeed 38400
flowcontrol hardware
line aux 0
line vty 0 4
password cisco
login
!
end
c2522rb#
4. 異步撥號(hào)備份X.25:
設(shè)置X.25的撥號(hào)備份,首先X.25連接的端口必須運(yùn)行動(dòng)態(tài)路由協(xié)議,異步撥號(hào)口必須使用靜態(tài)路由.本例選擇EIGRP作為路由選擇協(xié)議,將靜態(tài)路由的Metric的值設(shè)置為200,由于EIGRP的默認(rèn)Metric為90,所以當(dāng)同時(shí)有兩條路徑通往同一網(wǎng)段時(shí),其中Metric值小的路徑生效,而當(dāng)X.25連接出現(xiàn)問題時(shí),路由器無法通過路由協(xié)議學(xué)習(xí)到路由表,則此時(shí)靜態(tài)路由生效,訪問通過撥號(hào)端口實(shí)現(xiàn)。當(dāng)X.25連接恢復(fù)正常時(shí),路由器又可以學(xué)習(xí)到路由表,則由于 Metric值的不同,靜態(tài)路由自動(dòng)被動(dòng)態(tài)路由所代替,這樣就實(shí)現(xiàn)了備份的功能。
路由器Router1配置如下:
hostname router1
!
enable secret 5 $1$UTvD$99YiY2XsRMxHudcYeHn.Y.
enable password cisco
!
username router2 password cisco
ip subnet-zero
chat-s cript cisco-default "" "AT" TIMEOUT 30 OK "ATDT \T" TIMEOUT 30 CONNECT \c
chat-s cript reset atz
interface Ethernet0
ip address 202.96.38.100 255.255.255.0
!
interface Serial0
ip address 202.96.0.1 255.255.255.0
encapsulation x25
x25 address 10112227
x25 htc 16
x25 map ip 202.96.0.2 10112225 broadcast
!
interface Serial1
no ip address
shutdown
!
!
interface Async 1
ip address 202.96.1.1 255.255.255.252
encapsulation ppp
dialer in-band
dialer idle-timeout 60
dialer map ip 202.96.1.2 name router2 modem-s cript cisco-default 2113470
dialer-group 1
ppp authentication chap
!
router eigrp 200
redistribute connected
network 202.96.0.0
!
ip route 202.96.37.0 255.255.255.0 202.96.1.2 200
dialer-list 1 protocol ip permit
line con 0
line aux 0
s cript dialer cisco-default
s cript reset reset
modem InOut
modem autoconfigure discovery
transport input all
rxspeed 38400
txspeed 38400
flowcontrol hardware
line vty 0 4
password cisco
login
!
end
路由器Router2配置如下:
hostname router2
!
enable secret 5 $1$T4IU$2cIqak8f/E4Ug6dLT0k.J0
enable password cisco
!
username router1 password cisco
ip subnet-zero
chat-s cript cisco-default "" "AT" TIMEOUT 30 OK "ATDT \T" TIMEOUT 30 CONNECT \c
chat-s cript reset atz
!
interface Ethernet0
ip address 202.96.37.100 255.255.255.0
!
interface Serial0
ip address 202.96.0.2 255.255.255.0
no ip mroute-cache
encapsulation x25
x25 address 10112225
x25 htc 16
x25 map ip 202.96.0.1 10112227 broadcast
!
interface Serial1
no ip address
shutdown
!
interface Async1
ip address 202.96.1.2 255.255.255.252
encapsulation ppp
keepalive 30
async default routing
async mode dedicated
dialer in-band
dialer idle-timeout 60
dialer wait-for-carrier-time 120
dialer map ip 202.96.1.1 name router1 modem-s cript cisco-default 2113469
dialer-group 1
ppp authentication chap
!
router eigrp 200
redistribute static
network 202.96.0.0
!
no ip classless
ip route 202.96.38.0 255.255.255.0 202.96.1.1 200
dialer-list 1 protocol ip permit
!
line con 0
exec-timeout 0 0
line aux 0
s cript reset reset
modem InOut
modem autoconfigure discovery
transport input all
rxspeed 38400
txspeed 38400
flowcontrol hardware
line vty 0 4
password cisco
login
!
end
第三章 路由協(xié)議設(shè)置
一、RIP協(xié)議
RIP(Routing information Protocol)是應(yīng)用較早、使用較普遍的內(nèi)部網(wǎng)關(guān)協(xié)議(Interior Gateway Protocol,簡(jiǎn)稱IGP),適用于小型同類網(wǎng)絡(luò),是典型的距離向量(distance-vector)協(xié)議。文檔見RFC1058、RFC1723。
RIP通過廣播UDP報(bào)文來交換路由信息,每30秒發(fā)送一次路由信息更新。RIP提供跳躍計(jì)數(shù)(hop count)作為尺度來衡量路由距離,跳躍計(jì)數(shù)是一個(gè)包到達(dá)目標(biāo)所必須經(jīng)過的路由器的數(shù)目。如果到相同目標(biāo)有二個(gè)不等速或不同帶寬的路由器,但跳躍計(jì)數(shù)相同,則RIP認(rèn)為兩個(gè)路由是等距離的。RIP最多支持的跳數(shù)為15,即在源和目的網(wǎng)間所要經(jīng)過的最多路由器的數(shù)目為15,跳數(shù)16表示不可達(dá)。
1. 有關(guān)命令
任務(wù) 命令
指定使用RIP協(xié)議 router rip
指定RIP版本 version {1|2}1
指定與該路由器相連的網(wǎng)絡(luò) network network
注:1.Cisco的RIP版本2支持驗(yàn)證、密鑰管理、路由匯總、無類域間路由(CIDR)和變長(zhǎng)子網(wǎng)掩碼(VLSMs)
2. 舉例
Router1:
router rip
version 2
network 192.200.10.0
network 192.20.10.0
!
相關(guān)調(diào)試命令:
show ip protocol
show ip route
相關(guān)文章
用windows計(jì)劃任務(wù)實(shí)現(xiàn)服務(wù)器定時(shí)重啟
用windows計(jì)劃任務(wù)實(shí)現(xiàn)服務(wù)器定時(shí)重啟...2007-07-07Windows 2003 IIS 6.0 搭建可建虛擬機(jī)的asp+.net+php+jsp+mysql+mssql
Windows 2003 IIS 6.0 搭建可建虛擬機(jī)的asp+.net+php+jsp+mysql+mssql...2007-05-05花生殼與Windows2003 建立WEB服務(wù)器的圖文教程
花生殼與Windows2003 建立WEB服務(wù)器的圖文教程...2007-08-08使用Cacls命令設(shè)置服務(wù)器文件訪問權(quán)限
使用Cacls命令設(shè)置服務(wù)器文件訪問權(quán)限...2007-01-01apache五合一程序建立PHP+CGI運(yùn)行環(huán)境
apache五合一程序建立PHP+CGI運(yùn)行環(huán)境...2006-10-10關(guān)于網(wǎng)站的安全性注意事項(xiàng)
關(guān)于網(wǎng)站的安全性注意事項(xiàng)...2007-11-11HTTP 錯(cuò)誤 403.1 - 禁止訪問:執(zhí)行訪問被拒絕。 解決方法該頁(yè)無法顯示
HTTP 錯(cuò)誤 403.1 - 禁止訪問:執(zhí)行訪問被拒絕。 解決方法該頁(yè)無法顯示,您試圖從目錄中執(zhí)行 CGI、ISAPI 或其他可執(zhí)行程序,但該目錄不允許執(zhí)行程序2007-07-07