路由器的基本配置技巧歸納_第1頁
路由器的基本配置技巧歸納_第2頁
路由器的基本配置技巧歸納_第3頁
路由器的基本配置技巧歸納_第4頁
路由器的基本配置技巧歸納_第5頁
已閱讀5頁,還剩22頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、A thesis submitted toXXXin partial fulfillment of the requirementfor the degree ofMaster of Engineering路由器的基本配置配 置 以 太 網(wǎng)( nthernet) 端 口X.25的配置專 線 的 配 置幀中繼的配置幀 中 繼 子 接 口 的 配 置配置撥號備份配置同步/異步口 (適用于2522)動態(tài)路由的配置靜態(tài)路由的配置備份配置文件到硬盤恢復(fù)備份配置文件到路由器在路由器上建一個備份調(diào)試方法WAN的配置配置DDR配置幀中繼配置DDN配置X.25配置HDLC配置PPP廣域網(wǎng)配置實例路由協(xié)議設(shè)置RI

2、P協(xié)議IGRP協(xié)議OSPF協(xié)議重新分配路由IPX協(xié)議重新設(shè)置路由器的基本配置1 配 置 以 太 網(wǎng)(Ethernet) 端 口:# conf t從終端配置路由器。# int e0指定E0口。# ip addr ABCD XXXXABCD為以太網(wǎng)地址,XXXX為子網(wǎng)掩碼。# ip addr ABCD XXXX secondaryE0口同時支持兩個地址類型。如果第一個為A類地址,則第二個為B或C類地址。# no shutdown激活E0口。# exit2X.25的配置# conf t# int S0指定S0口.# ip addr ABCD XXXXABCD為以太網(wǎng)S0的IP地址,XXXX為子網(wǎng)掩碼

3、.。# encap X25-ABC封裝X.25協(xié)議。ABC指定X.25為DTC或DCE操作,缺省為DTE。# x25 addr ABCDABCD為S0的X.25端口地址,由郵電局提供。# x25 map ip ABCD XXXX br映射的X.25地址.ABCD為對方路由器(如:S0)的IP地址,XXXX為對方路由器(如:S0)的X.25端口地址。# x25 htc X配置最高雙向通道數(shù).X的取值范圍1-4095,要根據(jù)郵電局實際提供的數(shù)字配置。# x25 nvc X配置虛電路數(shù)。X不可超過據(jù)郵電局實際提供的數(shù),否則,將影響數(shù)據(jù)的正常傳輸。# exit- 3 專 線 的 配 置:# conf

4、t# intS2指定S2口。# ip addr ABCD XXXXABCD為S2的IP地址,XXXX為子網(wǎng)掩碼。# exit4幀中繼的配置# conf t# int s0# ip addr ABCD XXXXABCD為S0的IP地址,XXXX為子網(wǎng)掩碼。# encap frante_relay封裝frante_relay協(xié)議。# no nrzi_encodingNRZI=NO# frame_relay lmi_type q933aLMI使用Q933A標準LMI(Local management Interface)有3種:ANSI:T1.617;CCITTY:Q933A和CISCO特有的標準。

5、# fram-relay intf-typ ABCABC為幀中繼設(shè)備類型,它們分別是DTE設(shè)備,DCE交換機或NNI(網(wǎng)絡(luò)接點接口)支持。# frame_relay interface_dlci 110 br配置DLCI(數(shù)據(jù)鏈路連接標識符)。# frame-relay map ip ABCD XXXX broadcast建立幀中繼映射。ABCD為對方ip地址,XXXX為本地DLCI號,broadcast允許廣播向前轉(zhuǎn)發(fā)或更新路由。# no shutdown激活本端口# exit- 5 幀 中 繼 子 接 口 的 配 置:# conf# int s0.1 point-to-point對應(yīng)S0的

6、子接口1,點對點方式。# ip addr ABCD XXXXABCD為子口1的IP地址,XXXX為子網(wǎng)掩碼。# frame-relay intreface-dlci 100 br6配置撥號備份(1)配置備份主口# conf t# int s0S0為主口# backup int asy 1A1口為備份口# backup delay 0 1延時1秒(2)配置虛擬接口# conf t# ip addr ABCD XXXXABCD為虛擬接口IP地址,XXXX為子網(wǎng)掩碼。# encap ppp封裝ppp協(xié)議# dialer in-band激活隨叫隨撥功能# dialer idle-timeout 720

7、0# dialer map ip ABCD modem-script call broadcast 6225481 br 映射對應(yīng)的撥號口ABCD為對方撥號口的ip地址,6225481為對應(yīng)的電話號碼。# dialer_group 1 定義撥號組成員(3)配置防火墻# dialer_list 1 pro ip permit允許ip協(xié)議通過。(4)配置連接口令# user name ABCD pass XXXXABCD為對方主機名,XXXX為連接口令(5)配置撥號字符串# conf t# chat-script call ABORT BUSY ABORT ERROR atdt 6335481 T

8、IMEOUT 45 CONNECT6335481為對方電話號碼。(6)配置撥號連接密碼# conf t# username ROU1 pass XXXXROU1為對方路由器名,XXXX為連接密碼。(7)配置線路# conf# line aux 0# modem inoutMODEM雙向傳輸。# modem autoconfigure discovery# transport input all# rxspeed 51200MODEM的收發(fā)速率為51200 。# exit7配置同步/異步口 (適用于2522)# conf t# int s2# ph asyn配置S2為異步口# ph sync、配

9、置S2為同步口8動態(tài)路由的配置# conf t# router eigrp 20使用EIGRP路由協(xié)議。常用的路由協(xié)議有RIP,IGRP,IS-IS等。# passive-interface serial0若S0與X.25相連,則輸入本條指令。# passive-interface serial1若S1與X.25相連,則輸入本條指令。# network ABCDABCD為本機的以太網(wǎng)地址。# network XXXXXXXX為S0的ip地址。# no auto-summary# exit9靜態(tài)路由的配置# ip router ABCD XXXX YYYY 90ABCD為對方路由器的以太網(wǎng)地址;

10、XXXX為子網(wǎng)掩碼.;YYYY為對方對應(yīng)的廣域網(wǎng)端口地址。# dialer-list 1 protocol ip permail10備份配置文件到硬盤# copy run tftp在硬盤上建立一個空文件且有讀寫權(quán)限,才能備份成功11恢復(fù)備份配置文件到路由器# copy tftp run12在路由器上建一個備份# copy run start路由器的配置參數(shù)較多,可根據(jù)實際需要增減,限于篇幅,本文僅給出了一般的常用配置。- 調(diào) 試- 1. 首 先 將 路 由 器 的Ethernet 口 和 所 有 要 使 用 的 串 口 都 激 活, 方 法 是 進 入 該 口, 執(zhí) 行No Shutdown。

11、- 2. 將 和 路 由 器 相 連 的 主 機 加 上 缺 省 路 由( 中 心 路 由 器 的Ethernet 地 址), 方 法 是 在UNIX 系 統(tǒng) 的 超 級 用 戶 下 執(zhí) 行:router add defaule XXXX 1(XXXX 為 路 由 器 的E0 口 地 址)。 每 臺 主 機 都 要 加 缺 省 路 由, 否 則, 將 不 能 正 常 通 訊。- 3. Ping 本 機 的 路 由 器Ethernet 網(wǎng) 口( 若 不 通:(1)Ethetnet 網(wǎng) 口 沒 有 激 活(2) 不 在 一 個 網(wǎng) 上)、 廣 域 網(wǎng) 口( 若 不 通: 沒 有 加 缺 省 路 由

12、), 對 方 廣 域 網(wǎng) 口( 若 不 通: 路 由 器 配 置 錯 誤)、 路 由 器Ethernet 網(wǎng) 口( 若 不 通: 路 由 器 配 置 錯 誤)、 主 機Ethernet 網(wǎng) 口( 若 不 通: 對 方 主 機 沒 有 加 缺 省 路 由)。- 4. 在 專 線 卡(X.25) 主 機 上 加 網(wǎng) 關(guān)( 靜 態(tài) 路 由), 方 法 是 在UNIX 系 統(tǒng) 的 超 級 用 戶 下 執(zhí) 行:router add X.X.X.X Y.Y.Y.Y 1。 X.X.X.X 為 對 方Ethernet 網(wǎng) 地 址;Y.Y.Y.Y 為 對 方 廣 域 網(wǎng) 地 址。- 5. 使 用Tracert

13、對 路 由 進 行 跟 蹤, 以 確 定 不 通 網(wǎng) 段。WAN的配置1、 配置DDR Dial-on-demand routing(DDR)是用公共電話網(wǎng)提供了網(wǎng)絡(luò)連接.通常的,廣域網(wǎng)大多數(shù)用專線連接的,路由器連接到類似modem或ISDN TAs的數(shù)據(jù)終端DCE設(shè)備上,它們支持同步V.25bis協(xié)議,你可以用scripts和dialer命令設(shè)定撥號串.DDR比較適用于用戶對數(shù)率要求不高,偶爾有數(shù)據(jù)傳輸或只是在特定時候傳輸數(shù)據(jù),比如銀行每晚傳送報表等等情況下.當一個感興趣的包到達路由器時,產(chǎn)生一個DDR請求.路由器發(fā)送呼叫建立信息給指定的串口的DCE設(shè)備.這個呼叫就把本地和遠程的設(shè)備連接起來

14、.一旦沒有數(shù)據(jù)傳輸,空閑時間開始計時,超過設(shè)置的空閑時間,這一次連接終止.DDR現(xiàn)在都用靜態(tài)路由來傳輸數(shù)據(jù)包,避免路由交換引起的DDR撥號.AppleTalk,Banyan VINES, CLNS, DECnet, IP, IPX, 和XNS可以通過DDR路由尋址.同步串口,異步串口和ISDN端口可以配置成到一個或多個目的地DDR連接.在配置DDR過程中,我們可以把一個或幾個物理接口配置成一個邏輯撥號接口,它可以是同步V.25方式,同步DTR啟動撥號或異步chat script方式.在端口配置模式下:功 能 命 令在一個端口上激活 Dial-on-demand routing dialer i

15、n-band指定一個端口為撥號訪問組 dialer-group group-number指定一個單一電話號碼 dialer string dial-string斷線前空閑等待時間 dialer idle-time seconds定義一個或多個目的電話號碼表 dialer map protocol net-hop-address dialer-string限定傳輸?shù)腶ccess-list表或特定協(xié)議 dialer-list dialer-group list access-list-number或 dialer-list dialer-group protocol protocol-name p

16、ermit|deny|list acce ss-list-number其中dialer string和dialer map兩條命令任選一,dialer string是在只有一個電話號碼時用,而dialer map是一個電話號碼表.詳細配置說明請參閱下面DDR Example的實例.配置撥號備份撥號備份提供了一種保護,使得當廣域網(wǎng)上主干線出現(xiàn)故障時,啟動一條備份線路,使通信正常運轉(zhuǎn).啟動備份有兩種情況:主干線斷掉傳輸流量超過了定義的最大值需作的定義如下:在主干線路端口上設(shè)置它的備份端口 backup interface interface-name定義備份負載 backup load enabl

17、e-threshold | never disable-load |never定義主干線up或down的響應(yīng)時間 backup delay enable-delay | never) disable-delay | never其中: enable-threshold - 表示主干線超過總傳輸量的百分比,啟動備份線路disable-load - 表示傳輸量減少百分之多少就斷開備份線路.enable-delay - 表示主干線斷開多長時間后,啟動備份線路.disable-delay - 表示主干線又重新恢復(fù)多長時間后,斷開備份線路.2、 配置幀中繼幀中繼是一種由ANSI和CCITT標準化的協(xié)議,它

18、能為現(xiàn)今突發(fā)性業(yè)務(wù)流量(如LAN互連及SNA業(yè)務(wù))提供顯著的性能價格優(yōu)勢.幀中繼是客戶端設(shè)備(CPE),諸如路由器或前端處理器,和一個向遠程CPE發(fā)送數(shù)據(jù)的廣域網(wǎng)之間的一種接口協(xié)議.它有以下幾個特點:低時延,時延是指一個給定待發(fā)送幀穿過網(wǎng)絡(luò)到達遠程用戶設(shè)備所用的時間.當網(wǎng)絡(luò)時延增大時,性能會下降;尤其對于敏感協(xié)議(如SNA和DECnet),所有幀被發(fā)送后必須等待應(yīng)答的協(xié)議(即Novell IPX),以及利用短交易式的應(yīng)用.可靠性,在給定時延條件下,吞吐量隨著網(wǎng)絡(luò)的可靠性變化而變化,可靠性好,超時等待重發(fā)幀越少,吞吐量就會大大增加.更低的聯(lián)網(wǎng)開銷可預(yù)測性在許多網(wǎng)絡(luò)環(huán)境中,如SNA CICS,不僅

19、要求時延低,而且需要可預(yù)測性.公平性。Ciscos Frame Relay目前支持IP,DECnet,AppleTalk, Xerox Network Service(XNS), Novell IPX, International Organization for Standards (ISO) Connectionless Network Service (CLNS), Banyan VINES, 和 transparent bridging在幀中繼中傳輸.配置幀中繼的工作表:在一個端口上作幀中繼打包定義動態(tài)或靜態(tài)的地址映射定義LMI配置幀中繼交換虛電路幀中繼交換監(jiān)控幀中繼連接在一個端口上作

20、幀中繼打包某一端口上配置幀中繼打包走幀中繼協(xié)議,在global配置模式下:功 能 命 令指定走幀中繼的端口并進入端口配置模式 interface serial number指定幀中繼打包方式 encapsulation frame-relay ietfCisco的幀中繼與RFC 1490的打包方式一致,允許不同廠家的產(chǎn)品互相通信.當與其它廠家路由器連接時,請用IETF打包.定義動態(tài)或靜態(tài)的地址映射動態(tài)地址映射動態(tài)地址映射用幀中繼的翻轉(zhuǎn)ARP協(xié)議發(fā)送請求下一個希望到達的地址(next hopprotocol address)(假設(shè)知道DLCI),當有應(yīng)答翻轉(zhuǎn)ARP協(xié)議請求時,保存在address

21、-to-DLCI映射表中,這張表就用來提供下一個希望到達的地址或出去的DLCI地址翻轉(zhuǎn)ARP協(xié)議默認是打開的,故動態(tài)地址映射不需要做任何配置.靜態(tài)地址映射一個靜態(tài)地址映射是人為的指定下一個希望到達的地址(next hop protocol address)與DLCI的對應(yīng)關(guān)系.當指定了靜態(tài)地址映射時,翻轉(zhuǎn)ARP協(xié)議自動關(guān)閉.建立靜態(tài)地址映射表需完成:功 能 命 令定義一個端口或子端口的DLCI地址 frame-relay interface-dlci dlci指定一個next hop protocol address與DLCI之間對應(yīng) frame-relay map protocol prot

22、ocol-address dlci broadcast ietf cisco相應(yīng)地,關(guān)鍵字protocol支持的協(xié)議:IP-ipDECnet-decnetAppleTalk-appletalkXNS-xnsNovell IPX-ipxVINES-vinesISO CLNS-clns如果是一點對一點,可用interface-dlci命令,若是一點對多點則設(shè)定 frame-relay map 一系列的dlci與ip address 對應(yīng)表.定義LMII在Cisco IOS Release 11.2版本以上,支持本地管理接口LMI(Local managementInterface)自動識別,即由交

23、換機端口決定LMI的類型.當然,我們也可以明確配置LMI類型.功 能 命 令建立路由器間keepalive時間 frame-relay keepalive number定義N391的間隔時間 frame-relay lmi-n391-dte keep-exchanges配置幀中繼交換虛電路目前,訪問幀中繼網(wǎng)是56K到45M數(shù)率,幀中繼是在兩個節(jié)點間建立面向連接的,包交換的虛電路.在一個物理端口上配置SVCs在子端口上配置SVCs在一個幀中繼端口上配置SVC操作功 能 命 令指定物理端口 interface serial number如果需要,配置IP地址 ip address ip-addre

24、ss mask在這個端口上配置幀中繼打包 encapsulation frame-relay在這個端口上激活幀中繼SVC frame-relay svc在子端口上配置SVCs功 能 命 令在主端口上指定一個子端口 interface serial number.subinterface-number multipoint | point-to-point如果需要,配置IP地址 ip address ip-address mask參閱下面Configure subinterface Example的例子.幀中繼交換當一個幀中繼網(wǎng)要通過IP網(wǎng)與另一個幀中繼網(wǎng)互連,就要用到幀中繼交換.把IP網(wǎng)看作幀

25、中繼包的隧道通過去.實現(xiàn)幀中繼交換,配置如下:功 能 命 令把路由器作為幀中繼交換機 frame-relay switching在路由器上設(shè)置靜態(tài)路由 frame-relay route in-dlci out-interface out-dlci定義網(wǎng)絡(luò)功能 frame-relay intf-type dte| dce| nni請參閱Frame Relay Switching Example配置實例.監(jiān)控幀中繼連接在EXEC模式下:功 能 命 令顯示幀中繼DLCI和LMI信息 show interface serial number顯示LMI狀態(tài) show frame-relay lmi t

26、ype number顯示PVC狀態(tài) show frame-relay pvc type number dlci顯示配置靜態(tài)路由 show frame-relay route顯示幀中繼傳輸狀態(tài) show frame-relay traffic3、配置DDNDDN(Digital Data Network)是一種點對點的同步數(shù)據(jù)通信鏈路.它支持PPP,SLIP,HDLC和SDLC等鏈路層通信協(xié)議.允許IP, Novell IPX, Bridging,CLNS,AppleTalk,DECnet等多種上層協(xié)議在上面運行.基本配置壓縮技術(shù)E1端口配置基本配置功 能 命 令進入指定端口 interface

27、 serial number定義該端口IP地址 ip address ip-address mask指定該端口打包方式 encapsulation PPP| HDLC 壓縮技術(shù)通常在串口中傳輸?shù)臄?shù)據(jù)是不壓縮的,它允許數(shù)據(jù)包頭在每次傳輸時正常交換,但每次將浪費帶寬.目前支持的壓縮有PPP,Frame Relay, X.25, TCP等等.Cisco的壓縮是通過軟件完成的,將影響系統(tǒng)性能.故建議路由器CPU占用超過65%,就不要使用壓縮.(show process cpu EXEC命令查看當前CPU使用情況)功 能 命 令TCP傳輸頭壓縮 ip tcp head-compression passi

28、veX.25壓縮 X25 compressPPP壓縮 ppp compress predictir|stac注: passive表示只有輸入包是壓縮時,輸出包才壓縮.E1端口配置在Cisco 4500,4700,7000和7500系列里面均支持E1(2.048Mbps)數(shù)率的接口.每一個E1端口可以按時隙分成30路64K數(shù)據(jù)線路和2路信號線路.這30個64K數(shù)據(jù)線路每一路均可以當作一條64K的專線.功 能 命 令在配置模式下,定義Controller E1 controller e1 slot/port定義line code linecode ami |hdb3定義字符幀 framing cr

29、c4 |no-crc4定義E1組 channel-group number timeslots range speed 48| 56| 64指定串口屬于那一個channel-group組 interface serial slot/port:channel-group注:slot/port-是針對7000或7500系列的,故區(qū)分槽口號和端口號.linecode-默認是HDB3.framing-默認是crc4,要與電信局參數(shù)匹配.channel-group-每個E1可以分成30個channel-group,把channel-group和時間槽對應(yīng)起來.channel-group是0-30,tim

30、eslots是1-31.interface serial-在定義完E1 channel-group后,我們把group賦予成一個虛擬串口.具體的請參閱Channelized E1 Interface Example實例.4、配置X.25X.25配置完成如下工作:功 能 命 令設(shè)置X.25模式 encapsulation x25 dte|dce設(shè)置最大虛電路數(shù) x25 htc max-vc-number設(shè)置X.121地址 x25 address x121-address建立IP地址與X.121地址對應(yīng) x25 map ip ip-address x121-addres broadcasthtc-

31、htc是最大的虛電路數(shù),因為許多X.25交換機是從高到低建立虛電路的,max-vc-number不能超過申請的最大值.請參閱X.25 Example的配置實例.5、配置HDLC:HDLC是CISCO路由器使用的缺省協(xié)議,一臺新路由器在未指定封裝協(xié)議時默認使用HDLC封裝。A.有關(guān)命令端口設(shè)置:任務(wù)命令設(shè)置HDLC封裝 encapsulation hdlc設(shè)置DCE端線路速度 clockrate speed復(fù)位一個硬件接口 clear interface serial unit顯示接口狀態(tài) show interfaces serial unit 1 注:1.以下給出一個顯示Cisco同步串口狀態(tài)

32、的例子. Router#show interface serial 0 Serial 0 is up, line protocol is up Hardware is MCI Serial Internet address is 03, subnet mask is 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 in

33、put 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

34、 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 B. 舉例:設(shè)置如下: Router1: interface Serial0 ip address clockrate 1000000 Router2: interfac

35、e Serial0 ip address ! C. 舉例使用E1線路實現(xiàn)多個64K專線連接.相關(guān)命令: 任務(wù) 命令進入controller配置模式 controller t1 | e1 number選擇幀類型framing crc4 | no-crc4選擇line-code類型linecode ami | b8zs | hdb3建立邏輯通道組與時隙的映射channel-group number timeslots range1顯示controllers接口狀態(tài)show controllers e1 slot/port2注: 1. 當鏈路為T

36、1時,channel-group編號為0-23, Timeslot范圍1-24; 當鏈路為E1時, channel-group編號為0-30, Timeslot范圍1-31. 2.使用show controllers e1觀察controller狀態(tài),以下為幀類型為crc4時controllers正常的狀態(tài). 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. Da

37、ta 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,

38、 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專線, 幀類型為NO-CRC4,非平衡鏈路,路由器具體設(shè)置如下:shanxi#wri tBuilding configuration.Current configuration:!version 11.2no service udp-small-serversno service tcp-small-

39、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 Ethernet0ip address media-type 10BaseT!in

40、terface Ethernet1no ip addressshutdown!interface Serial0:0 ip address 52no ip mroute-cache!interface Serial0:1 ip address 52no ip mroute-cache!interface Serial0:2 ip address 52no ip mroute-cache!no ip classlessip route 133

41、.210.40.0 Serial0:0ip route Serial0:1ip route Serial0:2!line con 0line aux 0line vty 0 4password shanxilogin!end6、配置PPP:PPP(Point-to-Point Protocol)是SLIP(Serial Line IP protocol)的繼承者,它提供了跨過同步和異步電路實現(xiàn)路由器到路由器(router-to-router)和主機到網(wǎng)絡(luò)(ho

42、st-to-network)的連接。CHAP(Challenge Handshake Authentication Protocol)和PAP(Password Authentication Protocol) (PAP)通常被用于在PPP封裝的串行線路上提供安全性認證。使用CHAP和PAP認證,每個路由器通過名字來識別,可以防止未經(jīng)授權(quán)的訪問。CHAP和PAP在RFC 1334上有詳細的說明。A. 有關(guān)命令端口設(shè)置 任務(wù) 命令設(shè)置PPP封裝encapsulation ppp1設(shè)置認證方法ppp authentication chap | chap pap | pap chap | pap i

43、f-needed list-name | default callin指定口令username name password secret設(shè)置DCE端線路速度clockrate speed注:1、要使用CHAP/PAP必須使用PPP封裝。在與非Cisco路由器連接時,一般采用PPP封裝,其它廠家路由器一般不支持Cisco的HDLC封裝協(xié)議。 2. 舉例路由器Router1和Router2的S0口均封裝PPP協(xié)議,采用CHAP做認證,在Router1中應(yīng)建立一個用戶,以對端路由器主機名作為用戶名,即用戶名應(yīng)為router2。同時在Router2中應(yīng)建立一個用戶,以對端路由器主機名作為用戶名,即用戶

44、名應(yīng)為router1。所建的這兩用戶的password必須相同。設(shè)置如下:Router1: hostname router1 username router2 password xxx interface Serial0 ip address clockrate 1000000 ppp authentication chap ! Router2: hostname router2 username router1 password xxx interface Serial0 ip address 255.255.2

45、55.0 ppp authentication chap7、廣域網(wǎng)配置實例DDR ExampleDial Backup ExampleConfigure subinterface ExampleFrame Relay Switching ExampleChannelized E1 Interface ExampleX.25 ExampleDDR Example例:Configuration for RouterA:ip route ip route dialer-list 1 protocol

46、 ip permitdialer-list 1 protocol ipx deny!interface serial 0ip address dialer in-banddialer-group 1!dialer map ip 5551234!dialer idle-timeout 300Dial Backup ExampleA)同步V.25 bits方式Configuration for RouterA:interface Serial0:0backup delay 0 10backup interface S

47、erial10ip address 52!interface Serial10ip address 1 encapsulation pppdialer in-banddialer string 8292dialer-group 1pulse-time 1!dialer-list 1 protocol ip permitB)輔助口作撥號備份Configuration for RouterA:chat-script MYDIAL atdt 8292 TIMEOUT 60 CONNECT!interfac

48、e Serial0backup delay 0 0backup interface Async1ip address encapsulation ppp!interface Async1ip address encapsulation pppkeepalive 9async default routingasync dynamic addressasync dynamic routingasync mode dedicateddialer in-banddialer string 8292dialer-gr

49、oup 1!dialer-list 1 protocol ip permit!line aux 0script dialer MYDIALmodem InOuttransport output nonestopbits 1flowcontrol hardwarespeed 9600Subinterface Example(Frame Relay)Configuration for RouterA:interface serial 0encapsulation frame-relayinterface s 0.1 multipointip address 255.255.2

50、55.0frame-relay interface-dlci 41frame-relay interface-dlci 42Configuration for RouterC:interface serial 0encapsulation frame-relayinterface s 0.1 point-to-pointip address frame-relay interface-dlci 46Configuration for RouterB:interface serial 0encapsulation frame-relayinterf

51、ace s 0.1 multipointip address frame-relay interface-dlci 43frame-relay interface-dlci 44!interface s 0.2 point-to-pointip address frame-relay interface-dlci 48Frame Relay Switching ExampleConfiguration for RouterA:frame-relay switching!int s 0no ip ad

52、dressframe-relay encapsulationframe-relay route 167 tun0 43frame-relay intf-type dce!int s 1ip address !int tu 0tunnel source serial 1tunnel destination Configuration for RouterB:frame-relay switching!int s 0no ip addressframe-relay encapsulationframe-relay rou

53、te 9 tun0 43frame-relay intf-type dce!int s 1ip address !int tu 0tunnel source serial 1tunnel destination Channelized E1 Interface Example假設(shè)是7500系列路由器,E1接口(MIP板)在插槽4上面.一個channel-group可對應(yīng)多個時間槽,本例中serial4/0:1有5*64Kbps的數(shù)率.Configuration for Router:controller E1 0fr

54、aming NO-CRC4channel-group 0 timeslots 1channel-group 1 timeslots 2,7-9,20 speed 64!interface Serial4/0:0ip address 52encapsulation ppp!interface Serial4/0:1ip address 52X.25 Example在配置X.25時,為減少路由交換引起的呼叫,通常用靜態(tài)路由.而當一對多情況下,不在一個子網(wǎng)中用subinterface配置.Configuration for Router:interface serial 0ip address encapsulation x25x25 address 041673226839x2

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論