當前位置:學者齋 >

IT認證 >思科認證 >

思科路由器廣域網協議設定

思科路由器廣域網協議設定

思科(Cisco)路由器是通過何種方式,來提供超越基本資料訪問的優勢,並作為可實現最高生產率和投資回報的整合路由系統的一部分,提供話音、安全和無線等服務。下面小編準備了關於思科路由器廣域網協議設定,歡迎大家參考!

思科路由器廣域網協議設定

  一、HDLC

HDLC是CISCO路由器使用的預設協議,一臺新路由器在未指定封裝協議時預設使用HDLC封裝。

1. 有關命令

埠設定

任務命令
設定HDLC封裝encapsulation hdlc
設定DCE端線路速度clockratespeed
復位一個硬體介面clear interfaceserial 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 , 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 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

2. 舉例

  設定如下:

Router1:

interface Serial0

ip address

clockrate 1000000

Router2:

interface Serial0

ip address

!

3. 舉例使用E1線路實現多個64K專線連線.

相關命令:

任務命令
進入controller配置模式controller {t1 | e1}number
選擇幀型別framing {crc4 | no-crc4}
選擇line-code型別linecode {ami | b8zs | hdb3}
建立邏輯通道組與時隙的對映channel-groupnumbertimeslotsrange1
顯示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,

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

以下例子為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

media-type 10BaseT

!

interface Ethernet1

no ip address

shutdown

!

interface Serial0:0

ip address

no ip mroute-cache

!

interface Serial0:1

ip address

no ip mroute-cache

!

interface Serial0:2

ip address

no ip mroute-cache

!

no ip classless

ip route Serial0:0

ip route Serial0:1

ip route 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上有詳細的說明。

1. 有關命令

埠設定

任務命令
設定PPP封裝encapsulation ppp1
設定認證方法ppp authentication {chap | chap pap | pap chap | pap} [if-needed] [list-name | default] [callin]
指定口令usernamenamepasswordsecret
設定DCE端線路速度clockratespeed
  注:1、要使用CHAP/PAP必須使用PPP封裝。在與非Cisco路由器連線時,一般採用PPP封裝,其它廠家路由器一般不支援Cisco的HDLC封裝協議。

2. 舉例

路由器Router1和Router2的S0口均封裝PPP協議,採用CHAP做認證,在Router1中應建立一個使用者,以對端路由器主機名作為使用者名稱,即使用者名稱應為router2。同時在Router2中應建立一個使用者,以對端路由器主機名作為使用者名稱,即使用者名稱應為router1。所建的這兩使用者的password必須相同。

設定如下:

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

ppp authentication chap

  三、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 addressx.121-address
設定遠方站點的`地址對映x25 map protocoladdress[protocol2address2[...[protocol9address9]]]x121-address[option]
設定最大的雙向虛電路數x25 htccitcuit-number1
設定一次連線可同時建立的虛電路數x25 nvccount2
設定x25在清除空閒虛電路前的等待週期x25 idleminutes
重新啟動x25,或清一個svc,啟動一個pvc相關引數clear x25 {serial number | cmns-interface mac-address} [vc-number]3
清x25虛電路clear x25-vc
顯示介面及x25相關資訊show interfaces serial
show x25 interface
show x25 map
show 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交換機埠的設定來配置路由器的相關引數,若出現引數不匹配則可能會導致連線失敗或其它意外情況。

3. 例項:

3.1. 在以下例項中每二個路由器間均通過svc實現連線。

路由器設定如下:

Router1:

interface Serial0

encapsulation x25

ip address

x25 address 110101

x25 htc 16

x25 nvc 2

x25 map ip 110102 broadcast

x25 map ip 110103 broadcast

!

Router2:

interface Serial0

encapsulation x25

ip address

x25 address 110102

x25 htc 16

x25 nvc 2

x25 map ip 110101 broadcast

x25 map ip 110103 broadcast

!

Router:

interface Serial0

encapsulation x25

ip address

x25 address 110103

x25 htc 16

x25 nvc 2

x25 map ip 110101 broadcast

x25 map ip 110102 broadcast

!

相關除錯命令:

clear x25-vc

show interfaces serial

show x25 map

show x25 route

show x25 vc

3.2. 在以下例項中路由器router1和router2均通過svc與router連線,但router1和router2不通過svc直接連線,此三個路由器的串列埠執行RIP路由協議,使用了子介面的概念。由於使用子介面,router1和router2均學習到了訪問對方區域網的路徑,若不使用子介面,router1和router2將學不到到對方區域網的路由。

子介面(Subinterface)是一個物理介面上的多個虛介面,可以用於在同一個物理介面上連線多個網。我們知道為了避免路由迴圈,路由器支援split horizon法則,它只允許路由更新被分配到路由器的其它介面,而不會再分配路由更新回到此路由被接收的介面。

無論如何,在廣域網環境使用基於連線的介面(象 X.25和Frame Relay),同一介面通過虛電路(vc)連線多臺遠端路由器時,從同一介面來的路由更新資訊不可以再被髮回到相同的介面,除非強制使用分開的物理介面連線不同的路由器。Cisco提供子介面(subinterface)作為分開的介面對待。你可以將路由器邏輯地連線到相同物理介面的不同子介面, 這樣來自不同子介面的路由更新就可以被分配到其他子介面,同時又滿足split horizon法則。

Router1:

interface Serial0

encapsulation x25

ip address

x25 address 110101

x25 htc 16

x25 nvc 2

x25 map ip 110103 broadcast

!

router rip

network

!

Router2:

interface Serial0

encapsulation x25

ip address

x25 address 110102

x25 htc 16

x25 nvc 2

x25 map ip 110103 broadcast

!

router rip

network

!

Router:

interface Serial0

encapsulation x25

x25 address 110103

x25 htc 16

x25 nvc 2

!

interface Serial0.1 point-to-point

ip address

x25 map ip 110101 broadcast

!

interface Serial0.2 point-to-point

ip address

x25 map ip 110102 broadcast

!

router rip

network

network

  四、Frame Relay

1. 幀中繼技術

幀中繼是一種高效能的WAN協議,它執行在OSI參考模型的物理層和資料鏈路層。它是一種資料包交換技術,是X.25的簡化版本。它省略了X.25的一些強健功能,如提供視窗技術和資料重發技術,而是依靠高層協議提供糾錯功能,這是因為幀中繼工作在更好的WAN裝置上,這些裝置較之X.25的WAN裝置具有更可靠的連線服務和更高的可靠性,它嚴格地對應於OSI參考模型的最低二層,而X.25還提供第三層的服務,所以,幀中繼比X.25具有更高的效能和更有效的傳輸效率。

幀中繼廣域網的裝置分為資料終端裝置(DTE)和資料電路終端裝置(DCE),Cisco路由器作為 DTE裝置。

幀中繼技術提供面向連線的資料鏈路層的通訊,在每對裝置之間都存在一條定義好的通訊鏈路,且該鏈路有一個鏈路識別碼。這種服務通過幀中繼虛電路實現,每個幀中繼虛電路都以資料鏈路識別碼(DLCI)標識自己。DLCI的值一般由幀中繼服務提供商指定。幀中繼即支援PVC也支援SVC。

幀中繼本地管理介面(LMI)是對基本的幀中繼標準的擴充套件。它是路由器和幀中繼交換機之間信令標準,提供幀中繼管理機制。它提供了許多管理複雜網際網路絡的特性,其中包括全域性定址、虛電路狀態訊息和多目傳送等功能。

2. 有關命令:

埠設定

任務命令
設定Frame Relay封裝encapsulation frame-relay[ietf]1
設定Frame Relay LMI型別frame-relay lmi-type {ansi | cisco | q933a}2
設定子介面interface interface-type nterface-number [multipoint|point-to-point]
對映協議地址與DLCIframe-relay map protocol protocol-address dlci [broadcast]3
設定FR DLCI編號frame-relay interface-dlcidlci[broadcast]
  注:1.若使Cisco路由器與其它廠家路由裝置相連,則使用Internet工程任務組(IETF)規定的幀中繼封裝格式。

2.從Cisco IOS版本11.2開始,軟體支援本地管理介面(LMI)“自動感覺”, “自動感覺”使介面能確定交換機支援的LMI型別,使用者可以不明確配置LMI介面型別。

dcast選項允許在幀中繼網路上傳輸路由廣播資訊。

3. 幀中繼point to point配置例項:

Router1:

interface serial 0

encapsulation frame-relay

!

interface serial 0.1 point-to-point

ip address

frame-reply interface-dlci 105

!

interface serial 0.2 point-to-point

ip address

frame-reply interface-dlci 102

!

interface serial 0.3 point-to-point

ip address

frame-reply interface-dlci 104

!

Router2:

interface serial 0

encapsulation frame-relay

!

interface serial 0.1 point-to-point

ip address

frame-reply interface-dlci 201

!

interface serial 0.2 point-to-point

ip address

frame-reply interface-dlci 203

!

相關除錯命令:

show frame-relay lmi

show frame-relay map

show frame-relay pvc

show frame-relay route

show interfaces serial

go top

4. 幀中繼 Multipoint 配置例項:

Router1:

interface serial 0

encapsulation frame-reply

!

interface serial 0.1 multipoint

ip address

frame-reply map ip 201 broadcast

frame-reply map ip 301 broadcast

frame-reply map ip 401 broadcast

!

Router2:

interface serial 0

encapsulation frame-reply

!

interface serial 0.1 multipoint

ip address

frame-reply map ip 102 broadcast

frame-reply map ip 102 broadcast

frame-reply map ip 102 broadcast

!

  五、ISDN

1. 綜合數字業務網(ISDN)

綜合數字業務網(ISDN)由數字電話和資料傳輸服務兩部分組成,一般由電話局提供這種服務。ISDN的基本速率介面(BRI)服務提供2個B通道和1個D通道(2B+D)。BRI的B通道速率為64Kbps,用於傳輸使用者資料。D通道的速率為16Kbps,主要傳輸控制訊號。在北美和日本,ISDN的主速率介面(PRI)提供23個B通道和1個D通道,總速率可達1.544Mbps,其中D通道速率為64Kbps。而在歐洲、澳大利亞等國家,ISDN的PRI提供30個B通道和1個64Kbps D通道,總速率可達2.048Mbps。我國電話局所提供ISDN PRI為30B+D。

2. 基本命令

任務命令
設定ISDN交換型別isdn switch-typeswitch-type1
介面設定interface bri 0
設定PPP封裝encapsulation ppp
設定協議地址與電話號碼的對映dialer map protocolnext-hop-address[namehostname] [broadcast] [dial-string]
啟動PPP多連線ppp multilink
設定啟動另一個B通道的閾值dialer load-thresholdload
顯示ISDN有關資訊show isdn {active | history | memory | services | status [dsl | interface-type number] | timers}
  注:1.交換機型別如下表,國內交換機一般為basic-net3。
按區域分關鍵字交換機型別
Australia
basic-ts013Australian TS013 switches
Europe
basic-1tr6German 1TR6 ISDN switches
basic-nwnet3Norway NET3 switches (phase 1)
basic-net3NET3 ISDN switches (UK, Denmark, and other nations); covers the Euro-ISDN E-DSS1 signalling system
primary-net5NET5 switches (UK and Europe)
vn2French VN2 ISDN switches
vn3French VN3 ISDN switches
Japan
nttJapanese NTT ISDN switches
primary-nttJapanese ISDN PRI switches
North America
basic-5essAT&T basic rate switches
basic-dms100NT DMS-100 basic rate switches
basic-ni1National ISDN-1 switches
primary-4essAT&T 4ESS switch type for the U.S. (ISDN PRI only)
primary-5essAT&T 5ESS switch type for the U.S. (ISDN PRI only)
primary-dms100NT DMS-100 switch type for the U.S. (ISDN PRI only)
New Zealand
basic-nznet3New Zealand Net3 switches
  3. ISDN實現DDR(dial-on-demand routing)例項:

設定如下:

Router1:

hostname router1

user router2 password cisco

!

isdn switch-type basic-net3

!

interface bri 0

ip address

encapsulation ppp

dialer map ip name router2 572

dialer load-threshold 80

ppp multilink

dialer-group 1

ppp authentication chap

!

dialer-list 1 protocol ip permit

!

Router2:

hostname router2

user router1 password cisco

!

isdn switch-type basic-net3

!

interface bri 0

ip address

encapsulation ppp

dialer map ip name router1 571

dialer load-threshold 80

ppp multilink

dialer-group 1

ppp authentication chap

!

  • 文章版權屬於文章作者所有,轉載請註明 https://xuezhezhai.com/zh-tw/itrz/sike/dwkq5n.html