Example 3: ZyXEL GS1900-8HP
In the above two examples, I used VLANs 1-3. You can use any VLANs you want, as long as you have the port configurations correct.
To perform the same configurations on a ZyXEL GS1900-8HP switch, which only supports 802.1Q , create the desired VLANs. The ZyXEL switch, like the NETGEAR, doesn't require you to configure VLAN port type. Just make all ports untagged members of the Internet VLAN, assign the appropriate ports as untagged members of their desired VLAN and, finally, assign PVIDs.
Here's a configuration summary of the following screenshots:
- VLAN 2 = Internet, VLAN 3 = PC 1, VLAN 4 = PC 2.
- Port 6 is connected to my router. Port 6 is an untagged member of VLAN 2, 3, and 4 with a PVID of 2.
- Port 7 is connected to PC 1. Port 7 is an untagged member of VLAN 2 and 3 with a PVID of 3.
- Port 8 is connected to PC 2. Port 8 is an untagged member of VLAN 2 and 4 with a PVID of 4.
The first screenshot below shows the VLAN assignments...
Zyxel GS1900-8HP 802.1Q VLAN Assignments
...the second screen shot shows the PVID configuration.
Zyxel GS1900-8HP 802.1Q PVID Assignments
With this configuration, PC 1 and PC 2 can access the Internet but not each other. To add another device in the same VLAN as PC 1 or PC 2, configure the port as an untagged member of VLAN 2 and an untagged member of either VLAN 3 or 4, plus set the PVID to either VLAN 3 or 4.
Example 4: Cisco SG200-26
To perform the same configurations on a Cisco SG200-26 switch, which only supports 802.1Q, the approach is similar to Example 3. Simply create the desired VLANs, configure the interfaces as general and make all interfaces untagged members of the Internet VLAN. Then assign the appropriate interfaces as untagged members of their desired VLAN and, finally, assign PVIDs.
The screenshot below shows the VLAN port-types, VLAN assignments, and PVID assignments on the Cisco SG200-26. Notice in the Mode column that all three interfaces are configured as "General." I used VLAN 4 for the Internet and VLANs 51 and 52 for PCs. A "U" after the VLAN ID indicates untagged, and a "P" after a VLAN ID indicates PVID.
Here's a config summary of the below screenshot:
- Interface GE10 is connected to PC 1. Interface GE10 is an untagged member of VLAN 4 and 51 with a PVID of 51.
- Interface GE11 is connected to PC 2. Interface GE11 is an untagged member of VLAN 4 and 52 with a PVID of 52.
- Interface GE12 is connected to my router. Interface GE12 is an untagged member of VLAN 4, 51 and 52 with a PVID of 4.
Cisco SG200-26 802.1Q Configuration
With this configuration, PC 1 and PC 2 can access the Internet but not each other. To add another device in the same VLAN as PC 1 or PC 2, configure the switch interface as general, make it an untagged member of VLAN 4 and an untagged member of either VLAN 51 or 52 and set the interface PVID to either VLAN 51 or 52.
While this example was done on a Cisco SG200-26, the Cisco SG200-08 and SG200-08P use similar configurations.
In all the examples, all end devices are in the same IP address range (subnet) and the router doesn't support VLANs. It is also interesting to note in Examples 2-4 using 802.1Q VLANs, we don't actually use tagging, since we set all ports to be untagged members of the various VLANs.
If you look closely at the VLAN assignments in the port-based and 802.1Q examples, you can see that the router/Internet port is a member of all VLANs for both port-based and 802.1Q. The difference is the PC ports are members of only one VLAN in a port-based config, whereas PC ports are members of the Internet VLAN and their native VLAN in an 802.1Q config.
These examples are limited to segmenting a wired network using VLANs only on ports of a smart / managed switch. In a future article, I'll cover how to use 802.1Q VLANs using ports on both a router and switch, as well as how to use 802.1Q VLANs to segment a wireless network.
Below is a table of switches I've used or reviewed that lists whether they support port-based and/or 802.1Q VLANs.
As you can see, only a few switches support port-based VLANs, yet all of them support 802.1Q VLANs. This is likely due to the fact that port-based VLANs aren't standardized, thus there is limited interoperability between devices and limited functionality with port-based VLANs.
On the other hand, 802.1Q is a standard technology that is supported by most VLAN-capable switches. The bottom line, as shown in these examples, is you can use port-based or 802.1Q VLANs to segment any small network.