四、MUX-vlan&Super-vlan+端口安全
- MUX-vlan
- 實驗拓撲
- 實驗需求及解法
- 1. 在SW1/2/3分別創建vlan10 20 30 40
- 2. SW1/2/3之間使用trunk鏈路,僅允許vlan10 20 30 40 通過。
- 3. SW與PC/Server之間使用access鏈路。
- 4. ping驗證:
- Super-vlan+端口安全
- 實驗拓撲
- 實驗需求及解法
- 1.SW1 創建 vlan10,vlan3001 和 vlan3002
- 2.SW2/3 創建 vlan3001 和 vlan3002
- 3.SW1/2/3 之間使用 trunk 鏈路,并僅允許 vlan3001 和 3002 通過。
- 4.SW2/3 與 PC 之間使用 access 鏈路,并劃入對應 vlan。
- 5.驗證通信:
- 6.在網關 vlanif10 中開啟 vlan 間代理 ARP 功能。
- 7.驗證通信:
- 8.為保證企業內網安全,需要在 vlan3001 中開啟端口安全,完成以下需求:
MUX-vlan
實驗拓撲
實驗需求及解法
- 本實驗模擬某企業內部網絡,有財務、市場兩個部門,另有訪客網絡。
- 現需要對內網流量進行控制,完成以下需求:
1. 在SW1/2/3分別創建vlan10 20 30 40
vlan40設置為mux-vlanvlan10和20設置為Group-vlanvlan30設置為Separate-vlan
SW1/2/3:
vlan batch 10 20 30 40
vlan 40
mux-vlan
subordinate separate 30
subordinate group 10 20
2. SW1/2/3之間使用trunk鏈路,僅允許vlan10 20 30 40 通過。
SW1:
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
#
SW2:
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
#
SW3:
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
3. SW與PC/Server之間使用access鏈路。
//財務部劃入vlan10//市場部劃入vlan20//訪客劃入vlan30
SW1:
interface GigabitEthernet0/0/3
port link-type access
port default vlan 40
port mux-vlan enable
#
SW2:
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
port mux-vlan enable
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
port mux-vlan enable
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
port mux-vlan enable
interface GigabitEthernet0/0/4
port link-type access
port default vlan 20
port mux-vlan enable
#
SW3:
interface GigabitEthernet0/0/2
port link-type access
port default vlan 30
port mux-vlan enable
interface GigabitEthernet0/0/3
port link-type access
port default vlan 30
port mux-vlan enable
4. ping驗證:
- 確保財務內部可以通信,市場內部可以通信,而財務與市場部不通。
- 確保訪客內部不能通信,且訪客與財務/市場都不能通信。
- 確保 Server1 可以與所有 PC 通信。
Super-vlan+端口安全
實驗拓撲
實驗需求及解法
本實驗模擬某企業內網,多個部門分隔為不同的 vlan,但是每個部門主機數量都較少。
為了簡化 IP 地址規劃,節省 IP 地址,需配置 Super-vlan。請完成以下需求:
1.SW1 創建 vlan10,vlan3001 和 vlan3002
- 將 vlan10 設置為 Super-vlan,vlan3001 和 3002 為子 vlan。
SW1:
vlan batch 10 3001 3002
vlan 10
aggregate-vlan
access-vlan 3001 to 3002
2.SW2/3 創建 vlan3001 和 vlan3002
SW2/3:
vlan batch 3001 3002
3.SW1/2/3 之間使用 trunk 鏈路,并僅允許 vlan3001 和 3002 通過。
SW1:
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 3001 to 3002
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 3001 to 3002
#
SW2:
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 3001 to 3002
#
SW3:
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 3001 to 3002
4.SW2/3 與 PC 之間使用 access 鏈路,并劃入對應 vlan。
SW2:
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3001
interface GigabitEthernet0/0/3
port link-type access
port default vlan 3001
#
SW3:
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3002
interface GigabitEthernet0/0/3
port link-type access
port default vlan 3002
5.驗證通信:
- PC1 可以與 PC2 通信,PC3 可以與 PC4 通信
- PC1/2 不能與 PC3/4 通信。
6.在網關 vlanif10 中開啟 vlan 間代理 ARP 功能。
SW1:
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
arp-proxy inter-sub-vlan-proxy enable
7.驗證通信:
- PC1 可以與 PC3 通信,且使用 tracert 命令驗證需先經過網關。
- PC1>tracert 192.168.10.3
traceroute to 192.168.10.3, 8 hops max
(ICMP), press Ctrl+C to stop1 192.168.10.254 47 ms 47 ms 31 ms2 192.168.10.3 62 ms 109 ms 94 ms
8.為保證企業內網安全,需要在 vlan3001 中開啟端口安全,完成以下需求:
- 8.1 最大學習 mac 地址數量為 5 個。
- 8.2 學習到的 mac 地址永不超時,且端口關閉或設備重啟后不會刪除。
- 8.3 當學習的 mac 地址數量超過 5 個時,會自動關閉端口。
SW2:
interface GigabitEthernet0/0/2
port-security enable
port-security protect-action shutdown
port-security max-mac-num 5
port-security mac-address sticky
interface GigabitEthernet0/0/3
port-security enable
port-security protect-action shutdown
port-security max-mac-num 5
port-security mac-address sticky