Dual VLan, one port.

Associate
Joined
10 Nov 2004
Posts
2,237
Location
Expat in Singapore
Hi,

I am looking at using two VLans to segregate personal and private access.

I have two rooms that require both but only one lan cable between them.

I understand you can set both VLans to use a single port with VLan aware switches at each end but am curious as to how it works and if anyone has had experience doing this.

Ideal senario is;

Switch 1
port 1 (VLan 1)
Port 2 (VLan 2)

Port 8 (Vlan 1 & VLan 2) -> Switch 2

Switch 2
Port 1 (VLan 1)
Port 2 (VLan 2)

Port 8 (Vlan 1 & VLan 2) -> Switch 1

Anything on switch 1 port 1 can talk to anything on switch 2 port 1 and vice versa. Same from port 2 -> port 2. Port 1 cannot talk to port 2 on either switcha nd vice versa.

I am likely to be using a couple of HP 1810-8G web managed switches which support VLans (inc IEEE 802.1Q VLANs).

Possible ?, easy ?.

Thanks
RB
 
Yes, that's exactly the point of VLANs. Your ports connecting the switches are known as trunk ports in some lingo.

On HP it would be along the lines of

VLAN 1
Untagged interface 1
Tagged interface 8

VLAN 2
Untagged interface 2
Tagged interface 8

Can't remember the exact syntax but its along those lines. Untagged - remove the 802.1q VLAN tag from the header for the VLAN specified for traffic leaving that port. For traffic entering that port, apply 1.q tag of the VLAN specified. Tagged - allow data for the vlan(s) specified to leave and enter the ports with the .1q tags intact


You can only have one untagged vlan per port, but you can have multiple tagged VLANs. If you're applying VLAN tags on egress traffic, the device at the other end has to be able to understand them - eg not most desktop devices.
 
Yes, that's exactly the point of VLANs. Your ports connecting the switches are known as trunk ports in some lingo.

On HP it would be along the lines of

VLAN 1
Untagged interface 1
Tagged interface 8

VLAN 2
Untagged interface 2
Tagged interface 8

Can't remember the exact syntax but its along those lines. Untagged - remove the 802.1q VLAN tag from the header for the VLAN specified for traffic leaving that port. For traffic entering that port, apply 1.q tag of the VLAN specified. Tagged - allow data for the vlan(s) specified to leave and enter the ports with the .1q tags intact


You can only have one untagged vlan per port, but you can have multiple tagged VLANs. If you're applying VLAN tags on egress traffic, the device at the other end has to be able to understand them - eg not most desktop devices.

Thanks for that. I suspected but clarification on the tagging is great.

RB
 
One other thing....

Although the 802.1q VLan tagging is meant to be a standard, how standard is it if you mix and match manufacturers equipment in reality (thinking Netgear and HP).

Thanks
RB
 
Last edited:
One other thing....

Although the 802.1q VLan tagging is meant to be a standard, how standard is it if you mix and match manufacturers equipment in reality (thinking Netgrar and HP).

Thanks
RB

Never had an issue myself

The biggest issue is the lack of standardisation on the terminology in the configs, so where my post above has the rough terminology for HP, on a cisco it would be something like

Interface FastEthernet0/1
switchport mode access
switchport access vlan 1
Interface FastEthernet0/2
switchport mode access
switchport access vlan 2
Interface FastEthernet0/8
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,2

Which I prefer personally
 
HP syntax for VLAN'in occurs not at the interface but in the VLAN config area;

EG,

interface 4
name "Wireless Access Point"
exit
interface 23
name "ToOfficeSw"
exit
interface 24
name "ToEdgeSwitch"
exit
ip default-gateway 10.10.24.254
vlan 1
name "DEFAULT_VLAN"
no ip address
no untagged 1-24
exit
vlan 24
name "Server"
untagged 2-3,5-6,8,13,15,17
ip address 10.10.24.253 255.255.255.0
tagged 1,19-24
exit
vlan 25
name "Client"
untagged 7,9-10,12,14,16,18
tagged 1,19-24
exit


If you need help with HP vlan give me a shout :)

Thanks
 
Back
Top Bottom