1. 程式人生 > >配置Hybrid端口

配置Hybrid端口

vpd ace ted ive bit 1.5 blog 圖片 roc

實驗要求:實現不同vlan間PC不可互訪,而不同vlan的PC均可訪問服務器的特殊效果;
實驗拓撲圖:技術分享圖片
實驗步驟:1、在交換機中創建相關vlan;
--SW1 vlan batch 5 10 50;
--SW2 vlan batch 5 10 50;
2、修改端口模式與PVID;
[SW]interface GigabitEthernet 0/0/1;
[SW-GigabitEthernet0/0/1]port hybrid pvid vlan 5;
............
3、修改端口允許通過的數據幀;
[SW-GigabitEthernet0/0/1]port hybrid untagged vlan 5
[SW-GigabitEthernet0/0/24]port hybrid tagged vlan 5
..............
4、結果驗證,vlan5與vlan10的PC不可以互通,但他們均可以與服務器互通。
PC>ping 192.168.1.50

Ping 192.168.1.50: 32 data bytes, Press Ctrl_C to break
From 192.168.1.50: bytes=32 seq=1 ttl=128 time=47 ms
From 192.168.1.50: bytes=32 seq=2 ttl=128 time=62 ms
From 192.168.1.50: bytes=32 seq=3 ttl=128 time=63 ms
From 192.168.1.50: bytes=32 seq=4 ttl=128 time=62 ms

From 192.168.1.50: bytes=32 seq=5 ttl=128 time=63 ms

--- 192.168.1.50 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 47/59/63 ms

配置Hybrid端口