




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、* vian 配置思路(access、Trunk)(1) 創(chuàng)建 Vian在基于IOS的交換機上配置靜態(tài)VLAN:switch# vla n databaseswitch(vla n)# vlan vlan-num n ame vlan-n ameswitch(vla n)# exitswitch# con figure terim inalswitch(c on fig)# in terface in terface module/nu mberswitch(c on fig-if)# switchport mode access / 設(shè)置端口模式為 access 模式switch(c on
2、fig-if)# switchport access vla n vla n-num /設(shè)置端口所屬的VLANswitch(c on fig-if)# end核驗配置:show vlan(2) 配置干道鏈路干道是在兩臺catalyst交換機端口或catalyst交換機與路由器間的一條點對點鏈路。干道鏈路可以承載多個vlan。在基于IOS的交換機上配置干道鏈路switch(c on fig)# in terface in terface mod/portswitch(config-if)# switchport mode trunk /設(shè)置端口模式為 trunk 模式switch(config-
3、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 switchportno switchport /把物理端口變成三層口,即把三層口當成路由器上的口,當將一個端口配置成三層端口之后,就可以在此端口上分配
4、IP地址了,當然還是可以連接 PC機的,。路no switchport命令生成的端口,所有的由口:路由口是指某一物理端口在端口配置狀態(tài)下用 三層都需要IP地址以實現(xiàn)路由交換。配置舉例如下:Switch# con figure termi nalSwitch(c on fig)# in terface gigabitethernetO/2Switch(c on fig-if)# no switchportSwitch(co nfig-if)# ip address 192.20.135.21 255.255.255.0Switch(c on fig-if)# no shutdow nSwitch
5、(c on fig-if)# end附:show in terfaces in terface-id switchport /顯示二層端口的狀態(tài),可以用來決定此口是否為二層或三層口。Eg: Switch# show in terfaces fastether net 0/1 switchport*三層交換機上VLAN的設(shè)置(1) 方法一:一般常規(guī)配置Switch# con figure termi nalSwitch(co nfig)# vlan 20Switch(c on fig-vla n)# n ame test20Switch(co nfig-vla n)#ip address 1.1
6、.1.1 255.255.255.0Switch(c on fig-vla n)# end方法二:也可以在enable狀態(tài)下,進行 VLAN配置:Switch# vlan database / 進入 VLAN 配置狀態(tài)Switch(vlan)# vlan 20 name test20 / 加入 VLAN 號及 VLAN 名Switch(vlan)# exit 更新VLAN數(shù)據(jù)庫并退出(2) 將端口分配給某個VLANSwitch(c on fig)# in terface fastether net0/1Switch(co nfig-if)# switchport mode access / 定
7、義二層口的工作模式為接入模式Switch(co nfig-if)# switchport access vlan 2 /把端口分配給某一VLANSwitch(c on fig-if)# endSwitch#(3) 配置 VLAN TrunksSwitch# con figure termi nalSwitch(c on fig)# in terface fastether netO/4Switch(c on fig-if)# switchport mode trunkSwitch(c on fig-if)# switchport trunk en capsulati on dot1qSwitc
8、h(c on fig-if)# end附:switchport trunk encapsulation isl | dot1q | negotiate / 配置 trunk 圭寸裝 ISL 或 802.1Q或自動協(xié)商switchport mode dynamic auto | desirable | trunk(般不用它),配置二層 trunk 模式。(dynamic auto 自動協(xié)商是否成為 trunk ; dynamic desirable 把端口設(shè)置為 trunk如果對方 端口是trunk, desirable,或自動模式;trunk 設(shè)置端口為強制的 trunk方式,而不理會對方端
9、口是否為trunk)(4) 定義trunk允許的VLANSwitch(c on fig)# in terface fastethernetO/1Switch(config-if)# switchport trunk allowed vlan remove 2 / 配置 trunk 允許的 VLANSwitch(c on fig-if)# end附: switchport trunk allowed vlan add | all | except | remove vlan-list(5) 配置 Native VLAN ( 802.1q)switch(config-if)# switchport
10、 trunk native vlan-num /圭寸裝 802.1q 的 trunk 端口可以接受帶有標簽和不帶標簽的數(shù)據(jù)流,交換機向native vlan傳送不帶標簽的數(shù)據(jù)流,缺省情況下native VLAN 是 VLAN 1使用no switchport trunk native vlan 端口配置命令回到缺省的狀態(tài)(6) 配置一組端口4006# con figure term inal4006(co nfig)# in terface range fastethernet2/1 -54006(c on fig-if-ra nge)# no shutdow n/注意:端口號之間需要加入空格
11、,如:in terface ran ge fastethernet 2/1 -5是有效的,而 in terface range fastether net 2/1-5 是無效的.以下的例子顯示使用逗號來配置不同類型端口的組:4006# con figure term inal4006(co nfig)# in terface range fastethernet2/1 -3, gigabitethernet3/1 - 24006(c on fig-if-ra nge)# no shutdow n(7) 其它常用命令duplex auto | full | half /設(shè)置全雙工或半雙工.spe
12、ed 10 | 100 | 1000 | auto | nonegotiate 設(shè)置端口速率 / 注:1000 只工作在千兆口 . GBIC 模塊只工作在 1000 Mbps 下.nonegotiate 只能在這些 GBIC 上用 1000BASE-SX, -LX, and -ZX GBIC.copy runnin g-c onfig startup-c onfig / 保存設(shè)置(8) 配置 EtherChannel以太通道捆綁幾個以太端口為一個獨立的邏輯鏈路。如4006交換機,你可以捆綁在4006任何模 塊上最多8個兼容的具有相同速率的端口。每個以太通道具有一個port-channel端口號
13、。要捆綁一個以太通道時,會產(chǎn)生一個邏輯port- channel端口,邏輯端口下的配置可影響與之捆綁的物理端口,但物理端口下的配置不能影響邏輯端口的配置。1) 三層以太通道(邏輯 port-cha nne)的配置Switch# con figure termi nalSwitch(co nfig)# in terface port-cha nnel 1 /創(chuàng)建一個邏輯端口Switch(co nfig-if)# ip address 172.32.52.10 255.255.255.0Switch(c on fig-if)# end2)三層物理端口配置Switch# con figure ter
14、mi nalSwitch(co nfig)# in terface range fastethernet 5/4 -5 (注意:空格是必需的)Switch(co nfig-if)# no switchport /改變該端口為三層接口Switch(config-if)# no ip address / 確認接口沒有配置 IP 地址Switch(c on fig-if)# cha nn el-group 1 mode desirableSwitch(c on fig-if)# end附:Switch(c on fig-if)# cha nn el-group port_cha nnel_nu mb
15、er mode auto | desirable | on /將該物理端口加入一個以太通道中,并確定PagP模式。3) 二層以太通道配置Switch# con figure termi nalSwitch(co nfig)# in terface range fastethernet 5/6 - 7 (注意:空格是必需的)Switch(c on fig-if-ra nge)# cha nn el-group 2 mode desirableSwitch(c on fig-if-ra nge)# endSwitch# show runnin g-c onfig in terface port-c
16、ha nnel 2Buildi ng con figuratio n.Current con figuratio n:!in terface Port-cha nn el2switchport access vlan 10switchport mode accessend*如何作端口聚合Switch#如果要配置二臺6509之間的Trunk聯(lián)接,首先將二6509用千兆光纖相聯(lián)好,然后分別配置二相聯(lián)端口的trunk,可以是只用一雙光纖,或用二對光纖做port cha nnel,配置如下:一雙光纖相聯(lián)時,分別在二臺65上進行以下的配置:in terface GigabitEthernet1/1no
17、ip addressswitchportswitchport trunk en capsulati on dot1qswitchport trunk n ative vlan 1二對光纖相聯(lián)時,必須要做port channel,分別在二臺65上進行以下的配置:in terface port-cha nne1no ip addressswitchportswitchport trunk en capsulati on dot1qswitchport trunk n ative vlan 1!in terface GigabitEthernet1/1no ip addressduplex full
18、speed 1000switchport mode trunkswitchport trunk en capsulati on dot1qswitchport trunk n ative vlan 1cha nn el-group 1 mode onin terface GigabitEthernet1/2no ip addressduplex fullspeed 1000switchport mode trunkswitchport trunk en capsulati on dot1qswitchport trunk n ative vlan 1cha nn el-group 1 mode on* VTP裁剪(1) 在基于IOS的交換機上配置 VTP模式:switch# vla n databaseswitch(vla n)# vtp domai n doma in-n ameswitch(vla n)# vtp sever|cile nt|tra nspare ntswitch(vla n)# vtp password password在基于CLI的交換機上配置 VTP模式:switch(enable) set vtp domain domain-name mode s
溫馨提示
- 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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度競業(yè)協(xié)議失效一個月競業(yè)限制解除補償合同
- 二零二五年度大型商場裝修合同(含室內(nèi)外環(huán)境美化)
- 二零二五年度特色主題展臺設(shè)計制作安裝一體化合同
- 二零二五年度紋身技藝培訓(xùn)與加盟合作協(xié)議
- 二零二五年度新能源產(chǎn)業(yè)臨時研發(fā)人員服務(wù)協(xié)議
- 2025年度網(wǎng)絡(luò)安全防護合同價款調(diào)整與網(wǎng)絡(luò)安全事件應(yīng)對
- 二零二五年度虛擬現(xiàn)實產(chǎn)業(yè)利潤分配協(xié)議書
- 二零二五年度搏擊教練員免責責任書
- 農(nóng)業(yè)現(xiàn)代化技術(shù)推廣合作協(xié)議
- 智能建筑系統(tǒng)合同
- 2025年度專業(yè)酒店裝修承攬合同
- 2025年度5G基站建設(shè)勞務(wù)合同范本
- (完整版)班主任量化考核細則
- 2025年中國鐵路鄭州局集團有限公司招聘筆試參考題庫含答案解析
- 2025年上半年永春縣農(nóng)文旅發(fā)展集團限公司公開招聘若干名工作人員易考易錯模擬試題(共500題)試卷后附參考答案
- 家庭康復(fù)服務(wù)的商業(yè)價值與發(fā)展趨勢
- 2025年危化企業(yè)安全教育培訓(xùn)計劃
- 《HR的成長之路》課件
- 2025年山東浪潮集團有限公司招聘筆試參考題庫含答案解析
- 裝修完成情況報告范文
- 2024-2024年上海市高考英語試題及答案
評論
0/150
提交評論