CISCO配置命令大全(2)

配置撥號備份
  撥號備份提供了一種保護,使得當廣域網上主幹線出現故障時,啓動一條備份線路,使通信正常運轉.
  啓動備份有兩種情況:
  主幹線斷掉
  傳輸流量超過了定義的最大值
  需作的定義如下:
  在主幹線路端口上設置它的備份端口 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 --- 表示主幹線又重新恢復多長時間後,斷開備份線路.
  2、 配置幀中繼
  幀中繼是一種由ANSI和CCITT標準化的協議,它能爲現今突發性業務流量(如LAN互連及SNA業務)提供顯著的性能價格優勢.幀中繼是客戶端設備(CPE),諸如路由器或前端處理器,和一個向遠程CPE發送數據的廣域網之間的一種接口協議.它有以下幾個特點:低時延,時延是指一個給定待發送幀穿過網絡到達遠程用戶設備所用的時間.當網絡時延增大時,性能會下降;尤其對於敏感協議(如SNA和DECnet),所有幀被髮送後必須等待應答的協議(即Novell IPX),以及利用短交易式的應用.可靠性,在給定時延條件下,吞吐量隨着網絡的可靠性變化而變化,可靠性好,超時等待重發幀越少,吞吐量就會大大增加.更低的聯網開銷可預測性在許多網絡環境中,如SNA CICS,不僅要求時延低,而且需要可預測性.公平性。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在幀中繼中傳輸.
  配置幀中繼的工作表:
  在一個端口上作幀中繼打包
  定義動態或靜態的地址映射
  定義LMI
  配置幀中繼交換虛電路
  幀中繼交換
  監控幀中繼連接
  在一個端口上作幀中繼打包
  某一端口上配置幀中繼打包走幀中繼協議,在global配置模式下:
  功 能 命 令
  指定走幀中繼的端口並進入端口配置模式 interface serial number
  指定幀中繼打包方式 encapsulation frame-relay [ietf]
  Cisco的幀中繼與RFC 1490的打包方式一致,允許不同廠家的產品互相通信.當與其它廠家路由器連接時,請用IETF打包.
  定義動態或靜態的地址映射
  動態地址映射
  動態地址映射用幀中繼的翻轉ARP協議發送請求下一個希望到達的地址(next hopprotocol 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 managementInterface)自動識別,即由交換機端口決定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
  3、配置DDN
  DDN(Digital Data Network)是一種點對點的同步數據通信鏈路.它支持PPP,SLIP,HDLC和SDLC等鏈路層通信協議.允許IP, Novell IPX, Bridging,CLNS,AppleTalk,DECnet等多種上層協議在上面運行.
   
  基本配置
  壓縮技術
  E1端口配置
  基本配置
   
  功 能 命 令
  進入指定端口 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"實例.
  4、配置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"的配置實例.
  5、配置HDLC:
  HDLC是CISCO路由器使用的缺省協議,一臺新路由器在未指定封裝協議時默認使用HDLC封裝。
  A.有關命令
  端口設置:
  任務 命令
  設置HDLC封裝 encapsulation hdlc
  設置DCE端線路速度 clockrate speed
  復位一個硬件接口 clear interface serial 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 150.136.190.203, subnet mask is 255.255.255.0
  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
  B. 舉例:
  設置如下:
  Router1:
  
  interface Serial0
  ip address 192.200.10.1 255.255.255.0
  clockrate 1000000
  Router2:
  
  interface Serial0
  ip address 192.200.10.2 255.255.255.0
  !
  C. 舉例使用E1線路實現多個64K專線連接.
  相關命令:
  任務 命令
  進入controller配置模式 controller {t1 | e1} number
  選擇幀類型 framing {crc4 | no-crc4}
  選擇line-code類型 linecode {ami | b8zs | hdb3}
  建立邏輯通道組與時隙的映射 channel-group number timeslots range1
  顯示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 133.118.40.1 255.255.0.0
  media-type 10BaseT
  !
  interface Ethernet1
  no ip address
  shutdown
  !
  interface Serial0:0
  ip address 202.119.96.1 255.255.255.252
  no ip mroute-cache
  !
  interface Serial0:1
  ip address 202.119.96.5 255.255.255.252
  no ip mroute-cache
  !
  interface Serial0:2
  ip address 202.119.96.9 255.255.255.252
  no ip mroute-cache
  !
  no ip classless
  ip route 133.210.40.0 255.255.255.0 Serial0:0
  ip route 133.210.41.0 255.255.255.0 Serial0:1
  ip route 133.210.42.0 255.255.255.0 Serial0:2
  !
  line con 0
  line aux 0
  line vty 0 4
  password shanxi
  login
  !
  end


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章