CISCO port-channel 配置方法.doc_第1頁
CISCO port-channel 配置方法.doc_第2頁
CISCO port-channel 配置方法.doc_第3頁
CISCO port-channel 配置方法.doc_第4頁
免費(fèi)預(yù)覽已結(jié)束,剩余1頁可下載查看

下載本文檔

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

文檔簡(jiǎn)介

VLAN配置實(shí)例vlan 配置思路 (accessl 、Trunk)(1)創(chuàng)建Vlan在基于IOS的交換機(jī)上配置靜態(tài)VLAN: switch# vlan database switch(vlan)# vlan vlan-num name vlan-name switch(vlan)# exit switch# configure teriminal switch(config)# interface interface module/number switch(config-if)# switchport mode access/ 設(shè)置端口模式為access模式switch(config-if)# switchport access vlan vlan-num / 設(shè)置端口所屬的VLANswitch(config-if)# end 核驗(yàn)配置:show vlan (2)配置干道鏈路 干道是在兩臺(tái)catalyst交換機(jī)端口或catalyst交換機(jī)與路由器間的一條點(diǎn)對(duì)點(diǎn)鏈路。 干道鏈路可以承載多個(gè)vlan。 在基于IOS的交換機(jī)上配置干道鏈路 switch(config)# interface interface mod/port switch(config-if)# switchport mode trunk/ 設(shè)置端口模式為trunk模式switch(config-if)# switchport trunk encapsulation isl|dotlq/ 設(shè)置trunk所封裝的幀switch(config-if)# switchport trunk allowed vlan remove vlan-list / 允許那些VLAN通過干路( 附:switchport trunk allowed vlan add | all | except | remove vlan-list )no switchportlno switchport/ 把物理端口變成三層口,即把三層口當(dāng)成路由器上的口,當(dāng)將一個(gè)端口配置成三層端口之后,就可以在此端口上分配IP地址了,當(dāng)然還是可以連接PC機(jī)的,。 路由口:路由口是指某一物理端口在端口配置狀態(tài)下用no switchport命令生成的端口,所有的三層都需要IP地址以實(shí)現(xiàn)路由交換。配置舉例如下:Switch# configure terminalSwitch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip address 192.20.135.21 255.255.255.0Switch(config-if)# no shutdownSwitch(config-if)# end 附:show interfaces interface-id switchport / 顯示二層端口的狀態(tài),可以用來決定此口是否為二層或三層口。 Eg:Switch# show interfaces fastethernet 0/1 switchport三層交換機(jī)上VLAN的設(shè)置l(1)方法一:一般常規(guī)配置Switch# configure terminalSwitch(config)# vlan 20Switch(config-vlan)# name test20Switch(config-vlan)#ip address 1.1.1.1 255.255.255.0Switch(config-vlan)# end方法二:也可以在enable狀態(tài)下,進(jìn)行VLAN配置:Switch# vlan database/進(jìn)入VLAN配置狀態(tài)Switch(vlan)# vlan 20 name test20/加入VLAN號(hào)及VLAN名Switch(vlan)# exit 更新VLAN數(shù)據(jù)庫并退出(2) 將端口分配給某個(gè)VLANSwitch# configure terminal Switch(config)# interface fastethernet0/1 Switch(config-if)# switchport mode access/ 定義二層口的工作模式為接入模式Switch(config-if)# switchport access vlan 2 / 把端口分配給某一VLANSwitch(config-if)# end Switch#(3) 配置VLAN TrunksSwitch# configure terminal Switch(config)# interface fastethernet0/4 Switch(config-if)# switchport mode trunk Switch(config-if)# switchport trunk encapsulation dot1q Switch(config-if)# end 附:switchport trunk encapsulation isl | dot1q | negotiate / 配置trunk封裝ISL 或 802.1Q 或自動(dòng)協(xié)商switchport mode dynamic auto | desirable | trunk (一般不用它),配置二層trunk模式。(dynamic auto自動(dòng)協(xié)商是否成為trunk;dynamic desirable把端口設(shè)置為trunk如果對(duì)方端口是trunk, desirable, 或自動(dòng)模式;trunk設(shè)置端口為強(qiáng)制的trunk方式,而不理會(huì)對(duì)方端口是否為trunk)(4) 定義trunk允許的VLANSwitch(config)# interface fastethernet0/1Switch(config-if)# switchport trunk allowed vlan remove 2 / 配置trunk允許的VLANSwitch(config-if)# end附:switchport trunk allowed vlan add | all | except | remove vlan-list(5) 配置Native VLAN(802.1q)switch(config-if)# switchport trunk native vlan-num/ 封裝802.1q的trunk端口可以接受帶有標(biāo)簽和不帶標(biāo)簽的數(shù)據(jù)流,交換機(jī)向native vlan傳送不帶標(biāo)簽的數(shù)據(jù)流,缺省情況下native VLAN是VLAN 1使用no switchport trunk native vlan 端口配置命令回到缺省的狀態(tài)(6) 配置一組端口4006# configure terminal4006(config)# interface range fastethernet2/1 54006(config-if-range)# no shutdown / 注意:端口號(hào)之間需要加入空格,如:interface range fastethernet 2/1 5 是有效的,而interface range fastethernet 2/1-5 是無效的.以下的例子顯示使用逗號(hào)來配置不同類型端口的組:4006# configure terminal4006(config)# interface range fastethernet2/1 3, gigabitethernet3/1 - 2 4006(config-if-range)# no shutdown (7) 其它常用命令duplex auto | full | half/設(shè)置全雙工或半雙工.speed 10 | 100 | 1000 | auto | nonegotiate設(shè)置端口速率 / 注:1000 只工作在千兆口. GBIC模塊只工作在1000 Mbps下. nonegotiate 只能在這些GBIC上用 1000BASE-SX, -LX, and -ZX GBIC.copy running-config startup-config / 保存設(shè)置(8)配置EtherChannel以太通道捆綁幾個(gè)以太端口為一個(gè)獨(dú)立的邏輯鏈路。如4006交換機(jī),你可以捆綁在4006任何模塊上最多8個(gè)兼容的具有相同速率的端口。每個(gè)以太通道具有一個(gè)port-channel端口號(hào)。要捆綁一個(gè)以太通道時(shí),會(huì)產(chǎn)生一個(gè)邏輯port-channel端口,邏輯端口下的配置可影響與之捆綁的物理端口,但物理端口下的配置不能影響邏輯端口的配置。1) 三層以太通道(邏輯port-channe)的配置Switch# configure terminalSwitch(config)# interface port-channel 1 /創(chuàng)建一個(gè)邏輯端口Switch(config-if)# ip address 172.32.52.10 255.255.255.0Switch(config-if)# end2) 三層物理端口配置Switch# configure terminalSwitch(config)# interface range fastethernet 5/4 5(注意: 空格是必需的)Switch(config-if)# no switchport/改變?cè)摱丝跒槿龑咏涌赟witch(config-if)# no ip address/確認(rèn)接口沒有配置IP地址Switch(config-if)# channel-group 1 mode desirableSwitch(config-if)# end附: Switch(config-if)# channel-group port_channel_number mode auto | desirable | on/ 將該物理端口加入一個(gè)以太通道中,并確定PagP模式。3) 二層以太通道配置Switch# configure terminalSwitch(config)# interface range fastethernet 5/6 - 7 (注意: 空格是必需的)Switch(config-if-range)# channel-group 2 mode desirableSwitch(config-if-range)# endSwitch# show running-config interface port-channel 2Building configuration.Current configuration:!interface Port-channel2switchport access vlan 10switchport mode accessendSwitch#如何作端口聚合l如果要配置二臺(tái)6509之間的Trunk聯(lián)接,首先將二6509用千兆光纖相聯(lián)好,然后分別配置二相聯(lián)端口的trunk,可以是只用一雙光纖,或用二對(duì)光纖做port channel,配置如下:一雙光纖相聯(lián)時(shí),分別在二臺(tái)65上進(jìn)行以下的配置:interface GigabitEthernet1/1 no ip address switchport switchport trunk encapsulation dot1q switchport trunk native vlan 1 二對(duì)光纖相聯(lián)時(shí),必須要做port channel,分別在二臺(tái)65上進(jìn)行以下的配置:interface port-channe1 no ip address switchport switchport trunk encapsulation dot1q switchport trunk native vlan 1 ! interface GigabitEthernet1/1 no ip address duplex fullspeed 1000switchport mode trunkswitchport trunk encapsulation dot1q switchport trunk native vlan 1 channel-group 1 mode on ! interface GigabitEthernet1/2 no ip addressduplex fullspeed 1000switchport mode trunkswitchport trunk encapsulation dot1q switchport trunk native vlan 1 channel-group 1 mode on VTP裁剪l (1) 在基于IOS的交換機(jī)上配置VTP 模式: switch# vlan database switch(vlan)# vtp domain domain-name switch(vlan)# vtp sever|cilent|transparent switch(vlan)# vtp password password 在基于CLI的交換機(jī)上配置VTP 模式: switch(enable) set vtp domain domain-name mode sever|cile

溫馨提示

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

評(píng)論

0/150

提交評(píng)論