當前位置:學者齋 >

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-hk/itrz/sike/dwkq5n.html