Set up VLAN interface on Linux Machine

From AcrodusWiki

This guide gives you commands to quickly set up a vlan tagged interface one a linux machine.

$ sudo ip link add link enp0s3 name enp0s3.100 type vlan id 100 $ sudo ip addr add 192.168.0.200/24 dev enp0s3.100 $ sudo ip link set up enp0s3.100

Ensure that the link is up, in doing so the operating system will add the route into the routing table. This however can be confirmed with the ip r command.