国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 網絡通信 > 正文

CISCO 技術大集合(2)

2019-11-04 23:24:30
字體:
來源:轉載
供稿:網友

  5. Cisco765M通過ISDN撥號上263
  由于Cisco765的設置命令與我們常用的Cisco路由器的命令不同,所以以下列舉了通過Cisco765上263訪問Internet的具體命令行設置步驟。
  
  >set system c765
  c765> set multidestination on
  c765> set switch net3
  c765> set ppp multilink on
  c765> cd lan
  c765:LAN> set ip routing on
  c765:LAN> set ip address 10.0.0.1
  c765:LAN> set ip netmask 255.0.0.0
  c765:LAN> set briding off
  c765:LAN>cd
  c765> set user remotenet
  New user remotenet being created
  c765:remotenet> set ip routing on
  c765:remotenet> set bridging off
  c765:remotenet> set ip framing none
  c765:remotenet> set ppp clientname 263
  c765:remotenet> set ppp passWord client
  Enter new Password: 263
  Re-Type new Password: 263
  c765:remotenet> set ppp authentication out none
  c765:remotenet> set ip address 0.0.0.0
  c765:remotenet> set ip netmask 0.0.0.0
  c765:remotenet> set ppp address negotiation local on
  c765:remotenet> set ip pat on
  c765:remotenet> set ip route destination 0.0.0.0/0 gateway 0.0.0.0
  c765:remotenet> set number 2633
  c765:remotenet> set active
  命令描述如下:
  任務 命令
  設置路由器系統名稱 set system c765
  答應路由器呼叫多個目的地 set multidestination on
  設置ISDN交換機類型為NET3 set switch net3
  答應點到點間多條通道連接實現負載均衡 set ppp multilink on
  關掉橋接 set briding off
  建立用戶預制文件用于設置撥號連接參數- 可以設置多個用戶預制文件用于相同的物理端口對應于不同的連接。 set user remotenet
  使用PPP/IPCP set ip framing none
  設置上網用戶帳號 set ppp clientname 263
  設置上網口令 set ppp password client Enter new Password: 263 Re-Type new Password: 263
  不用PPP/CHAP或PAP做認證 set ppp authentication out none
  答應地址磋商 set ppp address negotiation local on
  設置地址翻譯 set ip pat on
  設置默認路由 set ip route destination 0.0.0.0/0 gateway 0.0.0.0
  設置ISP的電話號碼 set number 2633
  激活用戶預制文件 set active
   
  返回目錄
   
  六、PSTN
    電話網絡(PSTN)是目前普及程度最高、成本最低的公用通訊網絡,它在網絡互連中也有廣泛的應用。電話網絡的應用一般可分為兩種類型,一種是同等級別機構之間以按需撥號(DDR)的方式實現互連,一種是ISP為撥號上網為用戶提供的遠程訪問服務的功能。
  1. 遠程訪問
  
  1.1.access Server基本設置:
  選用Cisco2511作為訪問服務器,采用IP地址池動態分配地址.遠程工作站使用WIN95撥號網絡實現連接。
  全局設置:
  任務 命令
  設置用戶名和密碼 username username password password
  設置用戶的IP地址池 ip local pool {default pool-name low-ip-address [high-ip-address]}
  指定地址池的工作方式 ip address-pool [dhcp-PRoxy-client local]
  基本接口設置命令:
  任務 命令
  設置封裝形式為PPP encapsulation ppp
  啟動異步口的路由功能 async default routing
  設置異步口的PPP工作方式 async mode {dedicated interactive}
  設置用戶的IP地址 peer default ip address {ip-address dhcp pool [pool-name]}
  設置IP地址與Ethernet0相同 ip unnumbered ethernet0
  line撥號線設置:
  任務 命令
  設置modem的工作方式 modem {inoutdialin}
  自動配置modem類型 modem autoconfig discovery
  設置撥號線的通訊速率 speed speed
  設置通訊線路的流控方式 flowcontrol {none software [lock] [in out] hardware [in out]}
  連通后自動執行命令 autocommand command
  訪問服務器設置如下:
  Router:
  hostname Router
  enable secret 5 $1$EFqU$tYLJLrynNUKzE4bx6fmH//
  !
  interface Ethernet0
  ip address 10.111.4.20 255.255.255.0
  !
  interface Async1
  ip unnumbered Ethernet0
  encapsulation ppp
  keepalive 10
  async mode interactive
  peer default ip address pool Cisco2511-Group-142
  !
  ip local pool Cisco2511-Group-142 10.111.4.21 10.111.4.36
  !
  line con 0
  exec-timeout 0 0
  password cisco
  !
  line 1 16
  modem InOut
  modem autoconfigure discovery
  flowcontrol hardware
  !
  line aux 0
  transport input all
  line vty 0 4
  password cisco
  !
  end
  相關調試命令:
  show interface
  show line
  1.2. Access Server通過Tacacs服務器實現安全認證:
  使用一臺WINDOWS NT服務器作為Tacacs服務器,地址為10.111.4.2,運行Cisco2511隨機帶的Easy ACS 1.0軟件實現用戶認證功能.
  相關設置:
  任務 命令
  激活AAA訪問控制 aaa new-model
  用戶登錄時默認起用Tacacs+做AAA認證 aaa authentication login default tacacs+
  列表名為no_tacacs使用ENABLE口令做認證 aaa authentication login no_tacacs enable
  在運行PPP的串行線上采用Tacacs+做認證 aaa authentication ppp default tacacs+
  由TACACS+服務器授權運行EXEC aaa authorization exec tacacs+
  由TACACS+服務器授權與網絡相關的服務請求。 aaa authorization network tacacs+
  為EXEC會話運行記帳.進程開始和結束時發通告給TACACS+服務器。 aaa accounting exec start-stop tacacs+
  為與網絡相關的服務需求運行記帳包括SLIP,PPP,PPP NCPs,ARAP等.在進程開始和結束時發通告給TACACS+服務器。 aaa accounting network start-stop tacacs+
  指定Tacacs服務器地址 tacacs-server host 10.111.4.2
  在Tacacs+服務器和訪問服務器設定共享的要害字,訪問服務器和Tacacs+服務器使用這個要害字去加密口令和響應信息。這里使用tac作為要害字。 tacacs-server key tac
  訪問服務器設置如下:
  hostname router
  !
  aaa new-model
  aaa authentication login default tacacs+
  aaa authentication login no_tacacs enable
  aaa authentication ppp default tacacs+
  aaa authorization exec tacacs+
  aaa authorization network tacacs+
  aaa accounting exec start-stop tacacs+
  aaa accounting network start-stop tacacs+
  enable secret 5 $1$kN4g$CvS4d2.rJzWntCnn/0hvE0
  !
  interface Ethernet0
  ip address 10.111.4.20 255.255.255.0
  !
  interface Serial0
  no ip address
  shutdown
  interface Serial1
  no ip address
  shutdown
  !
  interface Group-Async1
  ip unnumbered Ethernet0
  encapsulation ppp
  async mode interactive
  peer default ip address pool Cisco2511-Group-142
  no cdp enable
  group-range 1 16
  !
  ip local pool Cisco2511-Group-142 10.111.4.21 10.111.4.36
  tacacs-server host 10.111.4.2
  tacacs-server key tac
  !
  line con 0
  exec-timeout 0 0
  password cisco
  login authentication no_tacacs
  line 1 16
  login authentication tacacs
  modem InOut
  modem autoconfigure type usr_courier
  autocommand ppp
  transport input all
  stopbits 1
  rxspeed 115200
  txspeed 115200
  flowcontrol hardware
  line aux 0
  transport input all
  line vty 0 4
  password cisco
  !
  end
  2. DDR(dial-on-demand routing)實例
  此例通過Cisco 2500系列路由器的aux端口實現異步撥號DDR連接。Router1撥號連接到Router2。其中采用PPP/CHAP做安全認證,在Router1中應建立一個用戶,以對端路由器主機名作為用戶名,即用戶名應為Router2。同時在Router2中應建立一個用戶,以對端路由器主機名作為用戶名,即用戶名應為Router1。所建的這兩用戶的password必須相同。
  相關命令如下:
  任務 命令
  設置路由器與modem的接口指令 chat-script script-name EXPECT SEND EXPECT SEND (etc.)
  設置端口在掛斷前的等待時間 dialer idle-timeout seconds
  設置協議地址與電話號碼的映射 dialer map protocol next-hop-address [name hostname] [broadcast] [modem-script modem-regexp] [system-script system-regexp] [dial-string]
  設置電話號碼 dialer string dial-string
  指定在特定線路下路由器默認 使用的chat-script script {dialerreset} script-name
  Router1:
  hostname Router1
  !
  enable secret 5 $1$QKI7$wXjpFqC74vDAyKBUMallw/
  !
  username Router2 password cisco
  chat-script cisco-default "" "AT" TIMEOUT 30 OK "ATDT /T" TIMEOUT 30 CONNECT /c
  !
  interface Ethernet0
  ip address 10.0.0.1 255.255.255.0
  !
  interface Async1
  ip address 192.200.10.1 255.255.255.0
  encapsulation ppp
  async default routing
  async mode dedicated
  dialer in-band
  dialer idle-timeout 60
  dialer map ip 192.200.10.2 name Router2 modem-script cisco-default 573
  dialer-group 1
  ppp authentication chap
  !
  ip route 10.0.1.0 255.255.255.0 192.200.10.2
  dialer-list 1 protocol ip permit
  !
  line con 0
  line aux 0
  modem InOut
  modem autoconfigure discovery
  flowcontrol hardware
  
  Router2:
  hostname Router2
  !
  enable secret 5 $1$F6EV$5U8puzNt2/o9g.t56PXHo.
  !
  username Router1 password cisco
  !
  interface Ethernet0
  ip address 10.0.1.1 255.255.255.0
  !
  interface Async1
  ip address 192.200.10.2 255.255.255.0
  encapsulation ppp
  async default routing
  async mode dedicated
  dialer in-band
  dialer idle-timeout 60
  dialer map ip 192.200.10.1 name Router1
  dialer-group 1
  ppp authentication chap
  !
  ip route 10.0.0.0 255.255.255.0 192.200.10.1
  dialer-list 1 protocol ip permit
  !
  line con 0
  line aux 0
  modem InOut
  modem autoconfigure discovery
  flowcontrol hardware
  !
  相關調試命令:
  debug dialer
  debug ppp authentication
  debug ppp error
  debug ppp negotiation
  debug ppp packet
  show dialer
  3. 異步撥號備份DDN專線:
  此例主連接采用DDN專線,備份線路為電話撥號。當DDN專線連接正常時,主端口S0狀態為up,line protocol亦為up,則備份線路狀態為standby,line protocol為down,此時所有通信均通過主接口進行。當主接口連接發生故障時,端口狀態為down,則激活備份接口,完成數據通信。此方法不適合為X.25做備份。因為,配置封裝為X.25的接口只要和X.25交換機之間的連接正常其接口及line protocol的狀態亦為 up,它并不考慮其它地方需與之通信的路由器的狀態如何,所以若本地路由器狀態正常,而對方路由器連接即使發生故障,本地也不會激活備份線路。例4將會描述如何為X.25做撥號備份。
  以下是相關命令:
  任務 命令
  指定主線路改變后,次線路狀態發生改變的延遲時間 backup delay {enable-delay never} {disable-delay never}
  指定一個接口作為備份接口 backup interface type number
  hostname c2522rb
  !
  enable secret 5 $1$J5vn$ceYDe2FwPhrZi6qsIIz6g0
  enable password cisco
  !
  username c4700 password 0 cisco
  ip subnet-zero
  chat-script cisco-default "" "AT" TIMEOUT 30 OK "ATDT /T" TIMEOUT 30 CONNECT /c
  chat-script reset atz
  !
  interface Ethernet0
  ip address 16.122.51.254 255.255.255.0
  no ip mroute-cache
  !
  interface Serial0
  backup delay 10 10
  backup interface Serial2
  ip address 16.250.123.18 255.255.255.252
  no ip mroute-cache
  no fair-queue
  !
  interface Serial1
  no ip address
  no ip mroute-cache
  shutdown
  !
  interface Serial2
  physical-layer async
  ip address 16.249.123.18 255.255.255.252
  encapsulation ppp
  async mode dedicated
  dialer in-band
  dialer idle-timeout 60
  dialer map ip 16.249.123.17 name c4700 6825179
  dialer-group 1
  ppp authentication chap
  !
  interface Serial3
  no ip address
  shutdown
  no cdp enable
  !
  interface Serial4
  no ip address
  shutdown
  no cdp enable
  !
  interface Serial5
  no ip address
  no ip mroute-cache
  shutdown
  !
  interface Serial6
  no ip address
  no ip mroute-cache
  shutdown
  !
  interface Serial7
  no ip address
  no ip mroute-cache
  shutdown
  !
  interface Serial8
  no ip address
  no ip mroute-cache
  shutdown
  !
  interface Serial9
  no ip address
  no ip mroute-cache
  shutdown
  !
  interface BRI0
  no ip address
  no ip mroute-cache
  shutdown
  !
  router eigrp 200
  network 16.0.0.0
  !
  ip classless
  !
  dialer-list 1 protocol ip permit
  !
  line con 0
  line 2
  script dialer cisco-default
  script reset reset
  modem InOut
  modem autoconfigure discovery
  rxspeed 38400
  txspeed 38400
  flowcontrol hardware
  line aux 0
  line vty 0 4
  password cisco
  login
  !
  end
  c2522rb#
  4. 異步撥號備份X.25:
  設置X.25的撥號備份,首先X.25連接的端口必須運行動態路由協議,異步撥號口必須使用靜態路由.本例選擇EIGRP作為路由選擇協議,將靜態路由的Metric的值設置為200,由于EIGRP的默認Metric為90,所以當同時有兩條路徑通往同一網段時,其中Metric值小的路徑生效,而當X.25連接出現問題時,路由器無法通過路由協議學習到路由表,則此時靜態路由生效,訪問通過撥號端口實現。當X.25連接恢復正常時,路由器又可以學習到路由表,則由于 Metric值的不同,靜態路由自動被動態路由所代替,這樣就實現了備份的功能。
  路由器Router1配置如下:
  hostname router1
  !
  enable secret 5 $1$UTvD$99YiY2XsRMxHudcYeHn.Y.
  enable password cisco
  !
  username router2 password cisco
  ip subnet-zero
  chat-script cisco-default "" "AT" TIMEOUT 30 OK "ATDT /T" TIMEOUT 30 CONNECT /c
  chat-script reset atz
  interface Ethernet0
  ip address 202.96.38.100 255.255.255.0
  !
  interface Serial0
  ip address 202.96.0.1 255.255.255.0
  encapsulation x25
  x25 address 10112227
  x25 htc 16
  x25 map ip 202.96.0.2 10112225 broadcast
  !
  interface Serial1
  no ip address
  shutdown
  !
  !
  interface Async 1
  ip address 202.96.1.1 255.255.255.252
  encapsulation ppp
  dialer in-band
  dialer idle-timeout 60
  dialer map ip 202.96.1.2 name router2 modem-script cisco-default 2113470
  dialer-group 1
  ppp authentication chap
  !
  router eigrp 200
  redistribute connected
  network 202.96.0.0
  !
  ip route 202.96.37.0 255.255.255.0 202.96.1.2 200
  dialer-list 1 protocol ip permit
  line con 0
  line aux 0
  script dialer cisco-default
  script reset reset
  modem InOut
  modem autoconfigure discovery
  transport input all
  rxspeed 38400
  txspeed 38400
  flowcontrol hardware
  line vty 0 4
  password cisco
  login
  !
  end
  路由器Router2配置如下:
  hostname router2
  !
  enable secret 5 $1$T4IU$2cIqak8f/E4Ug6dLT0k.J0
  enable password cisco
  !
  username router1 password cisco
  ip subnet-zero
  chat-script cisco-default "" "AT" TIMEOUT 30 OK "ATDT /T" TIMEOUT 30 CONNECT /c
  chat-script reset atz
  !
  interface Ethernet0
  ip address 202.96.37.100 255.255.255.0
  !
  interface Serial0
  ip address 202.96.0.2 255.255.255.0
  no ip mroute-cache
  encapsulation x25
  x25 address 10112225
  x25 htc 16
  x25 map ip 202.96.0.1 10112227 broadcast
  !
  interface Serial1
  no ip address
  shutdown
  !
  interface Async1
  ip address 202.96.1.2 255.255.255.252
  encapsulation ppp
  keepalive 30
  async default routing
  async mode dedicated
  dialer in-band
  dialer idle-timeout 60
  dialer wait-for-carrier-time 120
  dialer map ip 202.96.1.1 name router1 modem-script cisco-default 2113469
  dialer-group 1
  ppp authentication chap
  !
  router eigrp 200
  redistribute static
  network 202.96.0.0
  !
  no ip classless
  ip route 202.96.38.0 255.255.255.0 202.96.1.1 200
  dialer-list 1 protocol ip permit
  !
  line con 0
  exec-timeout 0 0
  line aux 0
  script reset reset
  modem InOut
  modem autoconfigure discovery
  transport input all
  rxspeed 38400
  txspeed 38400
  flowcontrol hardware
  line vty 0 4
  password cisco
  login
  !
  end
   
  路由協議:
  
  一、RIP協議
   
  RIP(Routing information Protocol)是應用較早、使用較普遍的內部網關協議(Interior Gateway Protocol,簡稱IGP),適用于小型同類網絡,是典型的距離向量(distance-vector)協議。文檔見RFC1058、RFC1723。
  RIP通過廣播UDP報文來交換路由信息,每30秒發送一次路由信息更新。RIP提供跳躍計數(hop count)作為尺度來衡量路由距離,跳躍計數是一個包到達目標所必須經過的路由器的數目。假如到相同目標有二個不等速或不同帶寬的路由器,但跳躍計數相同,則RIP認為兩個路由是等距離的。RIP最多支持的跳數為15,即在源和目的網間所要經過的最多路由器的數目為15,跳數16表示不可達。
  1. 有關命令
  任務 命令
  指定使用RIP協議 router rip
  指定RIP版本 version {12}1
  指定與該路由器相連的網絡 network network
  注:1.Cisco的RIP版本2支持驗證、密鑰治理、路由匯總、無類域間路由(CIDR)和變長子網掩碼(VLSMs)
  2. 舉例
  Router1:
  router rip
  version 2
  network 192.200.10.0
  network 192.20.10.0
  !
  相關調試命令:
  show ip protocol
  show ip route
   
  返回目錄
   
  
  二、IGRP協議
   
  IGRP (Interior Gateway Routing Protocol)是一種動態距離向量路由協議,它由Cisco公司八十年代中期設計。使用組合用戶配置尺度,包括延遲、帶寬、可靠性和負載。
  缺省情況下,IGRP每90秒發送一次路由更新廣播,在3個更新周期內(即270秒),沒有從路由中的第一個路由器接收到更新,則公布路由不可訪問。在7個更新周期即630秒后,Cisco IOS 軟件從路由表中清除路由。
  1. 有關命令
  任務 命令
  指定使用RIP協議 router igrp autonomous-system1
  指定與該路由器相連的網絡 network network
  指定與該路由器相鄰的節點地址 neighbor ip-address
  注:1、autonomous-system可以隨意建立,并非實際意義上的autonomous-system,但運行IGRP的路由器要想交換路由更新信息其autonomous-system需相同。
  2.舉例
  Router1:
  router igrp 200
  network 192.200.10.0
  network 192.20.10.0
  !
  
  三、OSPF協議
   
  OSPF(Open Shortest Path First)是一個內部網關協議(Interior Gateway Protocol,簡稱IGP),用于在單一自治系統(autonomous system,AS)內決策路由。與RIP相對,OSPF是鏈路狀態路有協議,而RIP是距離向量路由協議。
  鏈路是路由器接口的另一種說法,因此OSPF也稱為接口狀態路由協議。OSPF通過路由器之間通告網絡接口的狀態來建立鏈路狀態數據庫,生成最短路徑樹,每個OSPF路由器使用這些最短路徑構造路由表。
  文檔見RFC2178。
  1.有關命令
  全局設置
  任務 命令
  指定使用OSPF協議 router ospf process-id1
  指定與該路由器相連的網絡 network address wildcard-mask area area-id2
  指定與該路由器相鄰的節點地址 neighbor ip-address
  注:1、OSPF路由進程process-id必須指定范圍在1-65535,多個OSPF進程可以在同一個路由器上配置,但最好不這樣做。多個OSPF進程需要多個OSPF數據庫的副本,必須運行多個最短路徑算法的副本。process-id只在路由器內部起作用,不同路由器的process-id可以不同。
  2、wildcard-mask 是子網掩碼的反碼, 網絡區域ID area-id在0-4294967295內的十進制數,也可以是帶有IP地址格式的x.x.x.x。當網絡區域ID為0或0.0.0.0時為主干域。不同網絡區域的路由器通過主干域學習路由信息。
  2.基本配置舉例:
  Router1:
  interface ethernet 0
  ip address 192.1.0.129 255.255.255.192
  !
  interface serial 0
  ip address 192.200.10.5 255.255.255.252
  !
  router ospf 100
  network 192.200.10.4 0.0.0.3 area 0
  network 192.1.0.128 0.0.0.63 area 1
  !
  Router2:
  interface ethernet 0
  ip address 192.1.0.65 255.255.255.192
  !
  interface serial 0
  ip address 192.200.10.6 255.255.255.252
  !
  router ospf 200
  network 192.200.10.4 0.0.0.3 area 0
  network 192.1.0.64 0.0.0.63 area 2
  !
  Router3:
  interface ethernet 0
  ip address 192.1.0.130 255.255.255.192
  !
  router ospf 300
  network 192.1.0.128 0.0.0.63 area 1
  !
  Router4:
  interface ethernet 0
  ip address 192.1.0.66 255.255.255.192
  !
  router ospf 400
  network 192.1.0.64 0.0.0.63 area 1
  !
  相關調試命令:
  debug ip ospf events
  debug ip ospf packet
  show ip ospf
  show ip ospf database
  show ip ospf interface
  show ip ospf neighbor
  show ip route
  3. 使用身份驗證
  為了安全的原因,我們可以在相同OSPF區域的路由器上啟用身份驗證的功能,只有經過身份驗證的同一區域的路由器才能互相通告路由信息。
  在默認情況下OSPF不使用區域驗證。通過兩種方法可啟用身份驗證功能,純文本身份驗證和消息摘要(md5)身份驗證。純文本身份驗證傳送的身份驗證口令為純文本,它會被網絡探測器確定,所以不安全,不建議使用。而消息摘要(md5)身份驗證在傳輸身份驗證口令前,要對口令進行加密,所以一般建議使用此種方法進行身份驗證。
  使用身份驗證時,區域內所有的路由器接口必須使用相同的身份驗證方法。為起用身份驗證,必須在路由器接口配置模式下,為區域的每個路由器接口配置口令。
  任務 命令
  指定身份驗證 area area-id authentication [message-digest]
  使用純文本身份驗證 ip ospf authentication-key password
  使用消息摘要(md5)身份驗證 ip ospf message-digest-key keyid md5 key
  以下列舉兩種驗證設置的示例,示例的網絡分布及地址分配環境與以上基本配置舉例相同,只是在Router1和Router2的區域0上使用了身份驗證的功能。:
  例1.使用純文本身份驗證
  Router1:
  interface ethernet 0
  ip address 192.1.0.129 255.255.255.192
  !
  interface serial 0
  ip address 192.200.10.5 255.255.255.252
  ip ospf authentication-key cisco
  !
  router ospf 100
  network 192.200.10.4 0.0.0.3 area 0
  network 192.1.0.128 0.0.0.63 area 1
  area 0 authentication
  !
  Router2:
  interface ethernet 0
  ip address 192.1.0.65 255.255.255.192
  !
  interface serial 0
  ip address 192.200.10.6 255.255.255.252
  ip ospf authentication-key cisco
  !
  router ospf 200
  network 192.200.10.4 0.0.0.3 area 0
  network 192.1.0.64 0.0.0.63 area 2
  area 0 authentication
  !
  例2.消息摘要(md5)身份驗證:
  Router1:
  interface ethernet 0
  ip address 192.1.0.129 255.255.255.192
  !
  interface serial 0
  ip address 192.200.10.5 255.255.255.252
  ip ospf message-digest-key 1 md5 cisco
  !
  router ospf 100
  network 192.200.10.4 0.0.0.3 area 0
  network 192.1.0.128 0.0.0.63 area 1
  area 0 authentication message-digest
  !
  Router2:
  interface ethernet 0
  ip address 192.1.0.65 255.255.255.192
  !
  interface serial 0
  ip address 192.200.10.6 255.255.255.252
  ip ospf message-digest-key 1 md5 cisco
  !
  router ospf 200
  network 192.200.10.4 0.0.0.3 area 0
  network 192.1.0.64 0.0.0.63 area 2
  area 0 authentication message-digest
  !
  相關調試命令:
  debug ip ospf adj
  debug ip ospf events
   
  返回目錄
   
  四、重新分配路由
   
  在實際工作中,我們會碰到使用多個IP路由協議的網絡。為了使整個網絡正常地工作,必須在多個路由協議之間進行成功的路由再分配。
  以下列舉了OSPF與RIP之間重新分配路由的設置范例:
  
  Router1的Serial 0端口和Router2的Serial 0端口運行OSPF,在Router1的Ethernet 0端口運行RIP 2,Router3運行RIP2,Router2有指向Router4的192.168.2.0/24網的靜態路由,Router4使用默認靜態路由。需要在Router1和Router3之間重新分配OSPF和RIP路由,在Router2上重新分配靜態路由和直連的路由。
  范例所涉及的命令
  任務 命令
  重新分配直連的路由 redistribute connected
  重新分配靜態路由 redistribute static
  重新分配ospf路由 redistribute ospf process-id metric metric-value
  重新分配rip路由 redistribute rip metric metric-value
  Router1:
  interface ethernet 0
  ip address 192.168.1.1 255.255.255.0
  !
  interface serial 0
  ip address 192.200.10.5 255.255.255.252
  !
  router ospf 100
  redistribute rip metric 10
  network 192.200.10.4 0.0.0.3 area 0
  !
  router rip
  version 2
  redistribute ospf 100 metric 1
  network 192.168.1.0
  !
  Router2:
  interface loopback 1
  ip address 192.168.3.2 255.255.255.0
  !
  interface ethernet 0
  ip address 192.168.0.2 255.255.255.0
  !
  interface serial 0
  ip address 192.200.10.6 255.255.255.252
  !
  router ospf 200
  redistribute connected subnet
  redistribute static subnet
  network 192.200.10.4 0.0.0.3 area 0
  !
  ip route 192.168.2.0 255.255.255.0 192.168.0.1
  !
  Router3:
  interface ethernet 0
  ip address 192.168.1.2 255.255.255.0
  !
  router rip
  version 2
  network 192.168.1.0
  !
  Router4:
  interface ethernet 0
  ip address 192.168.0.1 255.255.255.0
  !
  interface ethernet 1
  ip address 192.168.2.1 255.255.255.0
  !
  ip route 0.0.0.0 0.0.0.0 192.168.0.2
  !
   
  
  五、IPX協議設置
   
  IPX協議與IP協議是兩種不同的網絡層協議,它們的路由協議也不一樣,IPX的路由協議不象IP的路由協議那樣豐富,所以設置起來比較簡單。但IPX協議在以太網上運行時必須指定封裝形式。
  1. 有關命令
  啟動IPX路由 ipx routing
  設置IPX網絡及以太網封裝形式 ipx network network [encapsulation encapsulation-type]1
  指定路由協議,默認為RIP ipx router {eigrp autonomous-system-number nlsp [tag] rip}
  注:1.network 范圍是1 到FFFFFFFD.
  IPX封裝類型列表
  接口類型 封裝類型 IPX幀類型
  Ethernet novell-ether (默認) arpa sap snap Ethernet_802.3 Ethernet_II Ethernet_802.2 Ethernet_Snap
  Token Ring sap (默認) snap Token-Ring Token-Ring_Snap
  FDDI snap (默認) sap novell-fddi Fddi_Snap Fddi_802.2 Fddi_Raw
  舉例:
  在此例中,WAN的IPX網絡為3a00,Router1所連接的局域網IPX網絡號為2a00,在此局域網有一臺Novell服務器,IPX網絡號也是2a00, 路由器接口的IPX網絡號必須與在同一網絡的Novell服務器上設置的IPX網絡號相同。路由器通過監聽SAP來建立已知的服務及自己的網絡地址表,并每60秒發送一次自己的SAP表。
  Router1:
  ipx routing
  interface ethernet 0
  ipx network 2a00 encapsulation sap
  !
  interface serial 0
  ipx network 3a00
  !
  ipx router eigrp 10
  network 3a00
  network 2a00
  !
  
  Router2:
  ipx routing
  interface ethernet 0
  ipx network 2b00 encapsulation sap
  !
  interface serial 0
  ipx network 3a00
  !
  ipx router eigrp 10
  network 2b00
  network 3a00
  !
  相關調試命令:
  debug ipx packet
  debug ipx routing
  debug ipx sap
  debug ipx spoof
  debug ipx spx
  show ipx eigrp interfaces
  show ipx eigrp neighbors
  show ipx eigrp topology
  show ipx interface
  show ipx route
  show ipx servers
  show ipx spx-spoof
   
  五、IPX協議設置
   
  IPX協議與IP協議是兩種不同的網絡層協議,它們的路由協議也不一樣,IPX的路由協議不象IP的路由協議那樣豐富,所以設置起來比較簡單。但IPX協議在以太網上運行時必須指定封裝形式。
  1. 有關命令
  啟動IPX路由 ipx routing
  設置IPX網絡及以太網封裝形式 ipx network network [encapsulation encapsulation-type]1
  指定路由協議,默認為RIP ipx router {eigrp autonomous-system-number nlsp [tag] rip}
  注:1.network 范圍是1 到FFFFFFFD.
  IPX封裝類型列表
  接口類型 封裝類型 IPX幀類型
  Ethernet novell-ether (默認) arpa sap snap Ethernet_802.3 Ethernet_II Ethernet_802.2 Ethernet_Snap
  Token Ring sap (默認) snap Token-Ring Token-Ring_Snap
  FDDI snap (默認) sap novell-fddi Fddi_Snap Fddi_802.2 Fddi_Raw
  舉例:
  在此例中,WAN的IPX網絡為3a00,Router1所連接的局域網IPX網絡號為2a00,在此局域網有一臺Novell服務器,IPX網絡號也是2a00, 路由器接口的IPX網絡號必須與在同一網絡的Novell服務器上設置的IPX網絡號相同。路由器通過監聽SAP來建立已知的服務及自己的網絡地址表,并每60秒發送一次自己的SAP表。
  Router1:
  ipx routing
  interface ethernet 0
  ipx network 2a00 encapsulation sap
  !
  interface serial 0
  ipx network 3a00
  !
  ipx router eigrp 10
  network 3a00
  network 2a00
  !
  
  Router2:
  ipx routing
  interface ethernet 0
  ipx network 2b00 encapsulation sap
  !
  interface serial 0
  ipx network 3a00
  !
  ipx router eigrp 10
  network 2b00
  network 3a00
  !
  相關調試命令:
  debug ipx packet
  debug ipx routing
  debug ipx sap
  debug ipx spoof
  debug ipx spx
  show ipx eigrp interfaces
  show ipx eigrp neighbors
  show ipx eigrp topology
  show ipx interface
  show ipx route
  show ipx servers
  show ipx spx-spoof
   
  
  4、、、章 服務質量及訪問控制
  
  一、協議優先級設置
   
  1.有關命令
  任務 命令
  設置優先級表項目 priority-list list-number protocol protocol {high medium normal low} queue-keyword keyword-value
  使用指定的優先級表 priority-group list-number
  
  2.舉例
  Router1:
  priority-list 1 protocol ip high tcp telnet
  priority-list 1 protocol ip low tcp FTP
  priority-list 1 default normal
  interface serial 0
  
  priority-group 1
   
  返回目錄
   
  二、隊列定制
   
  1.有關命令
  任務 命令
  設置隊列表中包含協議 queue-list list-number protocol protocol-name queue-number queue-keyword keyword-value
  設置隊列表中隊列的大小 queue-list list-number queue queue-number byte-count byte-count-number
  使用指定的隊列表 custom-queue-list list
  
  2.舉例
  Router1:
  queue-list 1 protocol ip 0 tcp telnet
  queue-list 1 protocol ip 1 tcp www
  queue-list 1 protocol ip 2 tcp ftp
  queue-list 1 queue 0 byte-count 300
  queue-list 1 queue 1 byte-count 200
  queue-list 1 queue 2 byte-count 100
  interface serial 0
  
  custom-queue-list 1
  返回目錄
   三、訪問控制
   
  1.有關命令
  任務 命令
  設置訪問表項目 access-list list {permit deny} address mask
  設置隊列表中隊列的大小 queue-list list-number queue queue-number byte-count byte-count-number
  使用指定的訪問表 ip access-group list {in out}
  2.舉例
  Router1:
  access-list 1 deny 192.1.3.0 0.0.0.255
  access-list 1 permit any
  interface serial 0
  
  ip access-group 1 in
   
  返回目錄
   
  虛擬局域網(VLAN)路由
  
  一、虛擬局域網(VLAN)
  當前在我們構造企業網絡時所采用的主干網絡技術一般都是基于交換和虛擬網絡的。交換技術將共享介質改為獨占介質,大大提高網絡速度。虛擬網絡技術打破了地理環境的制約,在不改動網絡物理連接的情況下可以任意將工作站在工作組或子網之間移動,工作站組成邏輯工作組或虛擬子網,提高信息系統的運作性能,均衡網絡數據流量,合理利用硬件及信息資源。同時,利用虛擬網絡技術,大大減輕了網絡治理和維護工作的負擔,降低網絡維護費用。隨著虛擬網絡技術的應用,隨之必然產生了在虛擬網間如何通訊的問題.
   
   
  返回目錄
   
  二、交換機間鏈路(ISL)協議
    ISL(Interior Switching Link)協議用于實現交換機間的VLAN中繼。它是一個信息包標記協議,在支持ISL接口上發送的幀由一個標準以太網幀及相關的VLAN信息組成。如下圖所示,在支持ISL的接口上可以傳送來自不同VLAN的數據。
  
   
  
  三、虛擬局域網(VLAN)路由實例
   
  3.1. 例一:
   
  
  設備選用Catalyst5500交換機1臺,安裝WS-X5530-E3治理引擎,多塊WS-X5225R及WS-X5302路由交換模塊,WS-X5302被直接插入交換機,通過二個通道與系統背板上的VLAN 相連,從用戶角度看認為它是1個1接口的模塊,此接口支持ISL。在交換機內劃有3個虛擬網,分別名為default、qbw、rgw,通過WS-X5302實現虛擬網間路由。
  以下加重下橫線部分,如set system name 5500C為需設置的命令。
  設置如下:
  Catalyst 5500配置:
  begin
  set password $1$FMFQ$HfZR5DUszVHIRhrz4h6V70
  set enablepass $1$FMFQ$HfZR5DUszVHIRhrz4h6V70
  set prompt Console>
  set length 24 default
  set logout 20
  set banner motd ^C^C
  !
  #system
  set system baud 9600
  set system modem disable
  set system name 5500C
  set system location
  set system contact
  !
  #ip
  set interface sc0 1 10.230.4.240 255.255.255.0 10.230.4.255
  set interface sc0 up
  set interface sl0 0.0.0.0 0.0.0.0
  set interface sl0 up
  set arp agingtime 1200
  set ip redirect enable
  set ip unreachable enable
  set ip fragmentation enable
  set ip route 0.0.0.0 10.230.4.15 1
  set ip alias default 0.0.0.0
  !
  #Command alias
  !
  #vtp
  set vtp domain hne
  set vtp mode server
  set vtp v2 disable
  set vtp pruning disable
  set vtp pruneeligible 2-1000
  clear vtp pruneeligible 1001-1005
  set vlan 1 name default type ethernet mtu 1500 said 100001 state active
  set vlan 777 name rgw type ethernet mtu 1500 said 100777 state active
  set vlan 888 name qbw type ethernet mtu 1500 said 100888 state active
  set vlan 1002 name fddi-default type fddi mtu 1500 said 101002 state active
  set vlan 1004 name fddinet-default type fddinet mtu 1500 said 101004 state active bridge 0x0 stp ieee
  set vlan 1005 name trnet-default type trbrf mtu 1500 said 101005 state active bridge 0x0 stp ibm
  set vlan 1003 name token-ring-default type trcrf mtu 1500 said 101003 state active parent 0 ring 0x0 mode srb aremaxhop 7 stemaxhop 7
  !
  #set boot command
  set boot config-register 0x102
  set boot system Flash bootflash:cat5000-sup3.4-3-1a.bin
  !
  #module 1 : 2-port 1000BaseLX Supervisor
  set module name 1
  set vlan 1 1/1-2
  set port enable 1/1-2
  !
  #module 2 : empty
  !
  #module 3 : 24-port 10/100BaseTX Ethernet
  set module name 3
  set module enable 3
  set vlan 1 3/1-22
  set vlan 777 3/23
  set vlan 888 3/24
  set trunk 3/1 on isl 1-1005
  #module 4 empty
  !
  #module 5 empty
  !
  #module 6 : 1-port Route Switch
  set module name 6
  set port level 6/1 normal
  set port trap 6/1 disable
  set port name 6/1
  set cdp enable 6/1
  set cdp interval 6/1 60
  set trunk 6/1 on isl 1-1005
  !
  #module 7 : 24-port 10/100BaseTX Ethernet
  set module name 7
  set module enable 7
  set vlan 1 7/1-22
  set vlan 888 7/23-24
  set trunk 7/1 on isl 1-1005
  set trunk 7/2 on isl 1-1005
  !
  #module 8 empty
  !
  #module 9 empty
  !
  #module 10 : 12-port 100BaseFX MM Ethernet
  set module name 10
  set module enable 10
  set vlan 1 10/1-12
  set port channel 10/1-4 off
  set port channel 10/5-8 off
  set port channel 10/9-12 off
  set port channel 10/1-2 on
  set port channel 10/3-4 on
  set port channel 10/5-6 on
  set port channel 10/7-8 on
  set port channel 10/9-10 on
  set port channel 10/11-12 on
  #module 11 empty
  !
  #module 12 empty
  !
  #module 13 empty
  !
  #switch port analyzer
  !set span 1 1/1 both inpkts disable
  set span disable
  !
  #cam
  set cam agingtime 1-2,777,888,1003,1005 300
  end
  5500C> (enable)
  WS-X5302路由模塊設置:
  Router#wri t
  Building configuration...
  Current configuration:
  !
  version 11.2
  no service password-encryption
  no service udp-small-servers
  no service tcp-small-servers
  !
  hostname Router
  !
  enable secret 5 $1$w1kK$AJK69fGOD7BqKhKcSNBf6.
  !
  ip subnet-zero
  !
  interface Vlan1
  ip address 10.230.2.56 255.255.255.0
  !
  interface Vlan777
  ip address 10.230.3.56 255.255.255.0
  !
  interface Vlan888
  ip address 10.230.4.56 255.255.255.0
  !
  no ip classless
  !
  line con 0
  line aux 0
  line vty 0 4
  password router
  login
  !
  end
  Router#
  3.1. 例二:
  交換設備仍選用Catalyst5500交換機1臺,安裝WS-X5530-E3治理引擎,多塊WS-X5225R在交換機內劃有3個虛擬網,分別名為default、qbw、rgw,通過Cisco3640路由器實現虛擬網間路由。交換機設置與例一類似。
  路由器Cisco3640,配有一塊NM-1FE-TX模塊,此模塊帶有一個快速以太網接口可以支持ISL。Cisco3640快速以太網接口與交換機上的某一支持ISL的端口實現連接,如交換機第3槽第1個接口(3/1口)。
  Router#wri t
  Building configuration...
  Current configuration:
  !
  version 11.2
  no service password-encryption
  no service udp-small-servers
  no service tcp-small-servers
  !
  hostname Router
  !
  enable secret 5 $1$w1kK$AJK69fGOD7BqKhKcSNBf6.
  !
  ip subnet-zero
  !
  interface FastEthernet1/0
  !
  interface FastEthernet1/0.1
  encapsulation isl 1
  ip address 10.230.2.56 255.255.255.0
  !
  interface FastEthernet1/0.2
  encapsulation isl 777
  ip address 10.230.3.56 255.255.255.0
  !
  interface FastEthernet1/0.3
  encapsulation isl 888
  ip address 10.230.4.56 255.255.255.0
  !
  no ip classless
  !
  line con 0
  line aux 0
  line vty 0 4
  password router
  login
  !
  end
  Router#
   
  返回目錄
  
  參考參考:
   
  1、Cisco路由器口令恢復
  當Cisco路由器的口令被錯誤修改或忘記時,可以按如下步驟進行操作:
  1. 開機時按使進入ROM監控狀態
  2. 按o 命令讀取配置寄存器的原始值
  > o 一般值為0x2102
  3. 作如下設置,使忽略NVRAM引導
  >o/r0x**4* Cisco2500系列命令
  rommon 1 >confreg 0x**4* Cisco2600、1600系列命令
  一般正常值為0x2102
  4. 重新啟動路由器
  >I
  rommon 2 >reset
  5. 在“Setup”模式,對所有問題回答No
  6. 進入特權模式
  Router>enable
  7. 下載NVRAM
  Router>configure memory
  8. 恢復原始配置寄存器值并激活所有端口
  “hostname”#configure terminal
  “hostname”(config)#config-register 0x“value”
  “hostname”(config)#interface xx
  “hostname”(config)#no shutdown
  9. 查詢并記錄丟失的口令
  “hostname”#show configuration (show startup-config)
  10. 修改口令
  “hostname”#configure te


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 旬阳县| 额尔古纳市| 长汀县| 黄山市| 漳州市| 灵川县| 扶绥县| 邢台县| 京山县| 绵竹市| 高陵县| 兴城市| 旅游| 浪卡子县| 新蔡县| 杭州市| 莎车县| 建始县| 东乌珠穆沁旗| 习水县| 东光县| 石河子市| 电白县| 保康县| 贵南县| 九台市| 乌鲁木齐县| 英吉沙县| 宽甸| 天水市| 鄂尔多斯市| 嵊泗县| 桦川县| 红安县| 克拉玛依市| 北海市| 富民县| 肥西县| 常熟市| 边坝县| 海南省|