




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、12VLAN的應用背景及實現(xiàn)功能的應用背景及實現(xiàn)功能v【背景描述】某企業(yè)有兩個主要部門:技術部和銷售部,其中銷售部門的個人計算機系統(tǒng)分散連接,也就有一名銷售部的工作人員在技術部的辦公室,他的電腦連接在技術部的交換機上。技術部之間、銷售部之間需要相互進行通信,但為了數據安全起見,技術部和銷售部需要進行相互隔離。v【拓撲圖如下:】3技術需求技術需求v同一個部門的主機在同一個局域網上,并且部門內的數據流量不希望其他部門收到,也不希望干擾其他部門,也就是要求同一個部門在同一個“廣播域”上。v顯然對于以上的物理拓撲,所有主機通過交換機相連,處在同一個廣播域(沒有劃分VLAN的交換機上的各個端口上的設備分
2、別屬于不同的沖突域,每一交換端口構成一個沖突域,但同屬于一個廣播域)。如A1和A3之間的廣播,A2、B1、B2也會收到,這不是我們所希望的。4不加限制,會產生廣播風暴問題不加限制,會產生廣播風暴問題5需求導致了需求導致了VLAN的產生的產生v需要有一種辦法,在盡量不改動網絡固有配置的前提下,通過靈活的、標準的、基于軟件的做法將具有相同需求的用戶放到一起,使之就象在一個LAN中那樣工作。v它不但能夠在物理上使網絡延伸,還能使對網絡實施更靈活強大的控制功能成為可能。vVLAN的出現(xiàn)使之成為可能。6VLAN簡介簡介v沖突域和廣播域交換機能隔離沖突域,但不能隔離廣播域,通過多個交換機連接在一起的所有計
3、算機都在一個廣播域中,任何一臺計算機發(fā)送的廣播包,其他計算機都會收到,這樣大大降低了帶寬的利用率。VLAN(Virtual LAN)可以隔離廣播域,VLAN工作在OSI模型的第2層,是交換機端口的邏輯組合。vVLAN的主要優(yōu)點廣播風暴防范安全性能提高提高管理效率7VLAN的劃分的劃分v基于端口的VLAN在這種定義方法中,某個交換機上的端口(例如端口1、3、5)構成VLAN A,而該交換機上的其他端口構成VLAN B。早期基于端口的VLAN成員只能位于一個交換機中。第二代基于端口的VLAN支持多個交換機,例如交換機X上的端口1和端口2與交換機Y上的端口3和端口4構成一個VLAN。v基于MAC地址
4、的VLAN在這種定義方法中,若干個MAC地址構成VLAN成員。用戶屬于哪個VLAN由其網卡中的MAC地址決定。8Trunk簡介簡介vVLAN可以把在同一個交換機上端口組合成一個VLAN,也可以不同交換機上的端口組合成一個VLAN。當一個VLAN跨過不同的交換機時,在同一個VLAN上但是接在不同的交換機上的計算機如何實現(xiàn)通信?9VLAN標記技術標記技術v直觀的方法是為每一個VLAN增加連線,這樣多個VLAN會占用太多接口。v可以采用Trunk技術實現(xiàn)跨交換機的VLAN內通信,Trunk技術使得在一條物理線路上可以傳遞多個VLAN的信息。v為了區(qū)別多個VLAN的數據幀,需要某種標記技術。有兩種常見
5、的Trunk幀標記技術:ISL和IEEE 802.1Q。ISL技術在原有的幀上重新加了一個幀頭,并重新生產了幀校驗序列(FCS)。ISL是思科特有的技術。IEEE 802.1Q技術是在原有幀的源MAC地址字段后插入4字節(jié)的標記字段,同時用心的CRC字段替代了原有的CRC字段。IEEE 802.1Q是國際標準。10采用采用ISL的的Trunkv使用ASIC執(zhí)行v對計算機透明,計算機看不到ISL頭部v可以在交換機與交換機之間、交換機與路由器之間使用11ISL幀格式幀格式v封裝技術(Encapsulated)v協(xié)議無關的(Protocol independent)v將原有的幀封裝在新的幀中12采用采
6、用802.1Q的的Trunk13802.1Q幀格式幀格式v標記技術(Tagged)v協(xié)議相關的(Protocol dependent)v在原有幀中添加一個字段14采用采用Trunk技術實現(xiàn)了技術實現(xiàn)了VLAN的跨計算機通信的跨計算機通信15DTP(Dynamic Trunk Protocol)簡介)簡介v管理員可以手動指定交換機之間的鏈路是否形成Trunk,也可以讓交換機自動協(xié)商,這個協(xié)議稱為DTP,DTP還可以協(xié)商Trunk鏈路的封裝類型。v配置了DTP的交換機會發(fā)送DTP協(xié)商包,或者對對方發(fā)送來的DTP包進行響應,雙方最終商討他們之間的鏈路是否形成Trunk,以及采用什么樣的Trunk封裝
7、方式。vCisco網絡設備支持動態(tài)協(xié)商端口的工作狀態(tài)。v根據動態(tài)協(xié)議的實現(xiàn)方式,Cisco網絡設備接口有多種不同的工作模式。16交換機接口模式交換機接口模式vcisco網絡中,交換機在局域網中最終穩(wěn)定狀態(tài)的接口類型主要有四種:access / trunk / multi / dot1q-tunnel。v1、access: 主要用來接入終端設備,如PC機、服務器、打印服務器等。v2、trunk: 主要用在連接其它交換機,以便在線路上承載多個VLAN。v3、multi: 在一個線路中承載多個vlan,但不像trunk,它不對承載的數據打標簽。主要用于接入支持多vlan的服務器或者一些網絡分析設備。
8、現(xiàn)在基本不使用此類接口,在Cisco的網絡設備中,也基本不支持此類接口了。v4、dot1q-tunnel: 用在Q-in-Q隧道配置中。17Cisco交換機接口模式的設置交換機接口模式的設置v1、switchport mode access:強制接口成為access接口,并且可以與對方主動進行協(xié)商,誘使對方成為access模式。v2、switchport mode trunk:強制接口成為trunk接口,并且主動誘使對方成為trunk模式,所以當鄰居交換機接口為trunk/desirable/auto時會成為Trunk接口。v3、switchport mode dynamic desirabl
9、e:主動協(xié)商建立trunk,發(fā)送并接收DTP信號。如果鄰居交換機模式為trunk/desirable/auto之一,則接口將變成trunk接口。如果不能形成trunk模式,則工作在access模式。v4、switchport mode dynamic auto:被動協(xié)商建立trunk,只接收不發(fā)送DTP信號。當鄰居接口為trunk/desirable之一時,才會成為trunk。如果不能形成trunk模式,則工作在access模式。v5、switchport nonegotiate:嚴格的說,這不算是種接口模式,它的作用只是阻止交換機接口發(fā)出DTP數據包,它必須與switchport mode
10、trunk或者switchport mode access一起使用。v6、switchport mode dot1q-tunnel:配置交換機接口為隧道接口(非trunk),以便與用戶交換機的trunk接口形成不對稱鏈路。18VLAN實驗實驗v【實驗目的】了解VLAN交換機的特性與應用場合掌握VLAN交換機組網的基本配置方法v【實驗環(huán)境】:模擬軟件 Cisco Packet Tracer 5.2Packet Tracer是思科公司為網絡學員認證學習而開發(fā)的一套用來設計、配置和排除故障的網絡模擬系統(tǒng),目前最新版本為5.2。該軟件支持大量的設備仿真模型:路由器、交換機、無線網絡設備、服務器、各種連
11、接電纜、終端等,還能仿真各種模塊,這在實際實驗設備中是無法配置齊全的。對設備均提供圖型化和終端兩種配置方法,各設備模型均有可視化的外觀仿真。19VLAN實驗內容實驗內容v實驗器材:3560交換機2臺,PC機5臺,連接線若干。v網絡拓撲圖如下:v圖中:A1、A2、A3連接在Switch1上,B1、B2連接在Switch2上。v假定應用場景是A1、A3屬于技術部,B1、B2、A2屬于銷售部,要求同一部門的主機在同一個局域網上。20VLAN實驗內容實驗內容Switch1 InterfacesSwitch1 InterfacesSwitch2 InterfacesSwitch2 InterfacesF
12、romFromToToFromFromToToFastEthernet FastEthernet 0/10/1A1A1FastEthernet FastEthernet 0/10/1B1B1FastEthernet FastEthernet 0/20/2A2A2FastEthernet FastEthernet 0/20/2B2B2FastEthernet FastEthernet 0/30/3A3A3FastEthernet FastEthernet 0/110/11Switch1, Switch1, FastEthernet FastEthernet 0/110/11FastEtherne
13、t FastEthernet 0/110/11Switch2, Switch2, FastEthernet FastEthernet 0/110/11v交換機端口連接配置PCPC主機主機IPIP地址地址子網掩碼子網掩碼A1A1192.168.1.1192.168.1.1255.255.255.0255.255.255.0A2A2192.168.1.2192.168.1.2255.255.255.0255.255.255.0A3A3192.168.1.3192.168.1.3255.255.255.0255.255.255.0B1B1192.168.1.4192.168.1.4255.255.2
14、55.0255.255.255.0B2B2192.168.1.5192.168.1.5255.255.255.0255.255.255.0v主機IP地址配置21配置各臺主機配置各臺主機v配置主機IP地址點擊 主機 圖標,在彈出的窗口中,點擊“Desktop”選項卡,在“IP Configuration”里直接配置IP地址和子網掩碼?;蛘咴凇癈ommand Prompt”里,輸入命令 ipconfig ip_addr net_maskv配置完主機IP地址,回答【問題1】:每臺主機相互ping,查看哪些主機可以連通,哪些不可以?為什么?注:可以用 ping -n 1 255.255.255.255
15、 發(fā)起一個受限廣播,(參數 -n 1指明只發(fā)送一次,免得默認發(fā)送4次受到干擾),觀察都收到了哪些主機的回復?22在交換機上配置在交換機上配置VLANvVLAN配置如下:VLAN numVLAN numVLAN nameVLAN nameSwitch portSwitch port2 2techtechSwitch1, port 1, 3Switch1, port 1, 33 3salessalesSwitch1, port2; Switch2, port1, 2Switch1, port2; Switch2, port1, 2v點擊 交換機 圖標,在彈出的窗口中,點擊“CLI”,進入交換機配置
16、終端。23在在Switch上創(chuàng)建上創(chuàng)建VLANv在Switch1上創(chuàng)建VLANv進入特權模式:Switchenablev進入VLAN配置模式:Switch#vlan databaseSwitch(vlan)#vlan 2 name techSwitch(vlan)#vlan 3 name salesSwitch(vlan)#exitv進入全局設置模式Switch#configure terminal24在在Switch上創(chuàng)建上創(chuàng)建VLANv將Switch1的各端口劃分在VLAN中Switch(config)#interface FastEthernet 0/1Switch(config-if)
17、#switchport mode accessSwitch(config-if)#switchport access vlan 2Switch(config-if)#interface FastEthernet 0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 3Switch(config-if)#interface FastEthernet 0/3Switch(config-if)#switchport mode accessSwitch(config-if)#switchp
18、ort access vlan 225在在Switch上創(chuàng)建上創(chuàng)建VLANv配置與Switch2連接的Trunk接口Switch(config-if)#interface FastEthernet 0/11Switch(config-if)#switchport mode trunkv在Switch2上創(chuàng)建VLANSwitchenableSwitch#vlan database Switch(vlan)#vlan 3 name salesSwitch(vlan)#exitSwitch#configure terminal26在在Switch上創(chuàng)建上創(chuàng)建VLANv將Switch2的各端口劃分在V
19、LAN中Switch(config)#interface FastEthernet 0/1Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 3Switch(config-if)#interface FastEthernet 0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 3v配置與Switch1連接的Trunk接口Switch(config-if)#interfac
20、e FastEthernet 0/11Switch(config-if)#switchport mode trunk27實驗結果實驗結果v在Switch1上用 show vlan 查看VLAN信息VLAN Name Status Ports- - - -1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7 Fa0/8, Fa0/9, Fa0/10, Fa0/12 Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22, Fa0/23, Fa0/24 Gig0/1,
21、 Gig0/22 tech active Fa0/1, Fa0/33 sales active Fa0/21002 fddi-default act/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 en
22、et 100002 1500 - - - - - 0 03 enet 100003 1500 - - - - - 0 01002 fddi 101002 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- - - -28實驗結果實驗結果v在Switch1上用 show interfaces
23、FastEthernet 0/1 switchport 查看端口信息Name: Fa0/1Switchport: EnabledAdministrative Mode: static accessOperational Mode: static accessAdministrative Trunking Encapsulation: dot1qOperational Trunking Encapsulation: nativeNegotiation of Trunking: OffAccess Mode VLAN: 2 (tech)Trunking Native Mode VLAN: 1 (d
24、efault)Voice VLAN: noneAdministrative private-vlan host-association: noneAdministrative private-vlan mapping: noneAdministrative private-vlan trunk native VLAN: noneAdministrative private-vlan trunk encapsulation: dot1qAdministrative private-vlan trunk normal VLANs: noneAdministrative private-vlan t
25、runk private VLANs: noneOperational private-vlan: noneTrunking VLANs Enabled: AllPruning VLANs Enabled: 2-1001Capture Mode DisabledCapture VLANs Allowed: ALLProtected: falseUnknown unicast blocked: disabledUnknown multicast blocked: disabledAppliance trust: none29實驗結果實驗結果v在Switch1上用 show interfaces
26、FastEthernet 0/2 switchport 查看端口信息Name: Fa0/2Switchport: EnabledAdministrative Mode: static accessOperational Mode: static accessAdministrative Trunking Encapsulation: dot1qOperational Trunking Encapsulation: nativeNegotiation of Trunking: OffAccess Mode VLAN: 3 (sales)Trunking Native Mode VLAN: 1 (
27、default)Voice VLAN: noneAdministrative private-vlan host-association: noneAdministrative private-vlan mapping: noneAdministrative private-vlan trunk native VLAN: noneAdministrative private-vlan trunk encapsulation: dot1qAdministrative private-vlan trunk normal VLANs: noneAdministrative private-vlan
28、trunk private VLANs: noneOperational private-vlan: noneTrunking VLANs Enabled: AllPruning VLANs Enabled: 2-1001Capture Mode DisabledCapture VLANs Allowed: ALLProtected: falseUnknown unicast blocked: disabledUnknown multicast blocked: disaAppliance trust: none30實驗結果實驗結果v在Switch1上用 show interfaces Fas
29、tEthernet 0/11 switchport查看端口信息Name: Fa0/11Switchport: EnabledAdministrative Mode: trunkOperational Mode: trunkAdministrative Trunking Encapsulation: dot1qOperational Trunking Encapsulation: dot1qNegotiation of Trunking: OnAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Voice VLAN
30、: noneAdministrative private-vlan host-association: noneAdministrative private-vlan mapping: noneAdministrative private-vlan trunk native VLAN: noneAdministrative private-vlan trunk encapsulation: dot1qAdministrative private-vlan trunk normal VLANs: noneAdministrative private-vlan trunk private VLAN
31、s: noneOperational private-vlan: noneTrunking VLANs Enabled: AllPruning VLANs Enabled: 2-1001Capture Mode DisabledCapture VLANs Allowed: ALLProtected: falseUnknown unicast blocked: disabledUnknown multicast blocked: disabledAppliance trust: none31實驗結果實驗結果v在Switch2上用 show vlan 查看VLAN信息VLAN Name Statu
32、s Ports- - - -1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/12, Fa0/13, Fa0/14, Fa0/15 Fa0/16, Fa0/17, Fa0/18, Fa0/19 Fa0/20, Fa0/21, Fa0/22, Fa0/23 Fa0/24, Gig0/1, Gig0/23 sales active Fa0/1, Fa0/21002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddin
33、et-default act/unsup 1005 trnet-default act/unsup VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2- - - - - - - - - - -1 enet 100001 1500 - - - - - 0 03 enet 100003 1500 - - - - - 0 01002 fddi 101002 1500 - - - - - 0 0 1003 tr 101003 1500 - - - - - 0 0 1004 fdnet 101004 1500 - -
34、- ieee - 0 0 1005 trnet 101005 1500 - - - ibm - 0 0 Remote SPAN VLANs-Primary Secondary Type Ports- - - -32實驗結果實驗結果v在Switch2上用 show interfaces FastEthernet 0/1 switchport 查看端口信息Name: Fa0/1Switchport: EnabledAdministrative Mode: static accessOperational Mode: static accessAdministrative Trunking Enca
35、psulation: dot1qOperational Trunking Encapsulation: nativeNegotiation of Trunking: OffAccess Mode VLAN: 3 (sales)Trunking Native Mode VLAN: 1 (default)Voice VLAN: noneAdministrative private-vlan host-association: noneAdministrative private-vlan mapping: noneAdministrative private-vlan trunk native V
36、LAN: noneAdministrative private-vlan trunk encapsulation: dot1qAdministrative private-vlan trunk normal VLANs: noneAdministrative private-vlan trunk private VLANs: noneOperational private-vlan: noneTrunking VLANs Enabled: AllPruning VLANs Enabled: 2-1001Capture Mode DisabledCapture VLANs Allowed: AL
37、LProtected: falseUnknown unicast blocked: disabledUnknown multicast blocked: disabledAppliance trust: none33實驗結果實驗結果v在Switch2上用 show interfaces FastEthernet 0/11 switchport 查看端口信息Name: Fa0/11Switchport: EnabledAdministrative Mode: trunkOperational Mode: trunkAdministrative Trunking Encapsulation: do
38、t1qOperational Trunking Encapsulation: dot1qNegotiation of Trunking: OnAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Voice VLAN: noneAdministrative private-vlan host-association: noneAdministrative private-vlan mapping: noneAdministrative private-vlan trunk native VLAN: noneAdmi
39、nistrative private-vlan trunk encapsulation: dot1qAdministrative private-vlan trunk normal VLANs: noneAdministrative private-vlan trunk private VLANs: noneOperational private-vlan: noneTrunking VLANs Enabled: AllPruning VLANs Enabled: 2-1001Capture Mode DisabledCapture VLANs Allowed: ALLProtected: f
40、alseUnknown unicast blocked: disabledUnknown multicast blocked: disabledAppliance trust: none34查看各臺主機的連通性查看各臺主機的連通性v在配置VLAN之后,回答【問題2】:每臺主機相互ping,查看哪些主機可以連通,哪些不可以?為什么?注:可以用 ping -n 1 255.255.255.255 發(fā)起一個受限廣播,(參數 -n 1指明只發(fā)送一次,免得默認發(fā)送4次受到干擾),觀察都收到了哪些主機的回復?35DTP的配置的配置 v將Switch1的FastEthernet 0/11接口的Trunk配置
41、為desirable模式:Switch1(config)#interface FastEthernet 0/11Switch1(config-if)#shutdownSwitch1(config-if)#switchport mode dynamic desirable Switch1(config-if)#no shutdown v將Switch2的FastEthernet 0/11接口的Trunk配置為auto模式:Switch2(config)#interface FastEthernet 0/11Switch2(config-if)#shutdownSwitch2(config-if)
42、#switchport mode dynamic autoSwitch2(config-if)#no shutdown36實驗結果實驗結果v在Switch1上用 show interfaces FastEthernet 0/11 switchport查看端口信息Name: Fa0/11Switchport: EnabledAdministrative Mode: dynamic desirableOperational Mode: trunkAdministrative Trunking Encapsulation: dot1qOperational Trunking Encapsulatio
43、n: dot1qNegotiation of Trunking: OnAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Voice VLAN: noneAdministrative private-vlan host-association: noneAdministrative private-vlan mapping: noneAdministrative private-vlan trunk native VLAN: noneAdministrative private-vlan trunk encaps
44、ulation: dot1qAdministrative private-vlan trunk normal VLANs: noneAdministrative private-vlan trunk private VLANs: noneOperational private-vlan: noneTrunking VLANs Enabled: AllPruning VLANs Enabled: 2-1001Capture Mode DisabledCapture VLANs Allowed: ALLProtected: falseUnknown unicast blocked: disable
45、dUnknown multicast blocked: disabledAppliance trust: none37實驗結果實驗結果v在Switch2上用 show interfaces FastEthernet 0/11 switchport 查看端口信息Name: Fa0/11Switchport: EnabledAdministrative Mode: dynamic autoOperational Mode: trunkAdministrative Trunking Encapsulation: dot1qOperational Trunking Encapsulation: dot1qNegotiation of Trunking: OnAccess Mode VLAN: 1 (defaul
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 深化文化國企改革的心得體會
- 2024年秋季九年級語文考核方案計劃
- 高校師生學習傳承紅色基因心得體會
- 六年級下冊綜合實踐活動課本使用計劃
- 二年級學生責任感培養(yǎng)計劃
- 學生違紀處罰執(zhí)行計劃
- 發(fā)熱學生數據統(tǒng)計流程
- 以客戶為導向:重慶水運口岸績效多維剖析與提升策略
- 2024-2025年蘇教版小學數學四年級上冊教學資源計劃
- 高校后勤服務輿情應對職責
- GB/T 5161-2014金屬粉末有效密度的測定液體浸透法
- 建筑工程公司安全生產責任制度
- 變電站交、直流系統(tǒng)培訓課件
- 被執(zhí)行人財產申報表
- 人教版五年級語文(下冊)期末試卷(附答案)
- [北京]輸變電工程標準工藝應用圖冊(圖文并茂)
- 信用修復申請書
- 深圳房地產開發(fā)企業(yè)資質申報表
- 美變出廠檢驗記錄
- 2020年雀巢公司北京總部十周年慶典暨雀巢家庭日活動策劃案ppt課件
- UPS電源施工方案
評論
0/150
提交評論