VLAN Tagging allows an individual IP Address to be configured as part of multiple VLANs.
Let's tag the 1002 vlan id;
1- Firstly, install Vlan on Ubuntu with the command as below;
# apt-get install vlan
2- Then kernel should be installed.
# sudo modprobe 8021q
3- Add the following 1002 vlan id under /etc/network/interfaces;
Note That: The interfaces file location may change depending on the ubuntu version.
4- Add the line “vlan-raw-device eth0” at the bottom.
5- Then the process is completed by running the following command.
# sudo su -c 'echo "8021q" >> /etc/modules'