亚洲国产日韩欧美在线a乱码,国产精品路线1路线2路线,亚洲视频一区,精品国产自,www狠狠,国产情侣激情在线视频免费看,亚洲成年网站在线观看

思科最技術(shù)命令

時(shí)間:2023-03-11 03:07:53 思科認(rèn)證 我要投稿
  • 相關(guān)推薦

思科最實(shí)用的技術(shù)命令大全

  本文為大家分享的是CISCO Trouble Shooting的實(shí)用命令,希望能幫助到大家!

  一、故障處理命令

  1、show命令:

  1) 全局命令:

  show version ;顯示系統(tǒng)硬件和軟件版本、DRAM、Flash

  show startup-config ;顯示寫入NVRAM中的配置內(nèi)容

  show running-config ;顯示當(dāng)前運(yùn)行的配置內(nèi)容

  show buffers ;詳細(xì)輸出buffer的名稱和尺寸

  show stacks ;提供路由器進(jìn)程和處理器利用率信息, 用stack decode

  show tech-support ;顯示幾個(gè)show命令的輸出

  show access-lists ;查看訪問列表配置

  show memory ;用于測試內(nèi)存問題

  2) 接口相關(guān)命令

  show queueing [fair|priority|custom]

  show queue e0/1 ;查看接口上隊(duì)列的設(shè)置和操作

  show interface e0/1 ;Cisco缺省的Ethernet封裝方法是ARPA

  show ip interface e0/1 ;顯示指定接口的TCP/IP配置信息

  3) 進(jìn)程相關(guān)命令

  show processes cpu ;顯示路由器CPU的使用率和當(dāng)前的進(jìn)程

  show processes memory ;顯示路由器當(dāng)前進(jìn)程的內(nèi)存使用情況

  4) TCP/IP協(xié)議相關(guān)命令

  Show ip access-list ;顯示IP訪問列表(1-199)

  Show ip arp ;顯示路由器的ARP緩存(IP、MAC、封裝類型、接口)

  Show ip protocols ;顯示運(yùn)行在路由器上的IP路由協(xié)議的信息

  Show ip route ;顯示IP路由表中的信息

  Show ip traffic ;顯示IP流量統(tǒng)計(jì)信息

  2、debug命令

  DEBUG不應(yīng)在CPU使用率超過50%的路由器上運(yùn)行。

  1) 限制debug輸出

  在使用DEBUG獲得所需數(shù)據(jù)后,要關(guān)閉Debug

  使路由器對(duì)所有消息都配置使用時(shí)間戳:

  Router#service timestamps debug datetime msec localtime

  Router#service timestamp log datetime msec localtime

  缺省,error和debug信息僅發(fā)送到console,telnet到路由器上看不到debug和log的信息。想在telnet中看到debug和log信息:

  Router#terminal monitor

  Router#terminal monitor ;關(guān)閉信息輸出

  Router#undebug all ;關(guān)閉debug進(jìn)程及所有相關(guān)信息的輸出

  可以應(yīng)用ACL到debug以限定僅輸出要求的debug信息。

  如僅查看從10.0.1.1到10.1.1.1的ICMP包:

  Router(config)#access-list 101 permit icmp host 10.0.1.1 host 10.1.1.1

  Router#debug ip packet detail 101

  2) 全局debug命令:

  3) 接口debug

  4) 協(xié)議debug

  5) IP debug

  debug ip packets

  3、logging命令

  輸出error和其它信息到console、terminal、路由器內(nèi)部buffer或一臺(tái)syslog服務(wù)器:

  Router>show logging

  Cisco路由器有8種可能的logging級(jí):0-7

  Logging級(jí)別 名稱 描述

  1 Emergencies 系統(tǒng)不能用的信息

  2 Alerts 直接行動(dòng)

  3 Critical 緊急情形

  4 Errors 錯(cuò)誤信息

  5 Warnings 警告信息

  6 Notifications 正常但重要的情形

  7 Informational 信息

  8 Debugging 調(diào)試

  缺省地,console、monitor、buffer的logging被設(shè)置為debugging級(jí),而trap(syslog)服務(wù)器的logging被設(shè)置為informational。

  4、執(zhí)行路由核心復(fù)制

  core dump包含一份當(dāng)前系統(tǒng)內(nèi)存中信息的精確拷貝。捕捉包含在內(nèi)存中信息的方法有:

  1) 配置路由器在崩潰時(shí)執(zhí)行Core Dump,存儲(chǔ)到TFTP、FTP、RCP服務(wù)器:

  對(duì)TFTP協(xié)議,只需指定TFTP服務(wù)器IP,不需要任何附加的配置:

  Router(config)#exception dump 192.168.1.1 ;TFTP服務(wù)器的IP地址

  對(duì)FTP協(xié)議的配置:

  Router(config)#exception dump 192.168.1.1 ;FTP服務(wù)器的IP地址

  Router(config)#ip ftp username Kevin

  Router(config)#ip ftp password aloha

  Router(config)#ip ftp source-interface e0

  Router(config)#exception protocol ftp

  對(duì)RCP協(xié)議的配置:

  Router(config)#exception protocol rcp

  Router(config)#exception dump 192.168.1.1 ;RCP服務(wù)器的IP地址

  Router(config)#ip rcmd remote-username Kevin

  Router(config)#ip rcmd rcp-enable

  Router(config)#ip rcmd rsh-enable

  Router(config)#ip rcmd remote-host Kevin 192.168.1.1 kevin ;

  2) 在系統(tǒng)沒有崩潰的情況下,執(zhí)行Core Dump命令。

  Router#write core

  Core Dump僅在Cisco工程師測試和解決路由器問題時(shí)有用。

  5、ping命令

  ping用于測試整個(gè)網(wǎng)絡(luò)可達(dá)性和連通性?稍谟脩鬍XEC模式和特權(quán)EXEC模式下使用。

  IP的ping使用ICMP協(xié)議提供連通性和可能性信息,缺省只發(fā)送5個(gè)echo信息。

  擴(kuò)展Ping的選項(xiàng)有:源IP地址;服務(wù)類型;數(shù)據(jù);包頭選項(xiàng)。

  Ping的響應(yīng)字符集

  字符 解釋 字符 解釋

  ! Received an echo-reply message Q Source quench

  . Timeout M Unable to fragment

  U/H Destination unreachable A Administratively denied

  N Network unreachable ? Unknown packet-type

  P Protocol unreachable

  6、traceroute命令

  traceroute用于顯示到達(dá)目標(biāo)的包路徑?稍谟脩裟J胶吞貦(quán)模式下使用。

  Traceroute的響應(yīng):

  字符 解釋 字符 解釋

  Xx msec The RTT for each packet * Timeout

  H Host unreachable U Port unreachable

  N Network unreachable P Protocol unreachable

  A Administratively denied Q Source quench

  ? Unknown packet type

  二、LAN連接問題

  1、獲得IP地址

  主機(jī)可以動(dòng)態(tài)或靜態(tài)獲得IP地址。

  1) DHCP:DHCP比BootP多了地址池和租期。

  2) BootP:

  3) Helper Addresses:指定集中放置的DHCP服務(wù)器的IP地址

  Ip helperaddress ip-address ;

  No ip forward-protocol udp 137 ;

  4) 路由器上的DHCP服務(wù):配置路由器為一臺(tái)DHCP服務(wù)器

  5) DHCP和BootP故障處理

  Show dhcp server ;

  Show dhcp lease ;

  2、ARP

  ARP映射第2層MAC地址到第3層地址。

  Show arp ;顯示路由器的ARP表

  Debug arp ;

  1) ARP代理:缺省Cisco路由器的ARP代理是啟用的

  在下列情況下,CISCO路由器將用自身的MAC地址響應(yīng)ARP請(qǐng)求:

  ? 接收到ARP的接口上的Proxy ARP是啟用的;

  ? ARP請(qǐng)求的地址不在本地子網(wǎng);

  ? 路由器的路由表中包含ARP請(qǐng)求地址的子網(wǎng);

  3、TCP連接示例

  三、IP訪問列表

  1、標(biāo)準(zhǔn)ACL:基于IP包的源IP地址允許或禁用

  2、擴(kuò)展ACL:提供源地址、目標(biāo)地址、端口號(hào)、會(huì)話層協(xié)議進(jìn)行過濾。

  3、命名ACL:可以是標(biāo)準(zhǔn)ACL,也可以是擴(kuò)展ACL。

  命名ACL與編號(hào)ACL的區(qū)別:命名ACL有一個(gè)邏輯名,可以刪除命名ACL中單獨(dú)一行。

  Ip access-list extended Example-Named-ACL

  Deny tcp any any eq echo

  Deny tcp any any eq 37

  Permit udp host 172.16.10.2 any eq snmp

  Permit tcp any any

  第6章 TCP/IP路由協(xié)議故障處理

  一、缺省網(wǎng)關(guān)

  當(dāng)包的目的地址不在路由器的路由表中,如路由器配置了缺省網(wǎng)關(guān),則轉(zhuǎn)發(fā)到缺省網(wǎng)關(guān),否則就丟棄。

  Show ip route ;查看Cisco路由器的缺省網(wǎng)關(guān)

  二、靜態(tài)和動(dòng)態(tài)路由

  三、處理k_protocal/04937.htm" target="_blank">RIP故障

  RIP是距離矢量路由協(xié)議,度量值是跳數(shù)。RIP最大跳數(shù)為15,如果到目標(biāo)的跳數(shù)超過15,則為不可達(dá)。

  RIP V1是有類別路由協(xié)議,RIP V2是非分類路由協(xié)議,支持CIDR、路由歸納、VLSM,使用多播(224.0.0.9)發(fā)送路由更新。

  RIP相關(guān)的show命令:

  Show ip route rip ;僅顯示RIP路由表

  Show ip route ;顯示所有IP路由表

  Show ip interface ;顯示IP接口配置

  Show running-config

  Debug ip rip events ;

  常見的RIP故障:RIP版本不一致、RIP使用UDP廣播更新

  四、處理IGRP故障

  IGRP是Cisco專用路由協(xié)議,距離矢量協(xié)議。IGRP的度量值可以基于五個(gè)要素:帶寬、延時(shí)、負(fù)載、可靠性、MTU,缺省只使用帶寬和延時(shí)。

  IGRP相關(guān)的show命令:

  Show ip route igrp ;顯示IGRP路由表

  Debug ip igrp events ;

  Debug ip igrp transactions ;

  常見的IGRP故障:訪問列表、不正確的配置、到相鄰路由器的line down

  五、處理EIGRP故障

  EIGRP是鏈路狀態(tài)協(xié)議和距離矢量混合協(xié)議,是CISCO專用路由協(xié)議。EIGRP使用多播地址224.0.0.10發(fā)送路由更新,使用DUAL算法計(jì)算路由。EIGRP的度量值可以基于帶寬、延時(shí)、負(fù)載、可靠性、MTU,缺省僅使用帶寬和延時(shí)。

  EIGRP使用3種數(shù)據(jù)庫:路由數(shù)據(jù)庫、拓?fù)鋽?shù)據(jù)庫、相鄰路由器數(shù)據(jù)庫。

  EIGRP相關(guān)的show命令:

  Show running-config

  Show ip route

  Show ip route eigrp ;僅顯示EIGRP路由

  Show ip eigrp interface ;顯示該接口的對(duì)等體信息

  Show ip eigrp neighbors ;顯示所有的EIGRP鄰居及其信息

  Show ip eigrp topology ;顯示EIGRP拓?fù)浣Y(jié)構(gòu)表的內(nèi)容

  Show ip eigrp traffic ;顯示EIGRP路由統(tǒng)計(jì)的歸納

  Show ip eigrp events ;顯示最近的EIGRP協(xié)議事件記錄

  EIGRP相關(guān)的debug命令:

  Debug ip eigrp as號(hào)

  Debug ip eigrp neighbor

  Debug ip eigrp notifications

  Debug ip eigrp summary

  Debug ip eigrp

  常見的EIGRP故障:相鄰關(guān)系、缺省網(wǎng)關(guān)等的丟失、老版本IOS的路由、stuck in active。

  處理EIGRP故障時(shí),先用show ip eigrp neighbors查看所有相鄰路由器,然后再用show ip route gigrp查看路由器的路由表,再用show ip eigrp topology查看路由器的拓?fù)浣Y(jié)構(gòu)表,也可用show ip eigrp traffic查看路由更新是否被發(fā)送。

  六、處理OSPF故障

  OSPF是鏈路狀態(tài)協(xié)議,維護(hù)3個(gè)數(shù)據(jù)庫:相鄰數(shù)據(jù)庫、拓?fù)浣Y(jié)構(gòu)數(shù)據(jù)庫、路由表。

  OSPF相關(guān)的show命令:

  Show running-config

  Show ip route

  Show ip route ospf ;僅顯示OSPF路由

  Show ip ospf process-id ;顯示與特定進(jìn)程ID相關(guān)的信息

  Show ip ospf ;顯示OSPF相關(guān)信息

  Show ip ospf border-routers ;顯示邊界路由器

  Show ip ospf database ;顯示OSPF的歸納數(shù)據(jù)庫

  Show ip ospf interface ;顯示指定接口上的OSPF信息

  Show ip ospf neighbor ;顯示OSPF相鄰信息

  Show ip ospf request-list ;顯示鏈路狀態(tài)請(qǐng)求列表

  Show ip ospf summary-address ;顯示歸納路由的再發(fā)布信息

  Show ip ospf virtual-links ;顯示虛擬鏈路信息

  Show ip interface ;顯示接口的IP設(shè)置

  OSPF相關(guān)的debug命令:

  Debug ip ospf adj ;

  Debug ip ospf events

  Debug ip ospf flood

  Debug ip ospf lsa-generation

  Debug ip ospf packet

  Debug ip ospf retransmission

  Debug ip ospf spf

  Debug ip ospf tree

  常見的OSPF故障:OSPF的每個(gè)area不超過100臺(tái)路由器,整個(gè)網(wǎng)絡(luò)不超過700臺(tái)路由器;通配符掩碼配置不當(dāng);

  七、處理BGP故障

  BGP(包括IBGP和EBGP)的關(guān)鍵配置是鄰居關(guān)系,BGP使用TCP建立相鄰關(guān)系。

  BGP相關(guān)的show命令:

  Show ip bgp ;顯示BGP所學(xué)習(xí)到的路由

  Show ip bgp network ;顯示特定網(wǎng)絡(luò)的BGP信息

  Show ip neighbors ;顯示BGP鄰居信息

  Show ip bgp peer-group ;顯示BGP對(duì)待組信息

  Show ip bgp summary ;顯示所有BGP連接的歸納

  Show ip route bgp ;顯示BGP路由表

  BGP相關(guān)的debug命令:

  Debug ip bgp 192.1.1.1 updates

  Debug ip bgp dampening

  Debug ip bgp events

  Debug ip bgp keepalives

  Debug ip bgp updates

  典型的BGP故障:

  八、再發(fā)布路由協(xié)議

  九、TCP/IP癥狀和原因

  癥狀 原因

  本地主機(jī)不能與遠(yuǎn)程主機(jī)通訊 1) DNS工作不正常2) 沒有到遠(yuǎn)程主機(jī)的路由3) 缺少缺省網(wǎng)關(guān)4) 管理拒絕(ACL)

  某個(gè)應(yīng)用程序不能正常工作 1) 管理拒絕(ACL)2) 網(wǎng)絡(luò)沒有正常配置以處理該應(yīng)用程序

  啟動(dòng)失敗 1) BootP服務(wù)器沒有MAC地址的實(shí)體2) 缺少IP helper-address3) ACL4) 修改NIC或MAC地址5) 重復(fù)的IP地址6) 不正常的IP配置

  不能ping遠(yuǎn)程主機(jī) 1) ACL2) 沒有到遠(yuǎn)程主機(jī)的路由3) 沒有設(shè)置缺省網(wǎng)關(guān)4) 遠(yuǎn)程主機(jī)down

  缺少路由 1) 沒有正確配置路由協(xié)議2) 發(fā)布列表3) 被動(dòng)接口4) 沒有通告路由的鄰居5) 路由協(xié)議版本不一致6) 鄰居關(guān)系沒有建立

  相鄰關(guān)系沒有建立 1) 不正確的路由協(xié)議配置2) 不正確的IP配置3) 沒有配置network或neighbor語句4) hello間隔不一致5) 不一致的area ID

  高的CPU利用率 1) 不穩(wěn)定的路由更新2) 沒有關(guān)閉debug3) 進(jìn)程過重

  路由觸發(fā)活躍模式 1) 不一致的間隔2) 硬件問題3) 不穩(wěn)定的鏈路

  十、TCP/IP癥狀和行動(dòng)計(jì)劃

  問題 行動(dòng)計(jì)劃

  DNS工作不正常 1)配置DNS主機(jī)的配置和DNS服務(wù)器,可以使用nslookup校驗(yàn)DNS服務(wù)器的工作

  沒有到遠(yuǎn)程主機(jī)的路由 1) 用ipconfig /all檢查缺省網(wǎng)關(guān)2) 用show ip route查看是否相應(yīng)路由3) 如果沒有該路由,用show ip route查看是否有缺省網(wǎng)關(guān)4) 如有網(wǎng)關(guān),檢查到目標(biāo)的下一跳;如無網(wǎng)關(guān),修正問題

  ACL 有分離的問題與ACL相關(guān),必須分析ACL、或重寫ACL并應(yīng)用。

  網(wǎng)絡(luò)沒有配置以處理應(yīng)用程序 查看路由器配置

  Booting失敗 1) 查看DHCP或BootP服務(wù)器,并查看是否存在故障機(jī)的MAC實(shí)體2) 使用debug ip udp校驗(yàn)從主機(jī)接收的包3) 校驗(yàn)helper-address正確配置4) 查看ACL是否禁用包

  缺少路由 1) 在第1臺(tái)路由器上用show ip route查看所學(xué)到的路由2)校驗(yàn)相鄰路由器3)有正確的路由network和neighbor語句4) 對(duì)OSPF,校驗(yàn)通配符掩碼5) 檢查應(yīng)用到接口上的distribute list6)驗(yàn)證鄰居的IP配置7) 如果路由被再發(fā)布,驗(yàn)證度量值8) 驗(yàn)證路由被正常的再發(fā)布

  沒有構(gòu)成相鄰關(guān)系 1) 用show ip protocol neighbors列表已構(gòu)成的相鄰關(guān)系2) 查看沒有構(gòu)成相鄰關(guān)系的協(xié)議配置3)檢查路由配置中的network語句4)用show ip protocol/interface查看特定的接口信息,如Hello間隔

  【實(shí)用技術(shù)命令】

  5. Cisco765M通過ISDN撥號(hào)上263

  由于Cisco765的設(shè)置命令與我們常用的Cisco路由器的命令不同,所以以下列舉了通過Cisco765上263訪問Internet的具體命令行設(shè)置步驟。

  >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

  命令描述如下:

  任務(wù) 命令

  設(shè)置路由器系統(tǒng)名稱 set system c765

  允許路由器呼叫多個(gè)目的地 set multidestination on

  設(shè)置ISDN交換機(jī)類型為NET3 set switch net3

  允許點(diǎn)到點(diǎn)間多條通道連接實(shí)現(xiàn)負(fù)載均衡 set ppp multilink on

  關(guān)掉橋接 set briding off

  建立用戶預(yù)制文件用于設(shè)置撥號(hào)連接參數(shù)- 可以設(shè)置多個(gè)用戶預(yù)制文件用于相同的物理端口對(duì)應(yīng)于不同的連接。 set user remotenet

  使用PPP/IPCP set ip framing none

  設(shè)置上網(wǎng)用戶帳號(hào) set ppp clientname 263

  設(shè)置上網(wǎng)口令 set ppp password client Enter new Password: 263 Re-Type new Password: 263

  不用PPP/CHAP或PAP做認(rèn)證 set ppp authentication out none

  允許地址磋商 set ppp address negotiation local on

  設(shè)置地址翻譯 set ip pat on

  設(shè)置默認(rèn)路由 set ip route destination 0.0.0.0/0 gateway 0.0.0.0

  設(shè)置ISP的電話號(hào)碼 set number 2633

  激活用戶預(yù)制文件 set active

  返回目錄

  六、PSTN

  電話網(wǎng)絡(luò)(PSTN)是目前普及程度最高、成本最低的公用通訊網(wǎng)絡(luò),它在網(wǎng)絡(luò)互連中也有廣泛的應(yīng)用。電話網(wǎng)絡(luò)的應(yīng)用一般可分為兩種類型,一種是同等級(jí)別機(jī)構(gòu)之間以按需撥號(hào)(DDR)的方式實(shí)現(xiàn)互連,一種是ISP為撥號(hào)上網(wǎng)為用戶提供的遠(yuǎn)程訪問服務(wù)的功能。

  1. 遠(yuǎn)程訪問

  1.1.Access Server基本設(shè)置:

  選用Cisco2511作為訪問服務(wù)器,采用IP地址池動(dòng)態(tài)分配地址.遠(yuǎn)程工作站使用WIN95撥號(hào)網(wǎng)絡(luò)實(shí)現(xiàn)連接。

  全局設(shè)置:

  任務(wù) 命令

  設(shè)置用戶名和密碼 username username password password

  設(shè)置用戶的IP地址池 ip local pool {default | pool-name low-ip-address [high-ip-address]}

  指定地址池的工作方式 ip address-pool [dhcp-proxy-client | local]

  基本接口設(shè)置命令:

  任務(wù) 命令

  設(shè)置封裝形式為PPP encapsulation ppp

  啟動(dòng)異步口的路由功能 async default routing

  設(shè)置異步口的PPP工作方式 async mode {dedicated | interactive}

  設(shè)置用戶的IP地址 peer default ip address {ip-address | dhcp | pool [pool-name]}

  設(shè)置IP地址與Ethernet0相同 ip unnumbered ethernet0

  line撥號(hào)線設(shè)置:

  任務(wù) 命令

  設(shè)置modem的工作方式 modem {inout|dialin}

  自動(dòng)配置modem類型 modem autoconfig discovery

  設(shè)置撥號(hào)線的通訊速率 speed speed

  設(shè)置通訊線路的流控方式 flowcontrol {none | software [lock] [in | out] | hardware [in | out]}

  連通后自動(dòng)執(zhí)行命令 autocommand command

  訪問服務(wù)器設(shè)置如下:

  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

  相關(guān)調(diào)試命令:

  show interface

  show line

  1.2. Access Server通過Tacacs服務(wù)器實(shí)現(xiàn)安全認(rèn)證:

  使用一臺(tái)WINDOWS NT服務(wù)器作為Tacacs服務(wù)器,地址為10.111.4.2,運(yùn)行Cisco2511隨機(jī)帶的Easy ACS 1.0軟件實(shí)現(xiàn)用戶認(rèn)證功能.

  相關(guān)設(shè)置:

  任務(wù) 命令

  激活A(yù)AA訪問控制 aaa new-model

  用戶登錄時(shí)默認(rèn)起用Tacacs+做AAA認(rèn)證 aaa authentication login default tacacs+

  列表名為no_tacacs使用ENABLE口令做認(rèn)證 aaa authentication login no_tacacs enable

  在運(yùn)行PPP的串行線上采用Tacacs+做認(rèn)證 aaa authentication ppp default tacacs+

  由TACACS+服務(wù)器授權(quán)運(yùn)行EXEC aaa authorization exec tacacs+

  由TACACS+服務(wù)器授權(quán)與網(wǎng)絡(luò)相關(guān)的服務(wù)請(qǐng)求。 aaa authorization network tacacs+

  為EXEC會(huì)話運(yùn)行記帳.進(jìn)程開始和結(jié)束時(shí)發(fā)通告給TACACS+服務(wù)器。 aaa accounting exec start-stop tacacs+

  為與網(wǎng)絡(luò)相關(guān)的服務(wù)需求運(yùn)行記帳包括SLIP,PPP,PPP NCPs,ARAP等.在進(jìn)程開始和結(jié)束時(shí)發(fā)通告給TACACS+服務(wù)器。 aaa accounting network start-stop tacacs+

  指定Tacacs服務(wù)器地址 tacacs-server host 10.111.4.2

  在Tacacs+服務(wù)器和訪問服務(wù)器設(shè)定共享的關(guān)鍵字,訪問服務(wù)器和Tacacs+服務(wù)器使用這個(gè)關(guān)鍵字去加密口令和響應(yīng)信息。這里使用tac作為關(guān)鍵字。 tacacs-server key tac

  訪問服務(wù)器設(shè)置如下:

  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)實(shí)例

  此例通過Cisco 2500系列路由器的aux端口實(shí)現(xiàn)異步撥號(hào)DDR連接。Router1撥號(hào)連接到Router2。其中采用PPP/CHAP做安全認(rèn)證,在Router1中應(yīng)建立一個(gè)用戶,以對(duì)端路由器主機(jī)名作為用戶名,即用戶名應(yīng)為Router2。同時(shí)在Router2中應(yīng)建立一個(gè)用戶,以對(duì)端路由器主機(jī)名作為用戶名,即用戶名應(yīng)為Router1。所建的這兩用戶的password必須相同。

  相關(guān)命令如下:

  任務(wù) 命令

  設(shè)置路由器與modem的接口指令 chat-script script-name EXPECT SEND EXPECT SEND (etc.)

  設(shè)置端口在掛斷前的等待時(shí)間 dialer idle-timeout seconds

  設(shè)置協(xié)議地址與電話號(hào)碼的映射 dialer map protocol next-hop-address [name hostname] [broadcast] [modem-script modem-regexp] [system-script system-regexp] [dial-string]

  設(shè)置電話號(hào)碼 dialer string dial-string

  指定在特定線路下路由器默認(rèn) 使用的chat-script script {dialer|reset} 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

  !

  相關(guān)調(diào)試命令:

  debug dialer

  debug ppp authentication

  debug ppp error

  debug ppp negotiation

  debug ppp packet

  show dialer

  3. 異步撥號(hào)備份DDN專線:

  此例主連接采用DDN專線,備份線路為電話撥號(hào)。當(dāng)DDN專線連接正常時(shí),主端口S0狀態(tài)為up,line protocol亦為up,則備份線路狀態(tài)為standby,line protocol為down,此時(shí)所有通信均通過主接口進(jìn)行。當(dāng)主接口連接發(fā)生故障時(shí),端口狀態(tài)為down,則激活備份接口,完成數(shù)據(jù)通信。此方法不適合為X.25做備份。因?yàn),配置封裝為X.25的接口只要和X.25交換機(jī)之間的連接正常其接口及l(fā)ine protocol的狀態(tài)亦為 up,它并不考慮其它地方需與之通信的路由器的狀態(tài)如何,所以若本地路由器狀態(tài)正常,而對(duì)方路由器連接即使發(fā)生故障,本地也不會(huì)激活備份線路。例4將會(huì)描述如何為X.25做撥號(hào)備份。

  以下是相關(guān)命令:

  任務(wù) 命令

  指定主線路改變后,次線路狀態(tài)發(fā)生改變的延遲時(shí)間 backup delay {enable-delay | never} {disable-delay | never}

  指定一個(gè)接口作為備份接口 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. 異步撥號(hào)備份X.25:

  設(shè)置X.25的撥號(hào)備份,首先X.25連接的端口必須運(yùn)行動(dòng)態(tài)路由協(xié)議,異步撥號(hào)口必須使用靜態(tài)路由.本例選擇EIGRP作為路由選擇協(xié)議,將靜態(tài)路由的Metric的值設(shè)置為200,由于EIGRP的默認(rèn)Metric為90,所以當(dāng)同時(shí)有兩條路徑通往同一網(wǎng)段時(shí),其中Metric值小的路徑生效,而當(dāng)X.25連接出現(xiàn)問題時(shí),路由器無法通過路由協(xié)議學(xué)習(xí)到路由表,則此時(shí)靜態(tài)路由生效,訪問通過撥號(hào)端口實(shí)現(xiàn)。當(dāng)X.25連接恢復(fù)正常時(shí),路由器又可以學(xué)習(xí)到路由表,則由于 Metric值的不同,靜態(tài)路由自動(dòng)被動(dòng)態(tài)路由所代替,這樣就實(shí)現(xiàn)了備份的功能。

  路由器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

  路由協(xié)議:

  一、RIP協(xié)議

  RIP(Routing information Protocol)是應(yīng)用較早、使用較普遍的內(nèi)部網(wǎng)關(guān)協(xié)議(Interior Gateway Protocol,簡稱IGP),適用于小型同類網(wǎng)絡(luò),是典型的距離向量(distance-vector)協(xié)議。文檔見RFC1058、RFC1723。

  RIP通過廣播UDP報(bào)文來交換路由信息,每30秒發(fā)送一次路由信息更新。RIP提供跳躍計(jì)數(shù)(hop count)作為尺度來衡量路由距離,跳躍計(jì)數(shù)是一個(gè)包到達(dá)目標(biāo)所必須經(jīng)過的路由器的數(shù)目。如果到相同目標(biāo)有二個(gè)不等速或不同帶寬的路由器,但跳躍計(jì)數(shù)相同,則RIP認(rèn)為兩個(gè)路由是等距離的。RIP最多支持的跳數(shù)為15,即在源和目的網(wǎng)間所要經(jīng)過的最多路由器的數(shù)目為15,跳數(shù)16表示不可達(dá)。

  1. 有關(guān)命令

  任務(wù) 命令

  指定使用RIP協(xié)議 router rip

  指定RIP版本 version {1|2}1

  指定與該路由器相連的網(wǎng)絡(luò) network network

  注:1.Cisco的RIP版本2支持驗(yàn)證、密鑰管理、路由匯總、無類域間路由(CIDR)和變長子網(wǎng)掩碼(VLSMs)

  2. 舉例

  Router1:

  router rip

  version 2

  network 192.200.10.0

  network 192.20.10.0

  !

  相關(guān)調(diào)試命令:

  show ip protocol

  show ip route

  返回目錄

  二、IGRP協(xié)議

  IGRP (Interior Gateway Routing Protocol)是一種動(dòng)態(tài)距離向量路由協(xié)議,它由Cisco公司八十年代中期設(shè)計(jì)。使用組合用戶配置尺度,包括延遲、帶寬、可靠性和負(fù)載。

  缺省情況下,IGRP每90秒發(fā)送一次路由更新廣播,在3個(gè)更新周期內(nèi)(即270秒),沒有從路由中的第一個(gè)路由器接收到更新,則宣布路由不可訪問。在7個(gè)更新周期即630秒后,Cisco IOS 軟件從路由表中清除路由。

  1. 有關(guān)命令

  任務(wù) 命令

  指定使用RIP協(xié)議 router igrp autonomous-system1

  指定與該路由器相連的網(wǎng)絡(luò) network network

  指定與該路由器相鄰的節(jié)點(diǎn)地址 neighbor ip-address

  注:1、autonomous-system可以隨意建立,并非實(shí)際意義上的autonomous-system,但運(yùn)行IGRP的路由器要想交換路由更新信息其autonomous-system需相同。

  2.舉例

  Router1:

  router igrp 200

  network 192.200.10.0

  network 192.20.10.0

  !

  三、OSPF協(xié)議

  OSPF(Open Shortest Path First)是一個(gè)內(nèi)部網(wǎng)關(guān)協(xié)議(Interior Gateway Protocol,簡稱IGP),用于在單一自治系統(tǒng)(autonomous system,AS)內(nèi)決策路由。與RIP相對(duì),OSPF是鏈路狀態(tài)路有協(xié)議,而RIP是距離向量路由協(xié)議。

  鏈路是路由器接口的另一種說法,因此OSPF也稱為接口狀態(tài)路由協(xié)議。OSPF通過路由器之間通告網(wǎng)絡(luò)接口的狀態(tài)來建立鏈路狀態(tài)數(shù)據(jù)庫,生成最短路徑樹,每個(gè)OSPF路由器使用這些最短路徑構(gòu)造路由表。

  文檔見RFC2178。

  1.有關(guān)命令

  全局設(shè)置

  任務(wù) 命令

  指定使用OSPF協(xié)議 router ospf process-id1

  指定與該路由器相連的網(wǎng)絡(luò) network address wildcard-mask area area-id2

  指定與該路由器相鄰的節(jié)點(diǎn)地址 neighbor ip-address

  注:1、OSPF路由進(jìn)程process-id必須指定范圍在1-65535,多個(gè)OSPF進(jìn)程可以在同一個(gè)路由器上配置,但最好不這樣做。多個(gè)OSPF進(jìn)程需要多個(gè)OSPF數(shù)據(jù)庫的副本,必須運(yùn)行多個(gè)最短路徑算法的副本。process-id只在路由器內(nèi)部起作用,不同路由器的process-id可以不同。

  2、wildcard-mask 是子網(wǎng)掩碼的反碼, 網(wǎng)絡(luò)區(qū)域ID area-id在0-4294967295內(nèi)的十進(jìn)制數(shù),也可以是帶有IP地址格式的x.x.x.x。當(dāng)網(wǎng)絡(luò)區(qū)域ID為0或0.0.0.0時(shí)為主干域。不同網(wǎng)絡(luò)區(qū)域的路由器通過主干域?qū)W習(xí)路由信息。

  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

  !

  相關(guān)調(diào)試命令:

  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. 使用身份驗(yàn)證

  為了安全的原因,我們可以在相同OSPF區(qū)域的路由器上啟用身份驗(yàn)證的功能,只有經(jīng)過身份驗(yàn)證的同一區(qū)域的路由器才能互相通告路由信息。

  在默認(rèn)情況下OSPF不使用區(qū)域驗(yàn)證。通過兩種方法可啟用身份驗(yàn)證功能,純文本身份驗(yàn)證和消息摘要(md5)身份驗(yàn)證。純文本身份驗(yàn)證傳送的身份驗(yàn)證口令為純文本,它會(huì)被網(wǎng)絡(luò)探測器確定,所以不安全,不建議使用。而消息摘要(md5)身份驗(yàn)證在傳輸身份驗(yàn)證口令前,要對(duì)口令進(jìn)行加密,所以一般建議使用此種方法進(jìn)行身份驗(yàn)證。

  使用身份驗(yàn)證時(shí),區(qū)域內(nèi)所有的路由器接口必須使用相同的身份驗(yàn)證方法。為起用身份驗(yàn)證,必須在路由器接口配置模式下,為區(qū)域的每個(gè)路由器接口配置口令。

  任務(wù) 命令

  指定身份驗(yàn)證 area area-id authentication [message-digest]

  使用純文本身份驗(yàn)證 ip ospf authentication-key password

  使用消息摘要(md5)身份驗(yàn)證 ip ospf message-digest-key keyid md5 key

  以下列舉兩種驗(yàn)證設(shè)置的示例,示例的網(wǎng)絡(luò)分布及地址分配環(huán)境與以上基本配置舉例相同,只是在Router1和Router2的區(qū)域0上使用了身份驗(yàn)證的功能。:

  例1.使用純文本身份驗(yàn)證

  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)身份驗(yàn)證:

  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

  !

  相關(guān)調(diào)試命令:

  debug ip ospf adj

  debug ip ospf events

  返回目錄

  四、重新分配路由

  在實(shí)際工作中,我們會(huì)遇到使用多個(gè)IP路由協(xié)議的網(wǎng)絡(luò)。為了使整個(gè)網(wǎng)絡(luò)正常地工作,必須在多個(gè)路由協(xié)議之間進(jìn)行成功的路由再分配。

  以下列舉了OSPF與RIP之間重新分配路由的設(shè)置范例:

  Router1的Serial 0端口和Router2的Serial 0端口運(yùn)行OSPF,在Router1的Ethernet 0端口運(yùn)行RIP 2,Router3運(yùn)行RIP2,Router2有指向Router4的192.168.2.0/24網(wǎng)的靜態(tài)路由,Router4使用默認(rèn)靜態(tài)路由。需要在Router1和Router3之間重新分配OSPF和RIP路由,在Router2上重新分配靜態(tài)路由和直連的路由。

  范例所涉及的命令

  任務(wù) 命令

  重新分配直連的路由 redistribute connected

  重新分配靜態(tài)路由 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協(xié)議設(shè)置

  IPX協(xié)議與IP協(xié)議是兩種不同的網(wǎng)絡(luò)層協(xié)議,它們的路由協(xié)議也不一樣,IPX的路由協(xié)議不象IP的路由協(xié)議那樣豐富,所以設(shè)置起來比較簡單。但I(xiàn)PX協(xié)議在以太網(wǎng)上運(yùn)行時(shí)必須指定封裝形式。

  1. 有關(guān)命令

  啟動(dòng)IPX路由 ipx routing

  設(shè)置IPX網(wǎng)絡(luò)及以太網(wǎng)封裝形式 ipx network network [encapsulation encapsulation-type]1

  指定路由協(xié)議,默認(rèn)為RIP ipx router {eigrp autonomous-system-number | nlsp [tag] | rip}

  注:1.network 范圍是1 到FFFFFFFD.

  IPX封裝類型列表

  接口類型 封裝類型 IPX幀類型

  Ethernet novell-ether (默認(rèn)) arpa sap snap Ethernet_802.3 Ethernet_II Ethernet_802.2 Ethernet_Snap

  Token Ring sap (默認(rèn)) snap Token-Ring Token-Ring_Snap

  FDDI snap (默認(rèn)) sap novell-fddi Fddi_Snap Fddi_802.2 Fddi_Raw

  舉例:

  在此例中,WAN的IPX網(wǎng)絡(luò)為3a00,Router1所連接的局域網(wǎng)IPX網(wǎng)絡(luò)號(hào)為2a00,在此局域網(wǎng)有一臺(tái)Novell服務(wù)器,IPX網(wǎng)絡(luò)號(hào)也是2a00, 路由器接口的IPX網(wǎng)絡(luò)號(hào)必須與在同一網(wǎng)絡(luò)的Novell服務(wù)器上設(shè)置的IPX網(wǎng)絡(luò)號(hào)相同。路由器通過監(jiān)聽SAP來建立已知的服務(wù)及自己的網(wǎng)絡(luò)地址表,并每60秒發(fā)送一次自己的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

  !

  相關(guān)調(diào)試命令:

  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協(xié)議設(shè)置

  IPX協(xié)議與IP協(xié)議是兩種不同的網(wǎng)絡(luò)層協(xié)議,它們的路由協(xié)議也不一樣,IPX的路由協(xié)議不象IP的路由協(xié)議那樣豐富,所以設(shè)置起來比較簡單。但I(xiàn)PX協(xié)議在以太網(wǎng)上運(yùn)行時(shí)必須指定封裝形式。

  1. 有關(guān)命令

  啟動(dòng)IPX路由 ipx routing

  設(shè)置IPX網(wǎng)絡(luò)及以太網(wǎng)封裝形式 ipx network network [encapsulation encapsulation-type]1

  指定路由協(xié)議,默認(rèn)為RIP ipx router {eigrp autonomous-system-number | nlsp [tag] | rip}

  注:1.network 范圍是1 到FFFFFFFD.

  IPX封裝類型列表

  接口類型 封裝類型 IPX幀類型

  Ethernet novell-ether (默認(rèn)) arpa sap snap Ethernet_802.3 Ethernet_II Ethernet_802.2 Ethernet_Snap

  Token Ring sap (默認(rèn)) snap Token-Ring Token-Ring_Snap

  FDDI snap (默認(rèn)) sap novell-fddi Fddi_Snap Fddi_802.2 Fddi_Raw

  舉例:

  在此例中,WAN的IPX網(wǎng)絡(luò)為3a00,Router1所連接的局域網(wǎng)IPX網(wǎng)絡(luò)號(hào)為2a00,在此局域網(wǎng)有一臺(tái)Novell服務(wù)器,IPX網(wǎng)絡(luò)號(hào)也是2a00, 路由器接口的IPX網(wǎng)絡(luò)號(hào)必須與在同一網(wǎng)絡(luò)的Novell服務(wù)器上設(shè)置的IPX網(wǎng)絡(luò)號(hào)相同。路由器通過監(jiān)聽SAP來建立已知的服務(wù)及自己的網(wǎng)絡(luò)地址表,并每60秒發(fā)送一次自己的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

  !

  相關(guān)調(diào)試命令:

  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、、、章 服務(wù)質(zhì)量及訪問控制

  一、協(xié)議優(yōu)先級(jí)設(shè)置

  1.有關(guān)命令

  任務(wù) 命令

  設(shè)置優(yōu)先級(jí)表項(xiàng)目 priority-list list-number protocol protocol {high | medium | normal | low} queue-keyword keyword-value

  使用指定的優(yōu)先級(jí)表 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

  返回目錄

  二、隊(duì)列定制

  1.有關(guān)命令

  任務(wù) 命令

  設(shè)置隊(duì)列表中包含協(xié)議 queue-list list-number protocol protocol-name queue-number queue-keyword keyword-value

  設(shè)置隊(duì)列表中隊(duì)列的大小 queue-list list-number queue queue-number byte-count byte-count-number

  使用指定的隊(duì)列表 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.有關(guān)命令

  任務(wù) 命令

  設(shè)置訪問表項(xiàng)目 access-list list {permit | deny} address mask

  設(shè)置隊(duì)列表中隊(duì)列的大小 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

  返回目錄

  虛擬局域網(wǎng)(VLAN)路由

  一、虛擬局域網(wǎng)(VLAN)

  當(dāng)前在我們構(gòu)造企業(yè)網(wǎng)絡(luò)時(shí)所采用的主干網(wǎng)絡(luò)技術(shù)一般都是基于交換和虛擬網(wǎng)絡(luò)的。交換技術(shù)將共享介質(zhì)改為獨(dú)占介質(zhì),大大提高網(wǎng)絡(luò)速度。虛擬網(wǎng)絡(luò)技術(shù)打破了地理環(huán)境的制約,在不改動(dòng)網(wǎng)絡(luò)物理連接的情況下可以任意將工作站在工作組或子網(wǎng)之間移動(dòng),工作站組成邏輯工作組或虛擬子網(wǎng),提高信息系統(tǒng)的運(yùn)作性能,均衡網(wǎng)絡(luò)數(shù)據(jù)流量,合理利用硬件及信息資源。同時(shí),利用虛擬網(wǎng)絡(luò)技術(shù),大大減輕了網(wǎng)絡(luò)管理和維護(hù)工作的負(fù)擔(dān),降低網(wǎng)絡(luò)維護(hù)費(fèi)用。隨著虛擬網(wǎng)絡(luò)技術(shù)的應(yīng)用,隨之必然產(chǎn)生了在虛擬網(wǎng)間如何通訊的問題.

  返回目錄

  二、交換機(jī)間鏈路(ISL)協(xié)議

  ISL(Interior Switching Link)協(xié)議用于實(shí)現(xiàn)交換機(jī)間的VLAN中繼。它是一個(gè)信息包標(biāo)記協(xié)議,在支持ISL接口上發(fā)送的幀由一個(gè)標(biāo)準(zhǔn)以太網(wǎng)幀及相關(guān)的VLAN信息組成。如下圖所示,在支持ISL的接口上可以傳送來自不同VLAN的數(shù)據(jù)。

  三、虛擬局域網(wǎng)(VLAN)路由實(shí)例

  3.1. 例一:

  設(shè)備選用Catalyst5500交換機(jī)1臺(tái),安裝WS-X5530-E3管理引擎,多塊WS-X5225R及WS-X5302路由交換模塊,WS-X5302被直接插入交換機(jī),通過二個(gè)通道與系統(tǒng)背板上的VLAN 相連,從用戶角度看認(rèn)為它是1個(gè)1接口的模塊,此接口支持ISL。在交換機(jī)內(nèi)劃有3個(gè)虛擬網(wǎng),分別名為default、qbw、rgw,通過WS-X5302實(shí)現(xiàn)虛擬網(wǎng)間路由。

  以下加重下橫線部分,如set system name 5500C為需設(shè)置的命令。

  設(shè)置如下:

  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路由模塊設(shè)置:

  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. 例二:

  交換設(shè)備仍選用Catalyst5500交換機(jī)1臺(tái),安裝WS-X5530-E3管理引擎,多塊WS-X5225R在交換機(jī)內(nèi)劃有3個(gè)虛擬網(wǎng),分別名為default、qbw、rgw,通過Cisco3640路由器實(shí)現(xiàn)虛擬網(wǎng)間路由。交換機(jī)設(shè)置與例一類似。

  路由器Cisco3640,配有一塊NM-1FE-TX模塊,此模塊帶有一個(gè)快速以太網(wǎng)接口可以支持ISL。Cisco3640快速以太網(wǎng)接口與交換機(jī)上的某一支持ISL的端口實(shí)現(xiàn)連接,如交換機(jī)第3槽第1個(gè)接口(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路由器口令恢復(fù)

  當(dāng)Cisco路由器的口令被錯(cuò)誤修改或忘記時(shí),可以按如下步驟進(jìn)行操作:

  1. 開機(jī)時(shí)按使進(jìn)入ROM監(jiān)控狀態(tài)

  2. 按o 命令讀取配置寄存器的原始值

  > o 一般值為0x2102

  3. 作如下設(shè)置,使忽略NVRAM引導(dǎo)

  >o/r0x**4* Cisco2500系列命令

  rommon 1 >confreg 0x**4* Cisco2600、1600系列命令

  一般正常值為0x2102

  4. 重新啟動(dòng)路由器

  >I

  rommon 2 >reset

  5. 在“Setup”模式,對(duì)所有問題回答No

  6. 進(jìn)入特權(quán)模式

  Router>enable

  7. 下載NVRAM

  Router>configure memory

  8. 恢復(fù)原始配置寄存器值并激活所有端口

  “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 terminal

  “hostname”(config)line console 0

  “hostname”(config-line)#login

  “hostname”(config-line)#password xxxxxxxxx

  “hostname”(config-line)#

  “hostname”(config-line)#write memory(copy running-config startup-config)

  2、IP地址分配

  地址類 網(wǎng)絡(luò)主機(jī) 網(wǎng)絡(luò)地址范圍 標(biāo)準(zhǔn)二進(jìn)制掩碼

  A N.H.H.H 1-126 1111 1111 0000 0000 0000 0000 0000 0000

  B N.N.H.H 128-191 1111 1111 1111 1111 0000 0000 0000 0000

  C N.N.N.H 192-223 1111 1111 1111 1111 1111 1111 0000 0000

  子網(wǎng)位個(gè)數(shù) 子網(wǎng)掩碼 子網(wǎng)數(shù) 主機(jī)數(shù)

  B類地址

  2 255.255.192.0 2 16382

  3 255.255.224.0 6 8198

  4 255.255.240.0 14 4894

  5 255.255.248.0 30 2846

  6 255.255.252.0 62 1822

  7 255.255.254.0 126 518

  8 255.255.255.0 254 254

  9 255.255.255.128 518 126

  10 255.255.255.192 1822 62

  11 255.255.255.224 2846 30

  12 255.255.255.240 4894 14

  13 255.255.255.248 8198 6

  14 255.255.255.252 16382 2

  C類地址

  2 255.255.255.192 2 62

  3 255.255.255.224 6 30

  4 255.255.255.240 14 14

  5 255.255.255.248 30 6

  6 255.255.255.252 62 2

【思科最技術(shù)命令】相關(guān)文章:

思科配置命令詳細(xì)介紹06-21

思科交換機(jī)常用的100個(gè)命令08-31

思科VLAN技術(shù)解析06-22

關(guān)于思科路由器的基本配置命令大全08-24

思科三層交換機(jī)配置命令大全08-14

思科、華為、H3C常用命令對(duì)比大全05-27

思科網(wǎng)絡(luò)技術(shù)學(xué)院概述06-02

Linux系統(tǒng)的10個(gè)最危險(xiǎn)命令06-17

思科認(rèn)證詳解和思科未來08-26