Mint Vlan
How to configure a Vlan on Linux Mint ?
Install vlan
sudo apt-get install vlan
Configuration
root@mint:~# sudo modprobe 8021q
root@mint:~# ifconfig
ens19: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.10.18.83 netmask 255.255.255.0 broadcast 10.10.18.255
inet6 2001:db8:1:2:9506:5fcd:1c61:1279 prefixlen 64 scopeid 0x0<global>
inet6 2001:db8:1:2:a9:c50b:1348:1ec6 prefixlen 64 scopeid 0x0<global>
inet6 2001:db8:1:2:e064:b0ec:a08f:7fd8 prefixlen 64 scopeid 0x0<global>
inet6 2001:db8:1:2:a015:7ec:eef0:1a75 prefixlen 64 scopeid 0x0<global>
inet6 2001:db8:1:2:a028:b890:ffe8:5231 prefixlen 64 scopeid 0x0<global>
inet6 2001:db8:1:2:c80:addb:1273:95d5 prefixlen 64 scopeid 0x0<global>
inet6 fe80::9cc2:b22d:cc15:2946 prefixlen 64 scopeid 0x20<link>
ether 4e:e5:10:00:06:83 txqueuelen 1000 (Ethernet)
RX packets 181 bytes 58337 (58.3 KB)
RX errors 0 dropped 7 overruns 0 frame 0
TX packets 271 bytes 48413 (48.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 138 bytes 13723 (13.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 138 bytes 13723 (13.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@mint:~# vconfig add ens19 158
Added VLAN with VID == 158 to IF -:ens18:-
root@mint:~#
root@mint:~# ip addr add 100.60.100.83/24 dev ens19.158
root@mint:~#
root@mint:~# ip link set up ens19.158
root@mint:~#
Make Permanent
sudo su -c 'echo "8021q" >> /etc/modules'
/etc/network/interfaces
auto ens19.158
iface ens19.158 inet static
address 100.60.100.83
netmask 255.255.255.0
vlan-raw-device ens19.158
up route add -net 10.0.0.0 netmask 255.0.0.0 gw 100.60.100.1
Any Comments ?
sha256: e69d61613b45307405014943049154d70c8cf140d2a3bcf5bbf7679fbefa798f