交換機簡要配置維護手冊_第1頁
交換機簡要配置維護手冊_第2頁
交換機簡要配置維護手冊_第3頁
交換機簡要配置維護手冊_第4頁
交換機簡要配置維護手冊_第5頁
已閱讀5頁,還剩24頁未讀 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

2950互換機

簡要配置維護手冊

目錄

闡明..............................................................................4

產品特性..........................................................................4

配置端口..........................................................................5

配置一組端口.................................................................5

配置二層端口.................................................................8

配置端口速率及雙工模式..................................................8

端口描述.................................................................9

監控及維護端口...............................................................11

監控端口和控制器的狀態..................................................II

刷新、重置端口及計數器..................................................14

關閉和打開端口..........................................................15

配置VLAN..............................................................................................................................................16

理解VLAN.....................................................................................................................................16

可支持的VLAN.............................................................................................................................17

配置正常范圍的VLAN.................................................................................................................18

生成、修改以太網VLAN....................................................................................................18

刪除VLAN.............................................................................................................................20

將端口分派給一種VLAN...................................................................................................21

配置VLANTrunks.......................................................................................................................22

使用STP實現負載均衡...................................................26

配置Cluster30

?SPAN及遠端SPAN(RSPAN)可以監視任何端口或VLAN的流量

?內置支持四組的RMON監控功能(歷史、記錄、告警及事件)

第3章配置端口

3.1配置一組端口

命令目的

Step1configureterminal進入配置狀態

Step2interfacerange進入組配置狀態

Step3可以使用平時的端口配置命

令進行配置

Step4end退回

Step5showinterfaces驗證配置

finterface-id\

Step6copyrunning-config保留

startup-config

當使用interfacerange命令時有如下H勺規則:

?有效口勺組范圍:

ovlan從1至I]4094

ofastethernet槽位/-{/asfp〃"},槽位為0

gigabitethernet槽位/{//rsfpo"}-{/awpc,7},槽位為0

oport-channelport-channel-number-port-channel-number,po)t-channel號從1

到64

?端口號之間需要加入空格,如:interfacerangefastethernet0/1-5是有

效H勺,而interfacerangefastethernet0/1-5是無效H勺.

?interfacerange命令只能配置已經存在的Iinterfacevlan

?所有在同一組的端口必須是相似類別的I。

見如下例子:

Switch#configureterminal

Switch(config)#interfacerangefastethernet0/1-5

Switch(config-if-range)#noshutdown

Switch(config-if-range)#

*0ct608:24:35:%LINK-3-UPD0WN:InterfaceFastEthernetO/1,changedstatetoup

?Ont608?4:35-%LINK-3-UPD0WN:InterfaceFastFthernet0/2,changedstatetonn

*0ct608:24:35:%LINK-3-UPD0WN:InterfaceFastEthernetO/3,changedstatetoup

*0ct608:24:35:%LINK-3-UPD0WN:InterfaceFastEthernetO/4,changedstatetoup

*0ct608:24:35:%LINK-3-UPD0WN:InterfaceFastEthernetO/5,changedstatetoup

*0ct608:24:36:%LINEPR0T0-5-UPD0WN:LineprotocolonInterfaceFastEthernetO/05,

changedstatetoup

?Oct608:24:36:%LINEPR0T0-5-UPD0V/N:LineprotocolonInterfaceFastEthernetO/3,

changed

statetoup

?Oct608:24:36:%LINEPR0T0-5-UPD0V/N:LineprotocolonInterfaceFastEthernetO/4,

changed

statetoup

如下的例子顯示使用句號來配置不一樣類型端口口勺組:

Switch#configureterminal

Switch(config)#interfacerangefastethernet0/1-3,gigabitethernet0/1-2

Switch(config-if-range)#noshutdown

Switch(config-if-range)#

*0ct608:29:28:%LINK-3-UPD0WN:InterfaceFastEthernetO/1,changedup

*0ct608:29:28:%LINK-3-UPD0WN:InterfaceFastEthernetO/2,changedup

*0ct608:29:28:%LINK-3-UPD0WN:InterfaceFastEthernetO/3,changedup

*0ct608:29:28:%LINK-3-UPD0WN:InterfaceGigabitEthernet0/1,changedstatetoup

*0ct608:29:28:%LINK-3-UPD0WN:InterfaceGigabitEthernetO/2,changedstatetoup

*0ct608:29:29:%LINEPR0T0-5-UPD0WN:LineprotocolonInterfaceGigabitEthernetO/1,

changedstatetoup

*0ct608:29:29:%LINEPR0T0-5-UPD0V/N:LineprotocolonInterfaceFastEthernetO/2,

changedstatetoup

*0ct608:29:29:%LINEPR0T0-5-UPD0WN:LineprotocolonInterfaceFastEthernetO/3.

changedstatetoup

3.2配置二層端口

2950H勺所有端口缺省的端口都是二層口,假如此端口已經配置成三層端口的話,

則需要用switchport來使其成為二層端口。

321配置端口速率及雙工模式

3.2.1.1可以配置迅速以太口的速率為10/100Mbps及千兆以太口的速率為

10/100/1000-Mbps;但對于GBIC端口則不能配置速率及雙工模式,有時可以

配置nonegotiate,當需要聯接不支持自適應的其他千兆端口時

命令目的

Step1configureterminal進入配置狀態.

Step2interface進入端口配置狀態.

interface-id

Step3speed{10|100|1000設置端口速率

auto|nonegotiate)

注1000只工作在千兆口.GBIC

模塊只工作在1000Mbps下.

nonegotiate只能在這些GBIC上用

1000BASE-SX,-LX,and-ZXGBIC.

Step4duplexauto|full設置全雙工或半雙工.

half}

Step5end退出

Step6showinterfaces顯示有關配置狀況

interface-id

Step7copyrunning-config保留

startup-config

Switch#configureterminal

Switch(config)#interfacefastethernetO/3

Switch(config-if)#speed10

Switch(config-if)#dupIexhalf

322端口描述

命令目的

Step1configureterminal進入配置模式

Step2interfaceinterface-id進入要加入描述的端口

Step3descriptionstring加入描述(最多24D個

字符).

Step4end退回.

Step5showinterfacesinterface-id驗證.

description

or

showrunning-config

Step6copyrunning-configstartup-config保留

Usethenodescriptioninterfaceconfigurationcommandtodeletethe

description.

ThisexampleshowshowtoaddadescriptiononFastEthernetinterface

0/4andtoverifythedescription:

Switch#configterminal

Enterconfigurationcommands,oneperIine.Endv/ithCNTL/Z.

Switch(config)#interfacefastethernet0/4

Switch(config-if)#descriptionConnectstoMarketing

Switch(config-if)#end

Switch#showinterfacesfastethernet0/4description

InterfaceStatusProtocolDescription

FaO/4updownConnectstoMarketing

3.3監控及維護端口

3.3.1監控端口和控制器的狀態

重要命令見下表:

ShowCommandsforInterfacesCommand目的

showinterfaces\,interface-id\顯示所有端口或某一端口的1狀態和配

置.

showinterfacesinterface-idstatus顯示一系列端口的狀態或錯誤一關閉

[err-disabled]的狀態

showinterfaces[interface-id]顯示二層端口H勺狀態,可以用來決定

switchport此口與否為二層或三層口。

showinterfaces[interface-id]顯示端口描述

description

showrunning-configinterface顯示目前配置中的端口配置狀況

[interface-id]

showversion顯示軟硬件等狀況

舉例如下:

Switch#showinterfacesstatus

PortNameStatusVianDuplexSpeedType

GiO/1connectedrouteda-fulIa-10010/100/1OOOBase

TX

GiO/2weeserver20.20.2disabledroutedautoauto10/100/1OOOBaseTX

GiO/3ipweepv/eb-cachenotconnectroutedautoauto10/100/1OOOBaseTX

Gi0/4notconnectroutedautoauto10/100/1OOOBaseTX

GiO/5notconnectroutedautoauto10/100/1OOOBaseTX

GiO/6disabledroutedautoauto10/100/1OOOBaseTX

GiO/7disabledroutedautoauto10/100/1OOOBaseTX

GiO/8disabledroutedauto10010/100/1OOOBaseTX

GiO/9notconnectroutedautoauto10/100/1OOOBaseTX

Gi0/10notconnectroutedautoauto10/100/1OOOBaseTX

Gi0/11disabledroutedautoautounknown

GiO/12notconnectroutedautoautounknown

Switch#showinterfacesfastethernet0/1switchport

Name:FaO/1

Switchport:Enabled

AdministrativeMode:staticaccess

OperationaIMode:down

AdministrativeTrunkingEncapsulation:dotlq

NegotiationofTrunking:Off

AccessModeVLAN:1(default)

TrunkingNativeModeVLAN:1(default)

TrunkingVLANsEnabled:ALL

PruningVLANsEnabled:2-1001

Protected:faIse

Unknownunicastblocked:disabled

Unknownmulticastblocked:disabled

VoiceVLAN:dotlp(Inactive)

Appliancetrust:5

Switch#showrunning-configinterfacefastethernetO/2

BuiIdingconfiguration...

Currentconfiguration:131bytes

I

interfaceFastEthernetO/2

switchportmodeaccess

switchportprotected

noipaddress

misqoscos7

misqoscosoverride

end

3.3.2刷新、重置端口及計數器

Clear命令目的

clearcounters[interface-id\清除端口計數器.

clearline[number/console0/vtynumber]重置異步串口日勺硬件邏輯

%Noteclearcounters命令只清除用showinterface所顯示時計數,不影響用snmp得到

的計數

舉例如下:

Switch#clearcountersfastethernetO/5

Clear"showinterface"countersonthisinterface[confirm]y

Switch#

?Sep3008:42:55:%CLEAR-5_C0UNTERS:ClearcounteroninterfaceFastEthernetO/5

byvty1(171.69.115.10)

可使用clearline命令來清除或重置某一端口或串口,在大部分狀況下并不需

要這樣做:

Switch#clearinterfacefastethernetO/5

3.3.3關閉和打開端口

命令目的

Step1configureterminal進入配

置次態

Step2interface{vlanvlan~i(f\\{{fastethernet選擇要

gigabitethernet}interface-id\{port-channel關閉的

port-channe1-numbei}端口

Step3shutdown關閉

Step4end退出

Step5showrunning-config驗證

使用noshutdown命令重新打開端口.

舉例如下:

Switch#configureterminal

Switch(config)#interfacefastethernetO/5

Switch(config-if)#shutdown

Switch(config-if)#

?Sep3008:33:47:%LINK-5-CHANGED:InterfaceFastEthernetO/5,changedstatetoa

administrativelydown

Switch#configureterminal

Switch(config)#interfacefastethernetO/5

Switch(config-if)#noshutdown

Switch(config-if)#

*Sep3008:36:00:%LINK-3-UPD0V/N:InterfaceFastEthernetO/5,changedstatetoup

第4章配置VLAN

4.1理解VLAN

一種VLAN就是一種互換網,其邏輯上按功能、項目、應用來分而不必考慮顧客歐I物理位

置。任何互換口都可以屬于某一VLAN,IP包、廣播包及組播包均可以發送或廣播給在此

VLAN內H勺最終顧客。每一種VLAN均可當作是一種邏輯網絡,發往另一VLAN的數據包

必須由路由器或網橋轉發(如下圖)。由于VLAN被當作是?種邏輯網絡,其具有自己日勺網

橋管理信息廛(MIB)并可支持自己的生成樹

VLAN作為邏輯定義的I網絡示意圖

VLAN常常與IP子網相聯絡,同一IP子網屬于同一VLANo在3550上VLAN之間

H勺數據包可以由VLAN端口進行轉發。

4.2可支持的VLAN

Catalyst3550互換機支持250個VLAN,可以分別是VTPclient,server,及

transparentmodes.VLAN號可以從1到4094.VLAN號1002到1005保留給令

牌環及FDDIVLAN.VTP只能學習到一般范圍的VLAN,即從VLAN到1到1005;

VLAN號不小于1005屬于擴展VLAN,不存在VLAN數據摩中。互換機必須配置成

VTP透明模式當需要生成VLAN號從1006到4094.

本互換機支持基于每一VLAN的生成樹(PVST),最多支持128個生成樹。本互換

機支持ISL及IEEE802.IQtrunk二種封裝。

4.3配置正常范圍的VLAN

VLAN號1,1002到1005是自動生成時不能被去掉。

VLAN號1到1005日勺配置被寫到文獻vlan.dat中,可以用showvlan命令查看,

vlan.dat文獻寄存在NVRAM中.

注意不要手工刪除〃.出〃文獻,也許導致VLANH勺不完整。如要刪除vlan需要

用有關歐I命令來進行

4.3.1生成、修改以太網VLAN

命令目的

Step1configureterminal進入配置狀態

Step2vlanvlan-id輸入一種VLAN號,然后進入vlan配置

狀態,可以輸入一種新日勺VLAN號或舊

的來進行修改。

Step3namevlan-name(可選)輸入一種VLAN名,假如沒有配

置VLAN名,缺省的名字是VLAN號前面

用0填滿日勺4位數,如VLAN0004是VLAN4

的缺省名字

Step4mtumtu-size(可選)變化MTU大小

Step5end退出

Step6showvlan{name驗證

vlan-name/id

vlan-id\

Step7copyrunning-config(可選)保留配置

startupconfig

用novlanname或novlanmtu退回到缺省日勺vlan配置狀態

舉例如下:

Switch#configureterminal

Switch(config)#vlan20

Switch(config-vIan)#nametest20

Switch(config-vIan)#end

也可以在enable狀態下,進行VLAN配置:

命令目的

Step1vlandatabase進入VLAN配置狀態

Step2vlanvlan-idnamevlan-name加入VLAN號及VLAN

Step3vlanvlan-idmtumtu-size(可選)修改MTU大小

Step4exit更新VLAN數據康并退

Step5showvlan{namevlan-name/id驗證配置

vlan~id\

Step6copyrunning-configstartupconfig保留配置(可選)

舉例如下:

Switch#vlandatabase

Switch(vlan)#vlan20nametest20

Switch(vlan)#exit

APPLYcompleted.

Exiting....

Switch#

4.3.2刪除VLAN

當刪除一種處在VTP服憲器的互換機上刪除VLAN時,則此VLAN將在所有相似VTP的

互換機上刪除。當在透明模式下刪除時,只在目前互換機上刪除。

注意當刪除一種VLAN時,本來屬于此VLAN的端口將處在非激活的狀態,直到將

其分派給某一VLANo

命令目的

Step1configureterminal進入配置狀態

Step2novlanvlan-id刪除某一VLAN.

Step3end退出

Step4showvlanbrief驗證

Step5copyrunning-configstartupconfig保留

也可用vlandatabase進入VLAN配置狀態,用novlanvlan-id來刪除。

4.3.3將端口分派給一種VLAN

命令目的

Step1configureterminal進入配置狀態

Step2interfaceinterface-id進入要分派的端口

Step3switchportmodeaccess定義二層口

Step4switchportaccessvlanvlan-id把端口分派給某一VLAN

Step5end退出

Step6showrunning-configinterface驗證端口的VLAN號

interface-id

Step7showinterfacesinterface-id驗證端口的管理模式和

switchportVLAN狀況

Step8copyrunning-config保留配置

startup-config

使用defaultinterfaceinterface-id還原到缺省配置狀態。

舉例如下:

Switch#configureterminal

Enterconfigurationcommands,oneperIine.EndwithCNTL/Z.

Switch(config)#interfacefastethernetO/1

Switch(config-if)#switchportmodeaccess

Switch(config-if)#switchportaccessvlan2

Switch(config-if)#end

Switch#

4.4配置VLANTrunks

命令目的

Step1configureterminal進入配置狀態

Step2interfaceinterface-id進入端口配置狀態

Step3switchportmode{dynamic配置二層trunk模式。

{autodesirable}

trunk}?dynamicauto一自動協商與否成

為trunk

?dynamicdesirable一把端口設置

為trunk假如對方端口是trunk,

desirable,或自動模式

?trunk一設置端口為強制口勺trunk

方式,而不理會對方端口與否為

trunk

Step4switchportaccessvlan(可選)指定一種缺省VLAN,假如

vlan-id此端口不再是trunk

Step5switchporttrunknative指定802.IQnativeVLAN號

vlanvlan-id

Step6end退出

Step7showinterfaces顯示有關switchport的配置

interface-idswitchport

St.pp8showintftrfacRS顯示有關trunk的配置

interface-idtrunk

Step9copyrunning-config保留配置

startup-config

舉例:

Switch#configureterminal

Enterconfigurationcommands,oneperIine.EndwithCNTL/Z.

Switch(config)#interfacefastethernetO/4

Switch(config-if)#switchportmodetrunk

Switch(config-if)#end

4.4.1.1定義trunk容許的VLAN

缺省狀況下trunk容許所有口勺VLAN通過。可以使用switchporttrunkallowed

vlanremovevlan-1ist來去掉某一VLAN

CommandPurpose

Step1configureterminal進入配置狀態

Step2interfaceinterface-id進入端口配置

Step3switchportmodetrunk配置二層口為trunk

Step4switchporttrunkallowedvlanadd(可選)配置trunk

allexceptremove}vlan-list容許H勺VLAN.

使用add,all,

except,remove關

健字

Step5end退出

Step6showinterfacesinterface-id驗證VLAN配置狀況.

switchport

Step7copyrunning-configstartup-config保留配置

回到容許所有VLAN通過時,可用noswitchporttrunkallowedvlan端口配

置命令.

舉例如下:

Switch(config)#interfacefastethernetO/1

Switch(config-if)#switchporttrunkallowedvlanremove2

Switch(config-if)#end

4.4.1.2配置NativeVLAN(802.1q)

封裝802.lq的trunk端口可以接受帶有標簽和不帶標簽的數據流,互換機向

nativevlan傳送不帶標簽H勺數據流,缺省狀況下nativeVLAN是1。

命令目的

Step1configureterminal進入配置狀態

Step2interfaceinterface-id進入配置成802.Iqtrunk

的端口

Step3switchporttrunknativevlan配置nativeVLAN號

vlan-id

Step4end退出

Step5showinterfacesinterface-id驗證nativeVLAN配置

switchport

Step6copyrunning-config保留配置

startup-config

使用noswitchporttrunknativevlan端口配置命令回到缺省的狀態

442使用STP實現負載均衡

負載均衡可以使用流量分流到其他平行的trunks上去.互換機為了防止環路,

STP一般是阻斷所有端口互換機之間只留一條鏈路。使用負載均衡后,可以把

不一樣VLAN的流量分派到不一樣H勺trunk上。

可以通過配置STP端口權值STP途徑值來實現負載均衡.假如使用STP端口權值

來配置那么二條負載均衡的trunk必須聯同一互爽機上。使用途徑值則即可以聯

相似的互換機與可以聯不一樣的互換機。

4.4.2.1使用STP端口權值的負載均衡

當同一臺互換機的二個口形成環路時,STP端口權值用來決定那個口是enable

口勺,那個口是阻斷的。可以通過配置端口權值來決定二對trunk各走那些VLAN,

有較高權值口勺端口(數字較小的)vlan,將處在轉發狀態,同一種VLAN在另一

種trunk有較低的權值(數字較大)則將處在阻斷狀態。即同一VLAN只在一種

trunk上發送接受。

基于端口權值口勺負載均衡示意圖

trunkl將發送和接受VLAN8-10日勺數據,trunk2將發送和接受VLAN3-6的數據

Switch1

Trunk1-----?1<——Trunk2

VLANs8-10(pnority10>VLANs3-6(priority1。)

VLANs3-6(priority128)VLANs8-10(prionty128)

Switch2

配置如下:

CommandPurpose

Step1configureterminal進入Switch1配置狀態

Step2vtpdomaindomain-name配置VTP域

Step3vtpserver將Switch1配置成VTPserver.

Step4end退出

Step5showvtpstatus驗證VTP日勺配置

Step6showvlan驗證VLAN

Step7configureterminal進入配置狀態

Step8interfacefastethernet0/1進入F0/1端口

Step9switchportmodetrunk配置成trunk端口

Step10end退出

Step11showinterfaces驗證VLAN配置

fastethernetO/1

switchport

Step12在switchl上的|F0/2上反復7

到11環節

Step13在Switch2的F0/1,FO/2上反

復7到11環節。

Step14showvlan當trunk己經起來,在switch2

上驗證已經學到有關的vlan配

Step15configureterminal在Switch1上進入配置狀態

Step16interfacefastethernetO/1進入要配置的端口

Step17spanning-treevlan8將端口權值10賦與VLAN8.

port-priority10

Step18spanning-treevlan9將端口權值10賦與VLAN9.

port-priority10

Step19spanning-treevlan10將端口權值10賦與VLAN10.

溫馨提示

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

評論

0/150

提交評論