I'm trying to connect Centos7 Machine to trunk port, which is having multiple vlan tagged. How do i add multiple ips single ethernet or how to define vlan id for specific subnet.
Linux – how to connect linux/centos machine to trunk port
centoslinuxlinux-networkingnetworkingvlan
Best Answer
In Linux, VLAN tagging is handled with subinterfaces according to the naming scheme
ifX.N
, whereifX
is interface X andN
is the VLAN ID. So, if you are attached to this switch via interfaceeth0
, traffic to/from VLAN 10 will appear oneth0.10
, and traffic to/from VLAN25 will appear oneth0.25
.You will need to create the subinterfaces, with eg
This can be automated in CentOS with a file such as