How to set up multi-subnet with tag-based VLAN?
With a VLAN supported switch, we can add a VLAN tag to the frames from LAN clients; thus, to distinguish the LAN clients and separate them into different LAN subnet. This document introduces how to setup multi-subnet on Vigor Router with tag-based VLAN, and setup a switch to work with Vigor Router.
(This setup applies to most of the models. For Vigor300B, Vigor2960 and Vigor3900, please refer to the article here.)
Vigor Router Setup
1. Go to LAN >> VLAN, Enable VLAN Configuration, and create a VLAN for each LAN Subnet, select the LAN Port members, enable VLAN Tag, and set a unique VLAN ID for each VLAN. (Note: It is recommended to leave a VLAN without VLAN tag, so that the router will be always accessible to VLAN-unaware devices.)
The above configuration implies that un-tagged traffic from all LAN ports will belong to LAN 1; and Port 2 allows traffic with tag, where traffic tagged "8" will belong to LAN2, traffic tagged "9" will belong to "LAN3", and traffic tagged "10" will belong to LAN4.
2. In the page of LAN >> General Setup, check the Status box of LAN 2, LAN 3 and LAN 4 to enable them. Then click OK to save the configuration and reboot the router.
Note: The detail settings of network configuration and DHCP server can be edited from "Details Page".
3. Go to VLAN >> VLAN Membership to create according VLAN on the switch. Except the default one, add 3 new VLAN with according to the VID used in Vigor Router's VLAN configuration.
4. Go to VLAN >> Ports to configure the port type. (See Which VLAN Port Type should I choose?)
- For the port which is going to connect to the router (Port 1 in this example), set Port Type as "S-Custom port" or "C-port", and set Egress Rule as "Trunk", so that the tag will be kept while the frame is forwarded to the router.
- For the ports which are going to connect to the PC (port 3, 4 and 5) set Egress Rule as "Access", so that the tag will be removed before the frame is forwarded to the PCs.
5. With the above configuration, the device connecting to VigorSwitch Port 3, 4 and 5 will belong to different subnet, and obtain the corresponding IP address. The device connecting to VigorSwitch Port 3 will belong to Router's LAN2, and will get the IP address in 192.168.2.0/24 subnet;
the device connecting to VigorSwitch Port 4 will belong to Router's LAN3, and will get the IP address in 192.168.3.0/24 subnet;
and the device connecting to VigorSwitch Port 5 will belong to Router's LAN4, and will get the IP address in 192.168.4.0/24 subnet.