




版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、一、實(shí)驗(yàn)?zāi)繕?biāo) 理解虛擬 LAN(VLAN)基本原理; 掌握一般交換機(jī)按端口劃分 VLAN的配置方法; 掌握Tag VLAN配置方法。二、實(shí)驗(yàn)背景某一公司內(nèi)財(cái)務(wù)部、銷(xiāo)售部的PC通過(guò)2臺(tái)交換機(jī)實(shí)現(xiàn)通信;要求財(cái)務(wù)部和銷(xiāo)售部?jī)?nèi)的PC可以互通,但為了數(shù)據(jù)安全起見(jiàn),銷(xiāo)售部和財(cái)務(wù)部需要進(jìn)行隔離,現(xiàn)要在交換機(jī)上做適當(dāng)配置來(lái)實(shí)現(xiàn)這一目的。三、技術(shù)原理 VLAN是指在一個(gè)物理網(wǎng)段內(nèi),進(jìn)行邏輯的劃分,劃分成若干個(gè)虛擬局域網(wǎng)。VLAN最大的特性是不受物理位置的限制,可以進(jìn)行靈活的劃分。VLAN具備了一個(gè)物理網(wǎng)段所具備的特性。相同VLAN內(nèi)的主機(jī)可以相互直接通信,不同VLAN間的主機(jī)之間互相訪(fǎng)問(wèn)必須經(jīng)由路由設(shè)備進(jìn)行轉(zhuǎn)發(fā)
2、。廣播數(shù)據(jù)包只可以在本VLAN內(nèi)進(jìn)行廣播,不能傳輸?shù)狡渌鸙LAN中。 Port VLAN是實(shí)現(xiàn)VLAN的方式之一,它利用交換機(jī)的端口進(jìn)行VLAN的劃分,一個(gè)端口只能屬于一個(gè)VLAN。 Tag VLAN是基于交換機(jī)端口的另外一種類(lèi)型,主要用于使交換機(jī)的相同VLAN內(nèi)的主機(jī)之間可以直接訪(fǎng)問(wèn),同時(shí)對(duì)于不同VLAN的主機(jī)進(jìn)行隔離。Tag VLAN遵循IEEE802.1Q協(xié)議的標(biāo)準(zhǔn)。在使用配置了Tag VLAN的端口進(jìn)行數(shù)據(jù)傳輸時(shí),需要在數(shù)據(jù)幀內(nèi)添加4個(gè)字節(jié)的802.1Q標(biāo)簽信息,用于標(biāo)示該數(shù)據(jù)幀屬于哪個(gè)VLAN,便于對(duì)端交換機(jī)收到數(shù)據(jù)幀后進(jìn)行準(zhǔn)確的過(guò)濾。四、實(shí)驗(yàn)步驟實(shí)驗(yàn)拓?fù)?、設(shè)置四臺(tái)PC機(jī)IP地址如
3、圖所示。2、對(duì)交換機(jī)S1進(jìn)行設(shè)置。SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S1 /設(shè)置主機(jī)名S1(config)#vlan 2 /劃分VLAN 2S1(config-vlan)#exitS1(config)#vlan 3 /劃分VLAN 3S1(config-vlan)#exitS1(config)#interface fa0/1S1(config-if)#switchport access vlan 2 /將fa0/1劃分到
4、VLAN 2S1(config-if)#exitS1(config)#interface fa0/2S1(config-if)#switchport access vlan 3 /將fa0/2劃分到VLAN 3S1(config-if)#exitS1(config)#interface fa0/24 /設(shè)置fa0/24端口模式為trunkS1(config-if)#switchport mode trunkS1(config-if)#endS1#%SYS-5-CONFIG_I: Configured from console by consoleS1#show vlan /查看VLAN劃分情況
5、VLAN Name Status Ports- - - -1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13, Fa0/14 Fa0/15, Fa0/16, Fa0/17, Fa0/18 Fa0/19, Fa0/20, Fa0/21, Fa0/22 Fa0/23, Gig1/1, Gig1/22 VLAN0002 active Fa0/13 VLAN0003 active Fa0/21002 fddi-default act/unsup1003 token-
6、ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsupVLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 TranS1- - - - - - - - - - -1 enet 100001 1500 - - - - - 0 02 enet 100002 1500 - - - - - 0 03 enet 100003 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 0
7、 1003 tr 101003 1500 - - - - - 0 0 1004 fdnet 101004 1500 - - - ieee - 0 0 1005 trnet 101005 1500 - - - ibm - 0 0 Remote SPAN VLANs-Primary Secondary Type Ports- - - -S1#show running-configBuilding configuration.Current configuration : 1080 bytes!version 12.2no service timestamps log datetime msecno
8、 service timestamps debug datetime msecno service password-encryption!hostname S1!interface FastEthernet0/1 switchport access vlan 2!interface FastEthernet0/2 switchport access vlan 3!interface FastEthernet0/3!.!interface FastEthernet0/24 switchport mode trunk!interface GigabitEthernet1/1!interface
9、GigabitEthernet1/2!interface Vlan1 no ip address shutdown!line con 0!line vty 0 4 loginline vty 5 15 login!endS1#3、對(duì)交換機(jī)S2進(jìn)行設(shè)置。SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S2S2(config)#vlan 2S2(config-vlan)#exitS2(config)#vlan 3S2(config-vla
10、n)#exitS2(config)#interface fa0/1S2(config-if)#switchport access vlan 2S2(config-if)#exitS2(config)#interface fa0/2S2(config-if)#switchport access vlan 3S2(config-if)#exitS2(config)#interface fa0/24S2(config-if)#switchport mode trunk S2(config-if)#endS2#%SYS-5-CONFIG_I: Configured from console by co
11、nsoleS2#show vlanVLAN Name Status Ports- - - -1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13, Fa0/14 Fa0/15, Fa0/16, Fa0/17, Fa0/18 Fa0/19, Fa0/20, Fa0/21, Fa0/22 Fa0/23, Gig1/1, Gig1/22 VLAN0002 active Fa0/13 VLAN0003 active Fa0/21002 fddi-default act
12、/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2- - - - - - - - - - -1 enet 100001 1500 - - - - - 0 02 enet 100002 1500 - - - - - 0 03 enet 100003 1500 - - - - - 0 01002 fddi 1010
13、02 1500 - - - - - 0 0 1003 tr 101003 1500 - - - - - 0 0 1004 fdnet 101004 1500 - - - ieee - 0 0 1005 trnet 101005 1500 - - - ibm - 0 0 Remote SPAN VLANs-Primary Secondary Type Ports- - - -S2#show running-config Building configuration.Current configuration : 1080 bytes!version 12.2no service timestam
14、ps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname S2!interface FastEthernet0/1 switchport access vlan 2!interface FastEthernet0/2 switchport access vlan 3!interface FastEthernet0/3!.!interface FastEthernet0/24 switchport mode trunk!interface Gigabit
15、Ethernet1/1!interface GigabitEthernet1/2!interface Vlan1 no ip address shutdown!line con 0!line vty 0 4 loginline vty 5 15 login!endS2#五、驗(yàn)證打開(kāi)PC1的Command PromptPacket Tracer PC Command Line 1.0PCipconfigIP Address.: 192.168.1.2Subnet Mask.: 255.255.255.0Default Gateway.: 192.168.1.1PCping 192.168.1.3
16、Pinging 192.168.1.3 with 32 bytes of data:Request timed out. /不同VLAN間無(wú)法PING通Request timed out.Request timed out.Request timed out.Ping statistics for 192.168.1.3: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), PCping 192.168.1.4Pinging 192.168.1.4 with 32 bytes of data:Reply from 192.168.1.4: bytes=32 time=172ms TTL=128 /相同VLAN可以PING通Reply from 192.168.1.4: bytes=32 time=78ms TTL=128Reply from 192.168.1.
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025建筑材料供需合同模板
- 2025商業(yè)店鋪轉(zhuǎn)讓合同協(xié)議書(shū)
- 2024年深圳市龍崗中心醫(yī)院招聘真題
- 2024年甘肅省三支一扶真題
- 融合XLM-R與詞典的多語(yǔ)言命名實(shí)體識(shí)別研究
- 健身旅游服務(wù)行業(yè)跨境出海項(xiàng)目商業(yè)計(jì)劃書(shū)
- DB1303T 159-2011 綠色食品番茄生產(chǎn)技術(shù)規(guī)程
- 大于小于的題目及答案
- 大染缸閱讀題目及答案
- 2025年動(dòng)漫產(chǎn)業(yè)創(chuàng)新驅(qū)動(dòng)政策效果評(píng)估與建議報(bào)告
- 用戶(hù)側(cè)儲(chǔ)能電站項(xiàng)目可行性研究報(bào)告(范文)
- 2024-2025學(xué)年滬教版(五四學(xué)制)(2024)初中英語(yǔ)六年級(jí)下冊(cè)(全冊(cè))知識(shí)點(diǎn)歸納
- 2025年綿陽(yáng)富樂(lè)中學(xué)小升初數(shù)學(xué)、語(yǔ)文入學(xué)考試題
- 知識(shí)圖譜與大語(yǔ)言模型在教育領(lǐng)域的應(yīng)用綜述
- 2025廣西桂盛金融信息科技服務(wù)有限公司專(zhuān)業(yè)技術(shù)人員常態(tài)化招聘筆試參考題庫(kù)附帶答案詳解
- 紅色經(jīng)典圖書(shū)出版行業(yè)深度調(diào)研及發(fā)展戰(zhàn)略咨詢(xún)報(bào)告
- 河南省五年中考(2020-2024)化學(xué)真題試卷含答案
- 音樂(lè)教學(xué)培訓(xùn)創(chuàng)業(yè)計(jì)劃
- (一模)2025年廣東省高三高考模擬測(cè)試一?;瘜W(xué)試卷(含官方答案)
- 2024年河南省開(kāi)封市小學(xué)五年級(jí)上學(xué)期期末英語(yǔ)試卷及答案指導(dǎo)
- 遙測(cè)技術(shù)優(yōu)化研究-深度研究
評(píng)論
0/150
提交評(píng)論