柚子快報邀請碼778899分享:小型企業(yè)網(wǎng)絡(luò)組網(wǎng)與配置仿真實(shí)驗(yàn)
?實(shí)驗(yàn)要求如下:
?我這里以學(xué)號46為例
一、IP 地址規(guī)劃表
(一)主類網(wǎng)絡(luò)
(二)子網(wǎng)劃分?
需要自己計(jì)算有效ip范圍
在C類主網(wǎng)絡(luò)192.168.46.0/24中,我們需要先了解這個網(wǎng)絡(luò)的子網(wǎng)掩碼為255.255.255.0,其二進(jìn)制表示為11111111.11111111.11111111.00000000。這個網(wǎng)絡(luò)包含了從192.168.46.1到192.168.46.254的可用IP地址。
為了劃分出5個子網(wǎng),我們需要考慮每個子網(wǎng)至少需要2個IP地址(一個用于網(wǎng)絡(luò)地址,一個用于廣播地址),但實(shí)際上,為了實(shí)際使用,每個子網(wǎng)至少應(yīng)該分配3個或更多的IP地址(一個用于網(wǎng)絡(luò)地址,一個用于廣播地址,一個或更多用于主機(jī))。
如果我們假設(shè)每個子網(wǎng)至少需要4個IP地址(出于簡化的考慮),我們可以從主機(jī)位中借用3位來劃分子網(wǎng)。這樣,我們可以得到2^3 = 8個子網(wǎng)掩碼塊,子網(wǎng)掩碼/24 就變?yōu)?/27(255.255.255.224)(二進(jìn)制:?11111111.11111111.11111111.11100000)了可以劃分成 8 個子網(wǎng),每個子網(wǎng)有 32 個地址,其中 30 個是有效的主機(jī)地址,但我們只需要5個子網(wǎng)掩碼塊,夠用了。
有效IP范圍 子網(wǎng)掩碼 網(wǎng)絡(luò)地址 廣播地址 企業(yè)網(wǎng)1 VLAN-2 192.168.46.1 - 192.168.46.30 255.255.255.224 192.168.46.0 192.168.46.31 VLAN-3 192.168.46.33?- 192.168.46.62 255.255.255.224 192.168.46.32 192.168.46.63 企業(yè)網(wǎng)2 VLAN-2 192.168.46.65?- 192.168.46.94 255.255.255.224 192.168.46.64 192.168.46.95 VLAN-3 192.168.46.97?- 192.168.46.126 255.255.255.224 192.168.46.96 192.168.46.127 路由器 直連鏈路 192.168.46.129?- 192.168.46.158 255.255.255.224 192.168.46.128 192.168.46.159
(三)IP分配表
IP地址 子網(wǎng)掩碼 網(wǎng)關(guān)地址 企業(yè)網(wǎng)1 VLAN-2 PC0 192.168.46.2 255.255.255.224 192.168.46.1 PC1 192.168.46.3 255.255.255.224 192.168.46.1 VLAN-3 PC2 192.168.46.34 255.255.255.224 192.168.46.33 PC3 192.168.46.35 255.255.255.224 192.168.46.33 企業(yè)網(wǎng)2 VLAN-2 PC4 192.168.46.66 255.255.255.224 192.168.46.65 PC5 192.168.46.67 255.255.255.224 192.168.46.65 VLAN-3 PC6 192.168.46.98 255.255.255.224 192.168.46.97 PC7 192.168.46.99 255.255.255.224 192.168.46.97 路由器1 VLAN-2子接口 192.168.46.1 255.255.255.224 - VLAN-3子接口 192.168.46.33 255.255.255.224 - 與路由器2互聯(lián)端口 192.168.46.129 255.255.255.224 - 路由器2 VLAN-2子接口 192.168.46.65 255.255.255.224 - VLAN-3子接口 192.168.46.97 255.255.255.224 - 與路由器1互聯(lián)端口 192.168.46.130 255.255.255.224 -
(四)VLAN端口分配表
VLAN名稱(ID) 端口分配 企業(yè)網(wǎng)1 VLAN-2 fa0/0, fa0/1 VLAN-3 fa0/2,fa?0/3 企業(yè)網(wǎng)2 VLAN-2 fa0/4,fa?0/5 VLAN-3 fa0/6, fa0/7
二、網(wǎng)絡(luò)拓?fù)浼皡?shù)規(guī)劃圖?
?我方便使用后面的指令請注意連接方向和順序
ctrl+r勾選顯示端口(ip地址什么的是我自己手動寫的不用管)
?配置每個電腦的ip地址、子網(wǎng)掩碼、網(wǎng)關(guān)地址
交換機(jī)VLAN配置
左邊交換機(jī)(注意:指令中有關(guān)的ip都是自己表中對應(yīng)的ip)
Switch>enable
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#int f0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#vlan 3
Switch(config-vlan)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#int f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#int f0/5
Switch(config-if)#switchport mode trunk
Switch(config-if)#
上面指令提取出來如下?
enable
config terminal
vlan 2
exit
int f0/1
switchport mode access
switchport access vlan 2
exit
int f0/2
switchport mode access
switchport access vlan 2
exit
vlan 3
exit
int f0/3
switchport mode access
switchport access vlan 3
exit
int f0/4
switchport mode access
switchport access vlan 3
exit
int f0/5
switchport mode trunk
右邊交換機(jī)
Switch>enable
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#int f0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#int f0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#vlan 3
Switch(config-vlan)#exit
Switch(config)#int f0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#int f0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#
Switch(config)#int f0/5
Switch(config-if)#switchport mode trunk
Switch(config-if)#
?上面指令提取出來如下?
enable
config terminal
vlan 2
exit
int f0/1
switchport mode access
switchport access vlan 2
exit
int f0/2
switchport mode access
switchport access vlan 2
exit
vlan 3
exit
int f0/3
switchport mode access
switchport access vlan 3
exit
int f0/4
switchport mode access
switchport access vlan 3
exit
int f0/5
switchport mode trunk
單臂路由配置?
左路由(其中涉及的地址寫你自己路由器1的VLAN子接口的IP地址和子網(wǎng)掩碼)
Router>en
Router#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#int fa0/0.2
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip add 192.168.46.1 255.255.255.224
Router(config-subif)#int fa0/0.3
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.3, changed state to up
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip add 192.168.46.33 255.255.255.224
Router(config-subif)#
?上面指令提取出來如下??
en
config terminal
int fa0/0
no shutdown
int fa0/0.2
encapsulation dot1Q 2
ip add 192.168.46.1 255.255.255.224
int fa0/0.3
encapsulation dot1Q 3
ip add 192.168.46.33 255.255.255.224
右邊路由
Router>en
Router#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#int fa0/0.2
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip add 192.168.46.65 255.255.255.224
Router(config-subif)#int fa0/0.3
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.3, changed state to up
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip add 192.168.46.97 255.255.255.224
Router(config-subif)#
?上面指令提取出來如下???
en
config terminal
int fa0/0
no shutdown
int fa0/0.2
encapsulation dot1Q 2
ip add 192.168.46.65 255.255.255.224
int fa0/0.3
encapsulation dot1Q 3
ip add 192.168.46.97 255.255.255.224
?靜態(tài)路由配置
(ip add 本路由器地址 子網(wǎng)掩碼)
(ip route 目標(biāo)地址 子網(wǎng)掩碼 下一跳)
左邊路由
Router>en
Router#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/1
Router(config-if)#ip address 192.168.46.129 255.255.255.224
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
Router(config-if)#ip route 192.168.46.96 255.255.255.224 192.168.46.130
Router(config)#int fa0/1
Router(config-if)#ip route 192.168.46.64 255.255.255.224 192.168.46.130
Router(config)#
?上面指令提取出來如下???
en
config terminal
int fa0/1
ip address 192.168.46.129 255.255.255.224
no shutdown
ip route 192.168.46.96 255.255.255.224 192.168.46.130
int fa0/1
ip route 192.168.46.64 255.255.255.224 192.168.46.130
右邊路由
Router>en
Router#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa0/1
Router(config-if)#ip address 192.168.46.130 255.255.255.224
Router(config-if)#ip route 192.168.46.0 255.255.255.224 192.168.46.129
Router(config)#int fa0/1
Router(config-if)#ip route 192.168.46.32 255.255.255.224 192.168.46.129
Router(config)#int fa0/1
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#
?上面指令提取出來如下???
en
config terminal
int fa0/1
ip address 192.168.46.130 255.255.255.224
ip route 192.168.46.0 255.255.255.224 192.168.46.129
int fa0/1
ip route 192.168.46.32 255.255.255.224 192.168.46.129
int fa0/1
no shutdown
三、交換機(jī)配置圖
(一)VLAN配置
1、交換機(jī)1的VLAN配置圖
show vlan brief
?2、交換機(jī)2的VLAN配置圖
show vlan brief
?
(二)TRUNK配置
1、交換機(jī)1接口的TRUNK狀態(tài)圖
show interface trunk
?2、交換機(jī)2的VLAN配置圖
show interface trunk
四、路由器配置圖
(一)路由器1
1、路由器1端口配置圖
show ip interface brief
2、路由器1的靜態(tài)路由表項(xiàng)
show ip interface brief
(二)路由器2
1、路由器2端口配置圖
show ip route
2、路由器2的靜態(tài)路由表項(xiàng)
show ip route
?五、Ping通圖
實(shí)驗(yàn)報告其他部分?
實(shí)驗(yàn)項(xiàng)目 實(shí)驗(yàn)3:小型企業(yè)網(wǎng)絡(luò)組網(wǎng)與配置仿真實(shí)驗(yàn) 類別 驗(yàn)證性 £ 實(shí)驗(yàn)?zāi)康? 1.掌握配置交換機(jī)VLAN和TRUNK鏈路的基本方法和步驟; 2.掌握規(guī)劃和配置路由器接口IP地址的基本方法; 3.掌握在路由器上配置單臂路由實(shí)現(xiàn)VLAN間通信的基本方法。 實(shí)驗(yàn)任務(wù)與要求 1.在Packet Tracer模擬環(huán)境下搭建一個小型企業(yè)網(wǎng)絡(luò); 2.規(guī)劃并配置網(wǎng)絡(luò)的IP參數(shù)、VLAN、TRUNK鏈路和單臂路由; 3.測試網(wǎng)絡(luò)的連通性。 實(shí)驗(yàn)原理(技術(shù)) 小型企業(yè)網(wǎng)絡(luò)組網(wǎng)與配置仿真實(shí)驗(yàn)通過單臂路由、VLAN劃分、靜態(tài)路由配置實(shí)現(xiàn)不同VLAN之間的通信。 單臂路由:在路由器的一個接口上通過配置子接口(邏輯接口)的方式,實(shí)現(xiàn)原來相互隔離的不同VLAN之間的互聯(lián)互通。 VLAN(Virtual LAN,虛擬局域網(wǎng)):在交換式局域網(wǎng)的基礎(chǔ)上,對連接到的第二層交換機(jī)端口的網(wǎng)絡(luò)用戶進(jìn)行邏輯分組,不受網(wǎng)絡(luò)用戶物理位置的限制。各個VLAN邏輯分組之間彼此隔離,互相不能訪問,不僅實(shí)現(xiàn)了廣播域的分隔,而且增強(qiáng)了網(wǎng)絡(luò)的安全性。 路由器不同接口的IP不能位于同一網(wǎng)段;路由器連接內(nèi)網(wǎng)的網(wǎng)關(guān)接口IP應(yīng)該與內(nèi)網(wǎng)IP位于同一網(wǎng)段;路由器直連鏈路兩端的IP應(yīng)該位于同一網(wǎng)段。 實(shí)驗(yàn)儀器設(shè)備(環(huán)境條件) 硬件環(huán)境:PC終端或筆記本電腦一臺 軟件環(huán)境:Windows操作系統(tǒng)和PT模擬軟件
柚子快報邀請碼778899分享:小型企業(yè)網(wǎng)絡(luò)組網(wǎng)與配置仿真實(shí)驗(yàn)
參考文章
本文內(nèi)容根據(jù)網(wǎng)絡(luò)資料整理,出于傳遞更多信息之目的,不代表金鑰匙跨境贊同其觀點(diǎn)和立場。
轉(zhuǎn)載請注明,如有侵權(quán),聯(lián)系刪除。