-
當(dāng)前位置:首頁 > 創(chuàng)意學(xué)院 > 營銷推廣 > 專題列表 > 正文
- 在做單臺交換機(jī)下實現(xiàn)VLAN實驗時要注意哪些問題
- 華為交換機(jī)VLAN怎么配置?
- 計算機(jī)網(wǎng)絡(luò)實驗的實驗報告 包括實驗2Mac幀、IP包格式分析試驗 3交換機(jī) VLAN 劃分實驗4路由器靜態(tài)路由配置
- 任務(wù)4-1:配置跨交換機(jī)實現(xiàn) VLAN方式操作
計算機(jī)網(wǎng)絡(luò)vlan配置實驗(計算機(jī)網(wǎng)絡(luò)vlan配置實驗報告)
大家好!今天讓創(chuàng)意嶺的小編來大家介紹下關(guān)于計算機(jī)網(wǎng)絡(luò)vlan配置實驗的問題,以下是小編對此問題的歸納整理,讓我們一起來看看吧。
開始之前先推薦一個非常厲害的Ai人工智能工具,一鍵生成原創(chuàng)文章、方案、文案、工作計劃、工作報告、論文、代碼、作文、做題和對話答疑等等
只需要輸入關(guān)鍵詞,就能返回你想要的內(nèi)容,有小程序、在線網(wǎng)頁版、PC客戶端和批量生成器
問友Ai官網(wǎng):https://ai.de1919.com。
本文目錄:
在做單臺交換機(jī)下實現(xiàn)VLAN實驗時要注意哪些問題
注意:以下實例中的IP地址需要根據(jù)實際情況自行更改。一、創(chuàng)建vlan,將端口加入vlan
<Quidway> system-view
[Quidway] vlan 20
[Quidway-vlan20]port e0/2 to e0/12
[Quidway] vlan 30
[Quidway-vlan30]port e0/13 to e0/24
二、配置vlan間路由,S5700是三層交換機(jī),給vlan接口配IP即可實現(xiàn)vlan間通信。所有加入vlan的計算機(jī)使用本vlan接口的IP作為網(wǎng)關(guān)地址。
[Quidway]interface vlan 20
[Quidway-Vlan-interface20]ip address 192.168.20.1 255.255.255.0
[Quidway]interface vlan 30
[Quidway-Vlan-interface30]ip address 192.168.30.1 255.255.255.0
三、配置路由器和交換機(jī)的聯(lián)通性。
[Quidway]interface vlan 1
[Quidway-Vlan-interface1]ip address 192.168.1.2 255.255.255.0
路由器連接交換機(jī)的接口配置IP為192.168.1.1
在S5700上配置默認(rèn)路由,指向地址為路由器和交換機(jī)互聯(lián)的接口
[Quidway]ip route-static 0.0.0.0 0.0.0.0 192.168.1.1
在路由器上配置兩條靜態(tài)路由,指明vlan20和vlan30網(wǎng)絡(luò)的位置
[Quidway]ip route-static 192.168.20.0 255.255.255. 0 192.168.1.2
[Quidway]ip route-static 192.168.30.0 255.255.255. 0 192.168.1.2
華為交換機(jī)VLAN怎么配置?
華為交換機(jī)VLAN配置:system veiw (進(jìn)入系統(tǒng)視圖)
vlan 10(創(chuàng)建vlan 10)
vlan batch 10 to 12 (創(chuàng)建vlan 10 11 12)
interface vlan 10 (進(jìn)入VLAN 10)
ip address 172.16.10.1 24(設(shè)置VLAN 10的IP為172.16.10.1,掩碼為24位)
undo vlan 10 (刪除vlan 10)
VLAN(Virtual Local Area Network)的中文名為"虛擬局域網(wǎng)"。
虛擬局域網(wǎng)(VLAN)是一組邏輯上的設(shè)備和用戶,這些設(shè)備和用戶并不受物理位置的限制,可以根據(jù)功能、部門及應(yīng)用等因素將它們組織起來,相互之間的通信就好像它們在同一個網(wǎng)段中一樣,由此得名虛擬局域網(wǎng)。VLAN是一種比較新的技術(shù),工作在OSI參考模型的第2層和第3層,一個VLAN就是一個廣播域,VLAN之間的通信是通過第3層的路由器來完成的。與傳統(tǒng)的局域網(wǎng)技術(shù)相比較,VLAN技術(shù)更加靈活,它具有以下優(yōu)點: 網(wǎng)絡(luò)設(shè)備的移動、添加和修改的管理開銷減少;可以控制廣播活動;可提高網(wǎng)絡(luò)的安全性。
在計算機(jī)網(wǎng)絡(luò)中,一個二層網(wǎng)絡(luò)可以被劃分為多個不同的廣播域,一個廣播域?qū)?yīng)了一個特定的用戶組,默認(rèn)情況下這些不同的廣播域是相互隔離的。不同的廣播域之間想要通信,需要通過一個或多個路由器。這樣的一個廣播域就稱為VLAN。
計算機(jī)網(wǎng)絡(luò)實驗的實驗報告 包括實驗2Mac幀、IP包格式分析試驗 3交換機(jī) VLAN 劃分實驗4路由器靜態(tài)路由配置
交換機(jī)VLAN的劃分一.實驗?zāi)康?br/>通過本次實驗,掌握交換機(jī)VLAN的配置方法,理解VLAN的作用。(以D-LINK交換機(jī)DES-3526為例)
二. 實驗環(huán)境
1.軟硬件要求
· DES-3526一臺
· PC機(jī)兩臺
· RS-232 線一條
· 雙絞線若干
2. 環(huán)境示意圖,如圖9-16所示:
圖9-15
三.實驗步驟
(1).把交換機(jī)的控制口和PC的串口相連,通過超級終端進(jìn)入交換機(jī)的配置界面,如圖9-16所示:
圖9-16
這時,輸入用戶名和密碼,如果沒有用戶名和密碼,則按兩下回車,進(jìn)入可配置模式,如圖9-17所示:
圖9-17
在此模式下,我們可以對交換機(jī)進(jìn)行各種配置,由于是命令行模式,需要掌握一些常用命令,輸入“?”,敲回車鍵,能看到交換機(jī)所有的命令, 如圖9-18所示
圖9-18
2)通過以下命令創(chuàng)建VLAN10和VLAN20,如圖9-19所示
圖9-19
3)配置完成后,可以用show vlan命令查看配置情況,如圖9-20所示:
圖9-20
4)把兩臺PC分別連到VLAN10和VLAN20,用Ping命令進(jìn)行連通性測試,兩臺PC不能通訊。
5)把兩臺PC連到同一VLAN中,用Ping命令進(jìn)行連通性測試,兩臺PC能通訊。
六、實驗完畢
任務(wù)4-1:配置跨交換機(jī)實現(xiàn) VLAN方式操作
一、實驗環(huán)境:
1、兩臺CISCO WS-C2960X-24TS-L交換機(jī),交換機(jī)名稱分別為L2-SW、L3-SW,其中L2-SW作為網(wǎng)關(guān)使用。
2、三臺安裝windows 7電腦,計算機(jī)名分別為PC1、PC2、PC3,且微軟防火墻關(guān)閉。
3、網(wǎng)絡(luò)拓?fù)洌篖2-SW Fa0/1光纖連接L3-SW Fa0/1,PC1網(wǎng)線連接L3-SW Fa0/6,PC2網(wǎng)線連接L3-SW Fa0/11,PC3網(wǎng)線連接L2-SW Fa0/6。
4、VLAN:VLAN 10、VLAN20
5、ACL:VLAN10、VLAN20
6、IP地址規(guī)劃:
7、一臺安裝windows 7電腦,計算機(jī)名為PC-T,且?guī)OM接口的電腦(或USB轉(zhuǎn)COM線,且安裝好驅(qū)動)
二、實驗步驟:
1、用PC-T通過Console線連接到L2-SW,打開超級終端,建立連線。
2、修改交換機(jī)名、設(shè)置密碼
Switch>enable ? ? ? ? ? ?#進(jìn)特權(quán)模式
Switch#configure ? ? ? ?#進(jìn)入全局配置模式
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. ?End with CNTL/Z.
Switch(config)#hostname L2-SW ? ? ? #設(shè)置交換機(jī)名為L2-SW
L2-SW(config)#enable password cisco
L2-SW(config)#exit ? ? ? ? ? ? ? ? ? ? ? ? ? ? #退出全局配置模式,返回上一層
L2-SW#exit ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #退出特權(quán)模式
L2-SW>enable ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#輸入指令enable進(jìn)入特權(quán)模式,提示輸入密碼
Password:?
L2-SW#
3、開啟Telnet服務(wù)
L2-SW>enable
L2-SW#configure
L2-SW(config)#user cisco password cisco ? ? ?#設(shè)置用戶名和密碼
L2-SW(config)#enable password cisco ? ? ? ? ? #設(shè)置特權(quán)密碼,與用戶密碼是不同的
L2-SW(config)#line vty 0 4 ? ? ? ? ? ? ? ? ? ? ? ? ? ? #進(jìn)入vty接口
L2-SW(config-line)#login local ? ? ? ? ? ? ? ? ? ? ?#配置vty接口,使用本地數(shù)據(jù)庫用戶密碼登入
L2-SW(config-line)#end ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #返回全局配置模式
L2-SW#
4、開啟Web服務(wù)
L2-SW>enable
L2-SW#configure
L2-SW#ip http server ? ? ? #啟用Web管理(ip http secure-server啟用HTTPS安全連線)
L2-SW#ip http authentication local ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#設(shè)置口令驗證方式是本地驗證
L2-SW#username cisco privilege 15 password 0 cisco ? ? ?#在本地添加用戶名和密碼
L2-SW(config-line)#end ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #返回全局配置模式
L2-SW#
5、建立VLAN10、20
L2-SW>enable
L2-SW#vlan database ? ? ? ? ? ? ? ? ? ? ? ?#進(jìn)入vlan配置模式
L2-SW(vlan)#vlan 10 name VLAN10 ? ? ? ? ?#劃分vlan 10,名字為VLAN10
VLAN 10 added:
Name: VLAN10
L2-SW(vlan)#vlan 20 name VLAN20 ? ? ? ? ?#劃分vlan 20,名字為VLAN20
VLAN 20 added:
Name: VLAN20
L2-SW(vlan)#exit ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#返回特權(quán)模式
L2-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L2-SW(config)#interface vlan 10 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#進(jìn)入VLAN10配置界面
L2-SW(config-if)#ip address 192.168.10.254 255.255.255.0 ? ? ? ? ? ? ?#配置VLAN10管理IP地址
L2-SW(config-if)#exit
L2-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L2-SW(config)#interface vlan 20 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#進(jìn)入VLAN10配置界面
L2-SW(config-if)#ip address 192.168.20.254 255.255.255.0 ? ? ? ? ? ? ?#配置VLAN10管理IP地址
L2-SW(config-if)#end
6、劃分端口至對應(yīng)VLAN
L2-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L2-SW(config)#interface fastEthernet 0/1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #進(jìn)入FA0/1端口配置界面
L2-SW(config-if)#switchport trunk allowed vlan all
#將FA0/1端口工作模式改為Trunk,且允許所有VLAN數(shù)據(jù)
L2-SW(config-if)#no shutdown ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #啟用Fa0/1端口
L2-SW(config-if)#exit ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?#返回全局配置模式
L2-SW(config)#interface range fastEthernet 0/2-10 ? ? ? ? ? ? ? ? ? ?#進(jìn)入Fa0/2-10端口配置界面
L2-SW(config-if-range)#switchport access vlan 10 ? ? ? ? ? ? ? ? ? ? #將端口Fa0/2-10劃分到VLAN10
L2-SW(config-if-range)#no shutdow ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #啟用端口Fa0/2-10
L2-SW(config-if-range)#exit
L2-SW(config)#interface range fastEthernet 0/11-20 ? ? ? ? ? ? ? ? ? ?#進(jìn)入Fa0/11-20端口配置界面
L2-SW(config-if-range)#switchport access vlan 20 ? ? ? ? ? ? ? ? ? ? ?#將端口Fa0/11-20劃分到VLAN20
L2-SW(config-if-range)#no shutdow ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #啟用端口Fa0/11-20
L2-SW(config-if-range)#end
L2-SW#write memory ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #保存配置信息
Building configuration...
[OK]
L2-SW# ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #至此,L2-SW配置完成
7、配置L3-SW,參照以上步驟,配置L3-SW相關(guān)參數(shù)(帳號密碼、VLAN、端口歸屬),IP地址與默認(rèn)網(wǎng)關(guān)配置如下
L3-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L3-SW(config)#interface vlan 10
L3-SW(config-if)#ip address 192.168.10.253 255.255.255.0 ? ? ? ? ? #配置VLAN10管理IP地址
L3-SW(config-if)#exit
L3-SW(config)#interface vlan 20
L3-SW(config-if)#ip address 192.168.20.253 255.255.255.0 ? ? ? ? ? #配置VLAN20管理IP地址
L3-SW(config-if)#exit
L3-SW(config)#ip default-gateway 192.168.10.254 ? ? ? ? ? ? ? ? ? ? ? #配置默認(rèn)網(wǎng)關(guān)
L3-SW(config)#end
L3-SW#write memory ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #保存配置信息
Building configuration...
[OK]
L3-SW# ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #至此,L3-SW配置完成
8、在L2-SW交換機(jī)上建立ACL控制列表
L2-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L2-SW(config)#ip access-list extended VLAN10 ? ? ? ? ? ? ? ? ? ? ? ? ?#建立ACL列表,名字VLAN10
L2-SW(config-ext-nacl)#permit ip any 192.168.10.0 0.0.0.255 ? #允許所有IP訪問VLAN10網(wǎng)段的IP
L2-SW(config-ext-nacl)#deny ip any 192.168.20.0 0.0.0.255 ? ? ?#禁止所有IP訪問VLAN20網(wǎng)段的IP
L2-SW(config-ext-nacl)#exit
L2-SW(config)#ip access-list extended VLAN20 ? ? ? ? ? ? ? ? ? ? ? ? ?#建立ACL列表,名字VLAN20
L2-SW(config-ext-nacl)#permit ip any 192.168.20.0 0.0.0.255 ? #允許所有IP訪問VLAN20網(wǎng)段的IP
L2-SW(config-ext-nacl)#deny ip any 192.168.10.0 0.0.0.255 ? ? ?#禁止所有IP訪問VLAN10網(wǎng)段的IP
L2-SW(config-ext-nacl)#end
9、應(yīng)用控制列表到VLAN10、20
L2-SW#configure?
Configuring from terminal, memory, or network [terminal]??
Enter configuration commands, one per line. ?End with CNTL/Z.
L2-SW(config)#interface vlan 10
L2-SW(config-if)#ip access-group VLAN10 in ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #套用VLAN10控制列表到VLAN10
L2-SW(config-if)#exit
L2-SW(config)#interface vlan 20
L2-SW(config-if)#ip access-group VLAN20 in?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #套用VLAN20控制列表到VLAN20
L2-SW(config-if)#exit
10、至此,交換機(jī)配置完成,依題目要求測試,跨交換機(jī)同VLAN之間可正常通訊,由于設(shè)定了ACL控制列表,不同VLAN之間,無法正常通訊,ACL控制列表基于VLAN,因此,電腦移動到哪個VLAN,都無法與其他VLAN的電腦通訊。
以上就是關(guān)于計算機(jī)網(wǎng)絡(luò)vlan配置實驗相關(guān)問題的回答。希望能幫到你,如有更多相關(guān)問題,您也可以聯(lián)系我們的客服進(jìn)行咨詢,客服也會為您講解更多精彩的知識和內(nèi)容。
推薦閱讀:
畢業(yè)論文3000字大專(計算機(jī)畢業(yè)論文3000字大專)
株洲vi手冊設(shè)計(vi手冊設(shè)計規(guī)范)
怎么看轉(zhuǎn)化率(怎么看轉(zhuǎn)化率的變化)