實(shí)驗(yàn)12 跨交換機(jī)實(shí)現(xiàn)VLAN_第1頁
實(shí)驗(yàn)12 跨交換機(jī)實(shí)現(xiàn)VLAN_第2頁
實(shí)驗(yàn)12 跨交換機(jī)實(shí)現(xiàn)VLAN_第3頁
實(shí)驗(yàn)12 跨交換機(jī)實(shí)現(xiàn)VLAN_第4頁
實(shí)驗(yàn)12 跨交換機(jī)實(shí)現(xiàn)VLAN_第5頁
全文預(yù)覽已結(jié)束

下載本文檔

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

文檔簡介

1、跨交換機(jī)實(shí)現(xiàn)VLAN【實(shí)驗(yàn)名稱】跨交換機(jī)實(shí)現(xiàn)VLAN。【實(shí)驗(yàn)?zāi)康摹坷斫饪缃粨Q機(jī)之間VLAN的特點(diǎn)。【背景描述】假設(shè)某企業(yè)有兩個主要部門:銷售部和技術(shù)部,其中銷售部門的個人計(jì)算機(jī)系統(tǒng)分散連接,他們之間需要相互進(jìn)行通信,但為了數(shù)據(jù)安全起見,銷售部和技術(shù)部需要進(jìn)行相互隔離,現(xiàn)要在交換機(jī)上做適當(dāng)配置來實(shí)現(xiàn)這一目標(biāo)?!炯夹g(shù)原理】Tag Vlan是基于交換機(jī)端口的另外一種類型,主要用于實(shí)現(xiàn)跨交換機(jī)的相同VLAN內(nèi)主機(jī)之間可以直接訪問,同時對于不同VLAN的主機(jī)進(jìn)行隔離。Tag Vlan遵循了IEEE802.q協(xié)議的標(biāo)準(zhǔn)。在利用配置了Tag Vlan的接口進(jìn)行數(shù)據(jù)傳輸時,需要在數(shù)據(jù)幀內(nèi)添加4個字節(jié)的802.

2、q標(biāo)簽信息,用于標(biāo)識該數(shù)據(jù)幀屬于哪個VLAN,以便于對端交換機(jī)接收到數(shù)據(jù)幀后進(jìn)行準(zhǔn)確的過濾?!緦?shí)現(xiàn)功能】使在同一VLAN里的計(jì)算機(jī)系統(tǒng)能跨交換機(jī)進(jìn)行互相通信,而在不同VLAN里的計(jì)算機(jī)系統(tǒng)不能進(jìn)行相互通信?!緦?shí)驗(yàn)設(shè)備】Cisco交換機(jī)(2臺)、主機(jī)(3臺)、直連線(4條)【實(shí)驗(yàn)拓?fù)洹繉?shí)驗(yàn)時,按照拓?fù)鋱D進(jìn)行網(wǎng)絡(luò)的連接,注意主機(jī)和交換機(jī)連接的端口?!緦?shí)驗(yàn)步驟】步驟1.在交換機(jī)SWA上創(chuàng)建Vlan 10,并將0/2端口劃分到Vlan 10中。Switch#config terminalSwitch(config)#hostname SWASWA(config)#vlan 10 SWA(config-

3、vlan)#name salesSWA(config-vlan)#exitSWA(config)#interface fastethernet 0/2SWA(config-if)#switchport access vlan 10驗(yàn)證測試:驗(yàn)證已創(chuàng)建了Vlan 10,并將端口已劃分到Vlan 10中。SWA#show vlan id 10VLAN Name Status Ports- - - -10 sales active Fa0/2步驟2.在交換機(jī)SWA上創(chuàng)建Vlan 20,并將0/12端口劃分到Vlan 20中。SWA(config)#vlan 20 SWA(config-vlan)#n

4、ame technicalSWA(config-vlan)#exitSWA(config)#interface fastethernet 0/12SWA(config-if)#switchport access vlan 20驗(yàn)證測試:驗(yàn)證已創(chuàng)建了Vlan 20,并將端口已劃分到Vlan 20中。SWA#show vlan id 20VLAN Name Status Ports- - - -20 technical active Fa0/12步驟3.把交換機(jī)SWA與交換機(jī)SWB相連的端口(0/1端口)定義為tag vlan模式。SWA(config)#interface fastetherne

5、t 0/1SWA(config-if)#switchport mode trunk!將fastethernet 0/1端口設(shè)置為tag vlan模式。驗(yàn)證測試:驗(yàn)證fastethernet 0/1端口已設(shè)置為tag vlan模式。SWA#show interfaces fastethernet 0/1 switchport Name: Fa0/1Switchport: EnabledAdministrative mode: trunkOperational mode: trunkAdministrative Trunking Encapsulation: dot1qNegotiation of

6、 Trunking: OnAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Trunking VLANs Enabled: ALLPruning VLANs Enabled: 2-1001Protected: falseVoice vlan: none (Inactive)Appliance trust: none步驟4.在交換機(jī)SWB上創(chuàng)建Vlan10,并將鍛0/2端口劃分到Vlan 10中。Switch#config terminalSwitch(config)#hostname SWBSWB(config

7、)#vlan 10SWB(config-vlan)#name salesSWB(config-vlan)#exitSWB(config)#interface fastethernet 0/2SWB(config-if)#switchport access vlan 10驗(yàn)證測試:驗(yàn)證已在上創(chuàng)建了Vlan 10,并將端口已劃分到Vlan 10中。SWB#show vlan id 10VLAN Name Status Ports- - - -10 sales active Fa0/2步驟5.把交換機(jī)SWB與交換機(jī)SWA相連的端口(0/1端口)定義為tag vlan模式。SWB(config)#in

8、terface fastethernet 0/1SWB(config-if)#switchport mode trunk驗(yàn)證測試:驗(yàn)證fastethernet 0/1端口已設(shè)置為tag vlan模式。SWB#show interface fastethernet 0/1 switchport Name: Fa0/1Switchport: EnabledAdministrative mode: trunkOperational mode: trunkAdministrative Trunking Encapsulation: dot1qNegotiation of Trunking: OnAcc

9、ess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Trunking VLANs Enabled: ALLPruning VLANs Enabled: 2-1001Protected: falseVoice vlan: none (Inactive)Appliance trust: none步驟6.驗(yàn)證PC1與PC3能互相通信,但PC2 與PC3不能互相通信。C:ping 192.168.1.30 !在的命令行方式下驗(yàn)證能通Pinging 192.168.1.30 with 32 bytes of data:Reply

10、 from 192.168.1.30: bytes=32 time=60ms TTL=241Reply from 192.168.1.30: bytes=32 time=60ms TTL=241Reply from 192.168.1.30: bytes=32 time=60ms TTL=241Reply from 192.168.1.30: bytes=32 time=60ms TTL=241Reply from 192.168.1.30: bytes=32 time=60ms TTL=241Ping statistics for 192.168.1.30: Packets: Sent =

11、5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55msC:ping 192.168.1.30 !在的命令行方式下驗(yàn)證不能通Pinging 192.168.1.30 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Request timed out.Ping

12、 statistics for 192.168.1.30: Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms【注意事項(xiàng)】1、 兩臺交換機(jī)之間相連的端口應(yīng)該設(shè)置為tag vlan模式。2、 Trunk接口在默認(rèn)情況下支持所有的傳輸?!緟⒖寂渲谩縎WA#show running-config !顯示交換機(jī)的全部配置!Version 12.1service tim

13、estamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname SWA!ip subnet-zerospanning-tree extend system-id!interface FastEthernet0/1 !將F0/1設(shè)為TRUNK,支持TAG VLANswitchport mode trunk!interface FastEthernet0/2 !將F0/2加入vlan 10switchport access vlan 10!interface FastEthernet0

14、/12 !將F0/12加入vlan 20 switchport access vlan 20!interface Vlan 1 no ip address no ip route-cache!vlan 10 name sales !創(chuàng)建vlan 10vlan 20 name technical !創(chuàng)建vlan 20!endSWB#show running-config !顯示交換機(jī)SWB的全部配置!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname SWB!ip subnet-zerospanning-tree extend system

溫馨提示

  • 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

提交評論