概述
Cisco IOS提供了廣闊范圍的廣域網網絡性能,適合各種網絡環境需要.Cisco提供了信元
轉播SMDS( Switching Mutilmegabit Data Service),電路交換ISDN( Integrated Services
Digital Network),包交換Frame Relay以及兼容電路交換和包交換好處的ATM( Asynchronous
Transfer Mode.局域網仿真( LAN emulation)提供了ATM和各種局域網類型的連接.
Cisco的撥號備份提供了當廣域網出現故障時的連接訪問.DDR(Dial-on-Demand routing)提供
了靈活的用Modem或ISDN連接上廣域網.撥號連接可以使用鏈路訪問程序,LAPB,PPP,X.25和幀
中繼實現.
概述
Cisco IOS提供了廣闊范圍的廣域網網絡性能,適合各種網絡環境需要.Cisco提供了信元轉播SMDS(
Switching Mutilmegabit Data Service),電路交換ISDN( Integrated Services Digital
Network),包交換Frame Relay以及兼容電路交換和包交換好處的ATM(
Asynchronous Transfer Mode.局域網仿真( LAN emulation)提供了ATM和各種局域網類型的連接.
Cisco的撥號備份提供了當廣域網出現故障時的連接訪問.DDR(Dial-on-Demand
routing)提供了靈活的用Modem或ISDN連接上廣域網.撥號連接可以使用鏈路訪問程序,LAPB,PPP,X.25和幀中繼實現.
配置DDR
Dial-on-demand routing(DDR)是用公共電話網提供了網絡連接.通常的,廣域網大多數用專線連接的,路由器連接到類似modem或ISDN
TAs的數據終端DCE設備上,它們支持同步V.25bis協議,你可以用scripts和dialer命令設定撥號串.
DDR比較適用用戶對數率要求不高,偶爾有數據傳輸或只是在特定時候傳輸數據,比如銀行每晚傳送報表等等情況下.
當一個感興趣的包到達路由器時,產生一個DDR請求.路由器發送呼叫建立信息給指定的串口的DCE設備.這個呼叫就把本地和遠程的設備連接起來.一旦沒有數據傳輸,空閑時間開始計時,超過設置的空閑時間,這一次連接終止.DDR現在都用靜態路由來傳輸數據包,避免路由交換引起的DDR撥號.
AppleTalk,Banyan VINES, CLNS, DECnet, IP, IPX, 和XNS可以通過DDR路由尋址.同步串口,異步串口和ISDN端口可以配置成到一個或多個目的地DDR連接.
下圖是一個典型的DDR連接:
在配置DDR過程中,我們可以把一個或幾個物理接口配置成一個邏輯撥號接口,它可以是同步V.25方式,同步DTR啟動撥號或異步chat
script方式.
在端口配置模式下:
| 功 能 |
命 令 |
| 在一個端口上激活 Dial-on-demand routing |
dialer in-band |
| 指定一個端口為撥號訪問組 |
dialer-group group-number |
| 指定一個單一電話號碼 |
dialer string dial-string |
| 斷線前空閑等待時間 |
dialer idle-time seconds |
| 定義一個或多個目的電話號碼表 |
dialer map protocol net-hop-address dialer-string |
| 限定傳輸的access-list表或特定協議 |
dialer-list dialer-group list access-list-number
或
dialer-list dialer-group protocol protocol-name
{permit|deny|list
access-list-number} |
其中dialer string和dialer map兩條命令任選一,dialer string是在只有一個電話號碼時用,而dialer
map是一個電話號碼表.
詳細配置說明請參閱下面"DDR Example"的實例.
配置撥號備份
撥號備份提供了一種保護,使得當廣域網上主幹線出現故障時,啟動一條備份線路,使通信正常運轉.
啟動備份有兩種情況:
主幹線斷掉
傳輸流量超過了定義的最大值
需作的定義如下:
| 在主幹線路端口上設置它的備份端口 |
backup interface interface-name |
| 定義備份負載 |
backup load {enable-threshold | never} {disable-load |never} |
| 定義主幹線up或down的響應時間 |
backup delay {enable-delay | never) {disable-delay | never} |
其中: enable-threshold --- 表示主幹線超過總傳輸量的百分比,啟動備份線路
disable-load --- 表示傳輸量減少百分之多少就斷開備份線路.
enable-delay --- 表示主幹線斷開多長時間,啟動備份線路.
disable-delay --- 表示主幹線又重新恢復多長時間,斷開備份線路.
詳細配置說明請參閱下面"Dial Backup
Example"的實例.
配置幀中繼
幀中繼是一種由ANSI和CCITT標準化的協議,它能為現今突發性業務流量(如LAN互連及SNA業務)提供顯的性能價格優勢.幀中繼是客戶端設備(CPE),諸如路由器或前端處理器,和一個向遠程CPE發送數據的廣域網之間的一種接口協議.它有以下幾個特點:
- 低時延
時延是指一個給定待發送幀穿過網絡到達遠程用戶設備所用的時間.當網絡時延增大時,性能會下降;尤其對敏感協議(如SNA和DECnet),所有幀被發送必須等待應答的協議(即Novell
IPX),以及利用短交易式的應用.
- 可靠性
在給定時延條件下,吞吐量隨著網絡的可靠性變化而變化,可靠性好,超時等待重發幀越少,吞吐量就會大大增加.
- 更低的聯網開銷
- 可預測性
在許多網絡環境中,如SNA CICS,不僅要求時延低,而且需要可預測性.
- 公平性
Cisco's Frame Relay目前支持IP,DECnet,AppleTalk, Xerox Network Service (XNS), Novell
IPX, International Organization for Standards (ISO) Connectionless Network Service (CLNS),
Banyan VINES, 和 transparent bridging在幀中繼中傳輸.
典型的幀中繼連接圖:
配置幀中繼的工作表:
在一個端口上作幀中繼打包
某一端口上配置幀中繼打包走幀中繼協議,在global配置模式下:
| 功 能 |
命 令 |
| 指定走幀中繼的端口並進入端口配置模式 |
interface serial number |
| 指定幀中繼打包方式 |
encapsulation frame-relay [ietf] |
Cisco的幀中繼與RFC 1490的打包方式一致,允許不同廠家的產品互相通信.當與其它廠家路由器連接時,請用IETF打包.
定義動態或靜態的地址映射
動態地址映射
動態地址映射用幀中繼的翻轉ARP協議發送請求下一個希望到達的地址(next
hop protocol address)(假設知道DLCI),當有應答翻轉ARP協議請求時,保存在address-to-DLCI映射表中,這張表就用來提供下一個希望到達的地址或出去的DLCI地址.
翻轉ARP協議默認是打開的,故動態地址映射不需要做任何配置.
靜態地址映射
一個靜態地址映射是人為的指定下一個希望到達的地址(next hop
protocol address)與DLCI的對應關系.當指定了靜態地址映射時,翻轉ARP協議自動關閉.
建立靜態地址映射表需完成:
| 功 能 |
命 令 |
| 定義一個端口或子端口的DLCI地址 |
frame-relay interface-dlci dlci |
| 指定一個next hop protocol address與DLCI之間對應 |
frame-relay map protocol protocol-address dlci [broadcast]
[ietf] [cisco] |
相應地,關鍵字protocol支持的協議:
- IP---ip
- DECnet---decnet
- AppleTalk---appletalk
- XNS---xns
- Novell IPX---ipx
- VINES---vines
- ISO CLNS---clns
如果是一點對一點,可用interface-dlci命令,若是一點對多點則設定
frame-relay map 一系列的dlci與ip address 對應表.
定義LMII
在Cisco IOS Release 11.2版本以上,支持本地管理接口LMI(Local management
Interface)自動識別,即由交換機端口決定LMI的類型.當然,我們也可以明確配置LMI類型.
| 功 能 |
命 令 |
| 建立路由器間keepalive時間 |
frame-relay keepalive number |
| 定義N391的間隔時間 |
frame-relay lmi-n391-dte keep-exchanges |
配置幀中繼交換虛電路
目前,訪問幀中繼網是56K到45M數率,幀中繼是在兩個節點間建立面向連接的,包交換的虛電路.
- 在一個物理端口上配置SVCs
- 在子端口上配置SVCs
在一個幀中繼端口上配置SVC操作
| 功 能 |
命 令 |
| 指定物理端口 |
interface serial number |
| 如果需要,配置IP地址 |
ip address ip-address 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"的例子.
幀中繼交換
當一個幀中繼網要通過IP網與另一個幀中繼網互連,就要用到幀中繼交換.把IP網看作幀中繼包的隧道通過去.
實現幀中繼交換,配置如下:
| 功 能 |
命 令 |
| 把路由器作為幀中繼交換機 |
frame-relay switching |
| 在路由器上設置靜態路由 |
frame-relay route in-dlci out-interface out-dlci |
| 定義網絡功能 |
frame-relay intf-type {dte| dce|
nni} |
請參閱"Frame Relay Switching Example"配置實例.
監控幀中繼連接
在EXEC模式下:
| 功 能 |
命 令 |
| 顯示幀中繼DLCI和LMI信息 |
show interface serial number |
| 顯示LMI狀態 |
show frame-relay lmi [type number] |
| 顯示PVC狀態 |
show frame-relay pvc [type number [dlci]] |
| 顯示配置靜態路由 |
show frame-relay route |
| 顯示幀中繼傳輸狀態 |
show frame-relay traffic |
配置DDN
DDN(Digital Data Network)是一種點對點的同步數據通信鏈路.它支持PPP,SLIP,HDLC和SDLC等鏈路層通信協議.允許IP,
Novell IPX, Bridging,CLNS,AppleTalk,DECnet等多種上層協議在上面運行.
基本配置
| 功 能 |
命 令 |
| 進入指定端口 |
interface serial number |
| 定義該端口IP地址 |
ip address ip-address mask |
| 指定該端口打包方式 |
encapsulation {PPP| HDLC } |
壓縮技術
通常在串口中傳輸的數據是不壓縮的,它允許數據包頭在每次傳輸時正常交換,但每次將浪費帶寬.目前支持的壓縮有PPP,Frame
Relay, X.25, TCP等等.
Cisco的壓縮是通過軟件完成的,將影響系統性能.故建議路由器CPU佔用超過65%,就不要使用壓縮.(show
process cpu EXEC命令查看當前CPU使用情況)
| 功 能 |
命 令 |
| TCP傳輸頭壓縮 |
ip tcp head-compression [passive] |
| X.25壓縮 |
X25 compress |
| PPP壓縮 |
ppp compress [predictir|stac] |
注: "passive"表示只有輸入包是壓縮時,輸出包才壓縮.
E1端口配置
在Cisco 4500,4700,7000和7500系列裡面均支持E1(2.048Mbps)數率的接口.每一個E1端口可以按時隙分成30路64K數據線路和2路信號線路.這30個64K數據線路每一路均可以當作一條64K的專線.
| 功 能 |
命 令 |
| 在配置模式下,定義Controller E1 |
controller e1 slot/port |
| 定義line code |
linecode {ami |hdb3} |
| 定義字符幀 |
framing {crc4 |no-crc4} |
| 定義E1組 |
channel-group number timeslots range
[speed {48| 56| 64}] |
| 指定串口屬那一個channel-group組 |
interface serial slot/port:channel-group |
注:
slot/port----是針對7000或7500系列的,故區分槽口號和端口號.
linecode----默認是HDB3.
framing----默認是crc4,要與電信局參數匹配.
channel-group----每個E1可以分成30個channel-group,把channel-group和時間槽對應起來.channel-group是0-30,timeslots是1-31.
interface serial----在定義完E1 channel-group,我們把group賦予成一個虛擬串口.
具體的請參閱"Channelized E1 Interface
Example"實例.
配置X.25
X.25配置完成如下工作:
| 功 能 |
命 令 |
| 設置X.25模式 |
encapsulation x25 [dte|dce] |
| 設置最大虛電路數 |
x25 htc max-vc-number |
| 設置X.121地址 |
x25 address x121-address |
| 建立IP地址與X.121地址對應 |
x25 map ip ip-address x121-addres [broadcast] |
htc----htc是最大的虛電路數,因為許多X.25交換機是從高到低建立虛電路的,max-vc-number不能超過申請的最大值.
請參閱"X.25 Example"的配置實例.
廣域網配置實例
DDR Example
Configuration for RouterA:
ip route 131.108.29.0 131.108.126.2
ip route 131.108.1.0 131.108.126.2
dialer-list 1 protocol ip permit
dialer-list 1 protocol ipx deny
!
interface serial 0
ip address 131.108.126.1 255.255.255.0
dialer in-band
dialer-group 1
!
dialer map ip 131.108.126.2 5551234
!
dialer idle-timeout 300
Dial Backup Example
A)同步V.25 bits方式
Configuration for RouterA:
interface Serial0:0
backup delay 0 10
backup interface Serial10
ip address 16.217.30.2 255.255.255.252
!
interface Serial10
ip address 16.30.16.81 255.255.255.0
encapsulation ppp
dialer in-band
dialer string 8292
dialer-group 1
pulse-time 1
!
dialer-list 1 protocol ip permit
B)輔助口作撥號備份
Configuration for RouterA:
chat-script MYDIAL "" "atdt 8292" TIMEOUT 60 "CONNECT"
!
interface Serial0
backup delay 0 0
backup interface Async1
ip address 16.3.1.1 255.255.255.0
encapsulation ppp
!
interface Async1
ip address 16.3.2.1 255.255.255.0
encapsulation ppp
keepalive 9
async default routing
async dynamic address
async dynamic routing
async mode dedicated
dialer in-band
dialer string 8292
dialer-group 1
!
dialer-list 1 protocol ip permit
!
line aux 0
script dialer MYDIAL
modem InOut
transport output none
stopbits 1
flowcontrol hardware
speed 9600
Subinterface Example(Frame Relay)
Configuration for RouterA:
interface serial 0
encapsulation frame-relay
interface s 0.1 multipoint
ip address 11.10.11.1 255.255.255.0
frame-relay interface-dlci 41
frame-relay interface-dlci 42
Configuration for RouterC:
interface serial 0
encapsulation frame-relay
interface s 0.1 point-to-point
ip address 11.10.16.2 255.255.255.0
frame-relay interface-dlci 46
Configuration for RouterB:
interface serial 0
encapsulation frame-relay
interface s 0.1 multipoint
ip address 11.10.11.3 255.255.255.0
frame-relay interface-dlci 43
frame-relay interface-dlci 44
!
interface s 0.2 point-to-point
ip address 11.10.13.1 255.255.255.0
frame-relay interface-dlci 48
Frame Relay Switching Example
Configuration for RouterA:
frame-relay switching
!
int s 0
no ip address
frame-relay encapsulation
frame-relay route 167 tun0 43
frame-relay intf-type dce
!
int s 1
ip address 131.108.100.1 255.255.255.0
!
int tu 0
tunnel source serial 1
tunnel destination 131.108.13.2
Configuration for RouterB:
frame-relay switching
!
int s 0
no ip address
frame-relay encapsulation
frame-relay route 9 tun0 43
frame-relay intf-type dce
!
int s 1
ip address 131.108.13.2 255.255.255.0
!
int tu 0
tunnel source serial 1
tunnel destination 131.108.100.1
Channelized E1 Interface Example
假設是7500系列路由器,E1接口(MIP板)在插槽4上面.
一個channel-group可對應多個時間槽,本例中serial4/0:1有5*64Kbps的數率.
Configuration for Router:
controller E1 0
framing NO-CRC4
channel-group 0 timeslots 1
channel-group 1 timeslots 2,7-9,20 speed 64
!
interface Serial4/0:0
ip address 16.217.30.2 255.255.255.252
encapsulation ppp
!
interface Serial4/0:1
ip address 16.205.30.5 255.255.255.252
X.25 Example
在配置X.25時,為減少路由交換引起的呼叫,通常用靜態路由.而當一對多情況下,不在一個子網中用subinterface配置.
Configuration for Router:
interface serial 0
ip address 131.108.100.1 255.255.255.0
encapsulation x25
x25 address 041673226839
x25 htc 16
x25 map ip 131.108.100.2 041675222222
int s 0.1
ip address 131.108.101.1 255.255.255.0
x25 map ip 131.108.101.2 041674222222
!
ip route 131.108.100.0 255.255.255.0 131.108.100.2
ip route 131.108.101.0 255.255.255.0 131.108.101.2
(http://www.fanqiang.com)
進入【