我嘗試在我的一台 HP 交換器 (J9279A/J9280A) 上為實驗室環境設定單獨的 VLAN。
網路架構:
WAN
|
GW
|
port1
|
SW_2---Trk1---SW_1---Trk2---SW_3
子網路:
- 192.168.100.0/24 - vlan 1 - 管理網路、交換器、路由器等。
- 192.168.10.0/24 - vlan 2 - 用戶設備
- 192.168.50.0/24 - VLAN 3 - iSCSI 設備
- 10.100.0.0/16 - vlan 100 - 實驗室子網路(目前不工作)
SW_1配置:
vlan 1
name "Management"
forbid 2
untagged 1,Trk1-Trk2
ip address 192.168.100.240 255.255.255.0
no untagged 2-20
jumbo
ip proxy-arp
exit
vlan 2
name "users"
forbid 4,6,8,10,12,19-20
untagged 2-3,5,7,9,11,13-18
ip address 192.168.10.240 255.255.255.0
tagged 1,Trk1-Trk2
jumbo
exit
vlan 3
name "iscsi"
forbid 2-3,5,7,9,11,13-18
untagged 4,6,8,10,12,19-20
tagged 1,Trk1-Trk2
jumbo
exit
vlan 100
name "10.100"
forbid 2-20
tagged Trk1-Trk2
exit
SW_2配置:
vlan 1
name "Management"
forbid 1-22
untagged Trk1
ip address 192.168.100.241 255.255.255.0
no untagged 1-22
jumbo
exit
vlan 2
name "users"
forbid 7-16
untagged 1-6,17-22
tagged Trk1
jumbo
exit
vlan 3
name "iscsi"
forbid 1-6,8-22
untagged 7
tagged Trk1
jumbo
exit
vlan 100
name "10.100"
untagged 8-16
exit
SW_3配置:
vlan 1
name "Management"
forbid 1-46
untagged Trk1
ip address 192.168.100.242 255.255.255.0
no untagged 1-46
jumbo
ip proxy-arp
exit
vlan 2
name "users"
untagged 1-35,45-46
no ip address
tagged Trk1
jumbo
exit
vlan 3
name "iscsi"
forbid 1-6,8-46
tagged Trk1
jumbo
exit
vlan 100
name "10.100"
forbid 4-35,37-46
untagged 36
tagged Trk1
exit
設備 (IBM X3550 M2) 連接到連接埠 11-12 上的 SW_2。介面配置:
auto eth2
iface eth2 inet static
address 10.100.0.11
netmask 255.255.0.0
auto eth3
iface eth3 inet static
address 10.100.0.12
netmask 255.255.0.0
我的理解是,在目前配置中,該設備應位於其自己的獨立網路中,無法從任何其他 VLAN 存取。我已經做了一些測試,令我驚訝的是,我能夠連接到這台機器。
我運行了wireshark來查看發生了什麼,並且我的PC也收到了廣播ping(ping -b 10.100.255.255),該PC連接到SW_3中的連接埠1(在VLAN 2中未標記)。
我的PC上的介面配置:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:d9:83:4f brd ff:ff:ff:ff:ff:ff
inet 192.168.10.16/24 brd 192.168.10.255 scope global eth0
valid_lft forever preferred_lft forever
inet 10.100.0.2/32 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fed9:834f/64 scope link
valid_lft forever preferred_lft forever
誰能向我解釋發生了什麼事,以及如何正確設定?