2960交換機(jī)簡要配置手冊中文_第1頁
2960交換機(jī)簡要配置手冊中文_第2頁
2960交換機(jī)簡要配置手冊中文_第3頁
2960交換機(jī)簡要配置手冊中文_第4頁
2960交換機(jī)簡要配置手冊中文_第5頁
已閱讀5頁,還剩20頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、2960交換機(jī)簡明配置維護(hù)手冊目錄說明錯誤!未定義書簽.產(chǎn)品特性 錯誤!未定義書簽.配置端口 錯誤!未定義書簽.配置一組端口 錯誤!未定義書簽.配置二層端口 錯誤!未定義書簽.配置端口速率及雙工模式 錯誤!未定義書簽.端口描述 錯誤!未定義書簽.監(jiān)控及維護(hù)端口 錯誤!未定義書簽.監(jiān)控端口和限制器的狀態(tài) 錯誤!未定義書簽.刷新、重置端口及計數(shù)器 錯誤!未定義書簽.關(guān)閉和翻開端口 錯誤!未定義書簽.配置VLAN 錯誤!未定義書簽.理解VLAN 錯誤!未定義書簽.可支持的VLAN 錯誤!未定義書簽.配置正常范圍的 VLAN 錯誤!未定義書簽.生成、修改以太網(wǎng) VLAN 錯誤!未定義書簽.刪除VLAN

2、 錯誤!未定義書簽.將端口分配給一個 VLAN 錯誤!未定義書簽.配置VLAN Trunks 錯誤!未定義書簽.使用STP實現(xiàn)負(fù)載均衡錯誤!未定義書簽.配置Cluster錯誤!未定義書簽.說明本手冊只包括日常使用的有關(guān)命令及特性,其它未涉及的命令及特性請參考英文的詳細(xì)配置手冊.產(chǎn)品特性2960是只支持二層的交換機(jī)支持VLAN? 至U 250 個 VLAN? 支持 VLAN ID 從 1 至U 4094 IEEE 標(biāo)準(zhǔn)? 支持ISL及IEEE 封裝平安? 支持IOS標(biāo)準(zhǔn)的密碼保護(hù)? 支持標(biāo)準(zhǔn)及擴(kuò)展的訪問列表來定義平安策略? 支持基于VLAN的訪問列表監(jiān)視? 交換機(jī)LED指示端口狀態(tài)? SPAN及

3、遠(yuǎn)端SPAN RSPAN可以監(jiān)視任何端口或 VLAN的流量? 內(nèi)置支持四組的 RMON監(jiān)控功能歷史、統(tǒng)計、告警及事件配置端口配置一組端口目的命令Step 1configure terminal進(jìn)入配置狀態(tài)Step 2interface range port-range 進(jìn)入組配置狀態(tài)Step 3可以使用平時的端口配置命令 進(jìn)行配置Step 4end退回Step 5show interfaces interface-id 驗證配置Step 6copy running-config startup-config保存當(dāng)使用interface range命令時有如下的規(guī)那么:? 有效的組范圍:o vl

4、an 從 1 至ij 4094o fastethernet 槽位/first port - last port,槽位為 0o gigabitethernet 槽位/first port - last port,槽位為 0o port-channel port-channel-number - port-channel-number , port-channel 號從 1 到64?端口號之間需要參加空格,如: interface range fastethernet 0/1 -5是有效的,而interface range fastethernet 0/1-5 是無效的.? interface r

5、ange 命令只能配置已經(jīng)存在的 interface vlan?所有在同一組的端口必須是相同類別的.見以下例子:Switch# configure terminalSwitch(config)# interface range fastethernet0/1 - 5Switch(config-if-range)# no shutdownSwitch(config-if-range)#*Oct6 08:24:35: %LINK-3-UPDOWN:Interface FastEthernet0/1,changed stateto up*Oct6 08:24:35: %LINK-3-UPDOWN:I

6、nterface FastEthernet0/2,changed stateto up*Oct6 08:24:35: %LINK-3-UPDOWN:Interface FastEthernet0/3,changed stateto up*Oct6 08:24:35: %LINK-3-UPDOWN:Interface FastEthernet0/4,changed stateto up*Oct6 08:24:35: %LINK-3-UPDOWN:Interface FastEthernet0/5,changed stateto up*Oct 6 08:24:36: %LINEPROTO-5-UP

7、DOWN: Line protocol on Interface FastEthernet0/05, changed state to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changedstate to up*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changedstate to up以下的例子顯示使用句號來配置不同類型端口的組:Switch#

8、 configure terminalSwitch(config)# interface range fastethernet0/1 - 3, gigabitethernet0/1 - 2Switch(config-if-range)# no shutdownSwitch(config-if-range)#*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed

9、 state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up*Oct 6 08:29:29: %LINEPROTO-5-UPDOWNine proto

10、col on Interface GigabitEthernet0/ 1, changed state to up*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 2, changed state to up*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 3, changed state to up配置二層端口2960的所有端口缺省的端口都是二層口,如果此端口已經(jīng)配置成三層端

11、口的話,那么需要用switchport來使其成為二層端口.配置端口速率及雙工模式可以配置快速以太口的速率為10/100Mbps及千兆以太口的速率為 10/100/1000-Mbps;但對于GBIC端口那么不能配置速率及雙工模式,有時可以配置nonegotiate,當(dāng)需要聯(lián)接不支持自適應(yīng)的其它千兆端口時命令目的Step 1configure terminal進(jìn)入配置狀態(tài).Step 2interface interface-id進(jìn)入端口配置狀態(tài).Step 3speed 10 | 100 | 1000 | auto | nonegotiate 設(shè)置端口速率注1000只工作在千兆口 . GBIC模塊只

12、工作在 1000 Mbps下.nonegotiate 只能在這些GBIC上用1000BASE-SX, -LX, and -ZX GBIC.Step 4duplex auto | full | half 設(shè)置全雙工或半雙工.Step 5end退出Step 6show interfaces interface-id顯示肩關(guān)配置情況Step 7copy running-config startup-config保存Switch(config)#Switch# configure terminalinterface fastethernet0/3命令目的Step 1configure terminal

13、進(jìn)入配置模式Step 2interface interface-id進(jìn)入要參加描述的端口Step 3description string參加描述最多240個 字符.Step 4end退回.Step 5show interfaces interface-id descriptionorshow running-config驗證.Step 6copy running-config startup-config保存Switch(config-if)#speed 10Switch(config-if)#端口描述duplex halfUse the no description interface co

14、nfiguration command to delete the description.This example shows how to add a description on Fast Ethernet interface 0/4 and to verify the description:Switch# config terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)# interface fastethernet0/4Switch(config-if)#descrip

15、tion Connects to MarketingSwitch(config-if)#endSwitch# show interfaces fastethernet0/4 descriptionInterface Status Protocol DescriptionFa0/4 up down Connects to Marketing監(jiān)控及維護(hù)端口監(jiān)控端口和限制器的狀態(tài)主要命令見下表:Show Commands for Interfaces Command目的show interfaces interface-id 顯示所有端口或某一端口的狀態(tài)和配置.showinterfaces inte

16、rface-id status顯示一系列端口的狀態(tài)或錯誤一關(guān)閉err-disabled 的狀態(tài)show interfaces interface-id 顯示二層端口的狀態(tài),可以用來決定switchport此口是否為一層或二層口.show interfaces interface-id 顯示端口描述descriptionshow running-config interface顯示當(dāng)前配置中的端口配置情況interface-id show version顯示軟硬件等情況舉例如下:Switch# show interfaces statusPortNameStatusVlanDuplex Spee

17、d TypeGi0/1connectedrouteda-fulla-100 10/100/1000Base TXGi0/2wce serverdisabledroutedautoauto 10/100/1000Base TXGi0/3ip wccp web-cache notconnectroutedauto auto 10/100/1000Base TXGi0/4notconnectroutedautoauto 10/100/1000Base TXGi0/5notconnectroutedautoauto 10/100/1000Base TXGi0/6disabledroutedautoau

18、to 10/100/1000Base TXGi0/7disabledroutedautoauto 10/100/1000Base TXGi0/8disabledroutedauto100 10/100/1000Base TXGi0/9notconnectroutedautoauto 10/100/1000Base TXGi0/10notconnectt routedauto( auto 10/100/1000Base TXGi0/11disabledroutedautoauto unknownGi0/12notconnectroutedautoauto unknownSwitch# show

19、interfaces fastethernet 0/1 switchportName: Fa0/1Switchport: EnabledAdministrative Mode: static accessOperational Mode: downAdministrative Trunking Encapsulation: dot1qNegotiation of Trunking: OffAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Trunking VLANs Enabled: ALLPruning VL

20、ANs Enabled: 2-1001Protected: falseUnknown unicast blocked: disabledUnknown multicast blocked: disabledVoice VLAN: dot1p (Inactive)Appliance trust: 5Switch# show running-config interface fastethernet0/2Building configuration.Current configuration : 131 bytesinterface FastEthernet0/2 switchport mode

21、access switchport protected no ip address mls qos cos 7 mls qos cos overrideend刷新、重置端口及計數(shù)器Clear命令目的clear counters interface-id 消除端口計數(shù)器.clear line number | console 0 |vty number重置異步串口的硬件邏輯% Note clear counters命令只1#除用 show interface所顯示的計數(shù),不影響用snmp得到的計數(shù)舉例如下:Switch# clear counters fastethernet0/5Clear &

22、quot;show interface" counters on this interface confirmySwitch#*Sep 30 08:42:55: %CLEAR-5-COUNTERS: Clear counter on interface FastEthernet0/5 by vtyl可使用clear line命令來消除或重置某一端口或串口,在大局部情況下并不需要這樣做:Switch# clear interface fastethernet0/5關(guān)閉和翻開端口目的命令Step 1一進(jìn)入配 置狀態(tài)Step 2interface vlan vlan-id | fastet

23、hernet | gigabitethernet interface-id | port-channel port-channel-number 選擇要 關(guān)閉的 端口Step 3shutdown關(guān)閉Step 4end退出Step 5show running-config驗證使用no shutdown命令重新翻開端口 .舉例如下:Switch# configure terminalSwitch(config)# interface fastethernet0/5Switch(config-if)# shutdownSwitch(config-if)#*Sep 30 08:33:47: %LINK

24、-5-CHANGED: Interface FastEthernet0/5, changed state to a administratively downSwitch# configure terminalSwitch(config)# interface fastethernet0/5Switch(config-if)# no shutdownSwitch(config-if)#*Sep 30 08:36:00: %LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to up配置VLAN理解VLAN一個VLAN就是一個交換網(wǎng),

25、其邏輯上按功能、工程、應(yīng)用來分而不必考慮用戶的物理位置.任何交換口都可以屬于某一VLAN, IP包、播送包及組播包均可以發(fā)送或播送給在此VLAN內(nèi)的最終用戶.每一個 VLAN均可看成是一個邏輯網(wǎng)絡(luò),發(fā)往另一VLAN的數(shù)據(jù)包必須由路由器或網(wǎng)橋轉(zhuǎn)發(fā)如下列圖.由于VLAN被看成是一個邏輯網(wǎng)絡(luò),其具有自己的網(wǎng) 橋治理信息康MIB并可支持自己的生成樹VLAN作為邏輯定義的網(wǎng)絡(luò)示意圖Einganewirifl1AcgunfingYLPiNlVLAMVLANVLANT常與IP子網(wǎng)相聯(lián)系,同一 IP子網(wǎng)屬于同一 VLAN在3550上VLA也問 的數(shù)據(jù)包可以由VLAN® 口進(jìn)行轉(zhuǎn)發(fā).可支持的VLANC

26、atalyst 2960 交換機(jī)支持 250 個 VLAN,可以分別是 VTP client, server, 及 transparent modes. VLAN 號可以從 1 至U 4094. VLAN 號 1002 到 1005保存給令 牌環(huán)及FDDI VLAN. VTP只能學(xué)習(xí)到普通范圍的 VLAN,即從VLANSJ 1到1005;VLAN大于1005屬于擴(kuò)展VLAN不存在VLANB據(jù)中. 交換機(jī)必須配置成 VTP透明模式當(dāng)需要生成VLAN號從1006至I 4094.本交換機(jī)支持基于每一 VLAN的生成樹PVST,最多支持128個生成樹.本交換 機(jī)支持ISL及IEEE trunk 二種封

27、裝.配置正常范圍的VLANVLAN 號1 ,1002到1005是自動生成的不能被去掉.VLAN 1到1005的配置被寫到文件 中,可以用show vlan命令查看,文件存放在NVRAM7.注意不要手工刪除文件,可能造成VLAN的不完整.如要刪除vlan需要用有關(guān)的命令來進(jìn)行生成、修改以太網(wǎng) VLAN命令目的Step 1configure terminal進(jìn)入配置狀態(tài)Step 2vlan vlan-id輸入一個VLANNt,然后進(jìn)入vlan配置狀 態(tài),可以輸入一個新的VLANt或舊的來 進(jìn)行修改.Step 3name vlan-name可選輸入一個VLAN,如果沒肩配置 VLANfe,缺省白名字

28、是 VLAN#前面用0 填滿的4位數(shù),如 VLAN000隹VLAN4勺 缺省名字Step 4mtu mtu-size可選改變MTU:小Step 5end退出Step 6show vlan name vlan-name | id vlan-id 驗證Step 7copy running-config startup config可選保存配置用 no vlan name或 no vlan mtu 退回到缺省的 vlan 配置狀態(tài)舉例如下:Switch# configure terminalSwitch(config)# vlan 20Switch(config-vlan)#name test20S

29、witch(config-vlan)#end也可以在enable狀態(tài)下,進(jìn)行VLANS己置:命令目的Step 1vlan database進(jìn)入VLAN配置狀態(tài)Step 2vlan vlan-id name vlan-name參加 VLANt及 VLANSStep 3vlan vlan-id mtu mtu-size可選修改MTUfc小Step 4exit更新VLANB據(jù)并退 出Step 5show vlan namevlan-name | id vlan-id 驗證配置Step 6copy running-config startup config保存配置可選舉例如下:Switch# vlan

30、 databaseSwitch(vlan)# vlan 20 name test20Switch(vlan)# exitAPPLY completed.Exiting.Switch#刪除VLAN當(dāng)刪除一個處于 VTP效勞器的交換機(jī)上刪除 VLAN時,那么此VLAN將在所有相同 VTP的 交換機(jī)上刪除.當(dāng)在透明模式下刪除時,只在當(dāng)前交換機(jī)上刪除.注意 當(dāng)刪除一個VLAN時,原來屬于此 VLAN的端口將處于非激活的狀態(tài),直到將 其分配給某一 VLAN .命令目的Step 1configure terminal進(jìn)入配置狀態(tài)Step 2no vlan vlan-id刪除某一 VLAN.Step 3en

31、d退出Step 4show vlan brief驗證Step 5copy running-config startup config保存也可用vlan database 進(jìn)入VLAN配置狀態(tài),用no vlan vlan-id 來刪除.將端口分配給一個 VLAN命令目的Step 1configure terminal進(jìn)入配置狀態(tài)Step 2interface interface-id進(jìn)入要分配的端口Step 3switchport mode access定義二層口Step 4switchport access vlanvlan-id把端口分配給某一 VLANStep 5end退出Step 6sh

32、ow running-config interface interface-id驗證端口的VLAN#Step 7show interfaces interface-id switchport驗證端口的治理模式和VLAN情況Step 8copy running-config startup-config保存配置使用default interface interface-id復(fù)原到缺省配置狀態(tài).舉例如下:Switch# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(confi

33、g)# interface fastethernet0/1Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 2Switch(config-if)#endSwitch#酉已置 VLAN Trunks命令目的Step 1configure terminal進(jìn)入配置狀態(tài)Step 2interface interface-id進(jìn)入端口配置狀態(tài)Step 3switchport mode dynamic auto | desirable | trunk 配置一層trunk模式.? dynamic

34、 auto 一自動協(xié)商是否成 為 trunk? dynamic desirable 把端 口設(shè)置 為trunk如果對方端口是trunk,desirable,或自動模式? trunk -設(shè)置端口為強(qiáng)制的 trunk 方式,而不埋公對方端口是否為trunkStep 4switchport access vlan vlan-id可選指個缺省 VLAN,如果 此端口/、冉是trunkStep 5switchport trunk native vlan vlan-id指定 native VLAN 號Step 6End退出Step 7show interfacesinterface-id switchpo

35、rt顯小啟美switchport 的配置Step 8show interfaces interface-id trunk顯小啟美trunk的配置Step 91. f,1copy running-config保存配置startup-config舉例:Switch# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)# interface fastethernet0/4Switch(config-if)#switchport mode trunkSwitch(con

36、fig-if)#end定義trunk允許的VLAN缺省情況下trunk允許所有的VLANffi過.可以使用 switchport trunk allowed vlan remove vlan-list來去掉某一 VLANCommandPurposeStep 1configure terminal進(jìn)入配置狀態(tài)Step 2interface interface-id進(jìn)入端口配置Step 3switchport mode trunk配置二層口為trunkStep 4switchport trunk allowed vlan add |all | except | remove vlan-list(可

37、選)配置trunk允 許的VLAN.使用 add, all , except, remove 關(guān) 健字Step 5end退出Step 6show interfaces interface-id switchport驗證VLAN0己置情況.Step 7copy running-config startup-config保存配置回到允許所有 VLANffi過時,可用no switchport trunk allowed vlan 端口配 置命令.舉例如下:Switch(config)# interface fastethernet0/1Switch(config-if)#switchport tr

38、unk allowed vlan remove 2Switch(config-if)#end酉己置 Native VLAN ()封裝的trunk端口可以接受帶有標(biāo)簽和不帶標(biāo)簽的數(shù)據(jù)流,交換機(jī)向nativevlan傳送不帶標(biāo)簽的數(shù)據(jù)流,缺省情況下native VLAN是1.命令目的Step 1configure terminal進(jìn)入配置狀態(tài)Step 2interface interface-id進(jìn)入配置成的端口Step 3switchport trunk native vlan vlan-id配置 native VLAN 號Step 4end退出Step 5show interfaces int

39、erface-id switchport驗證native VLAN配置Step 6copy running-config startup-config保存配置使用no switchport trunk native vlan 端口配置命令回到缺省的狀態(tài)使用STP實現(xiàn)負(fù)載均衡負(fù)載均衡可以使用流量分流到其它平行的 trunks上去.交換機(jī)為了防止環(huán)路, STP通常是阻斷所有端口交換機(jī)之間只留一條鏈路.使用負(fù)載均衡后,可以把不同VLAN的流量分配到不同的trunk上.可以通過配置ST端口權(quán)值STP路徑值來實現(xiàn)負(fù)載均衡.如果使用ST端口權(quán)值 來配置那么二條負(fù)載均衡的trunk必須聯(lián)同一交換機(jī)上.使用路

40、徑值那么即可以聯(lián) 相同的交換機(jī)與可以聯(lián)不同的交換機(jī).使用STP端口權(quán)值的負(fù)載均衡當(dāng)同一臺交換機(jī)的二個口形成環(huán)路時, STP端口權(quán)值用來決定那個口是 enable 的,那個口是阻斷的. 可以通過配置端口權(quán)值來決定二對 trunk各走那些VLAN, 有較高權(quán)值的端口數(shù)字較小的vlan,將處于轉(zhuǎn)發(fā)狀態(tài),同一個 VLANft另一 個trunk有較低的權(quán)值數(shù)字較大那么將處在阻斷狀態(tài). 即同一 VLAN只在一個 trunk上發(fā)送接受.基于端口權(quán)值的負(fù)載均衡示意圖trunk1將發(fā)送和接收VLAN8 10的數(shù)據(jù),trunk2將發(fā)送和接收VLAN8 6的數(shù)據(jù)Swrtch 1Trunks(priority 101

41、VLAWS8-W (priwly 128:lPurpose配置如下:CommandStep 1configure terminal進(jìn)入Switch 1配置狀態(tài)Step 2vtp domain domain-name配置VTP®Step 3vtp server將 Switch 1 配置成 VTP server.Step 4end退出Step 5show vtp status驗證VTP的配置Step 6show vlan驗證VLANStep 7configure terminal進(jìn)入配置狀態(tài)Step 8interface fastethernet 0/1進(jìn)入F0/1端口Step 9swi

42、tchport mode trunk配置成trunk端口Step 10end退出Step 11show interfacesfastethernet0/1 switchport驗證VLANI已置Step 12在switch1上的F0/2上重復(fù)7到11步驟Step 13在 Switch 2 的 F0/1,F0/2 上重復(fù)7至ij 11步驟.Step 14show vlan當(dāng)trunk已經(jīng)起來,在switch2上驗證已經(jīng)學(xué)到相關(guān)的vlan配置Step 15configure terminal在Switch 1上進(jìn)入配置狀態(tài)Step 16interface fastethernet0/1進(jìn)入要配置的端口Step 17spanning-tree vlan 8 port-pri

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論