CentOS 8.x Configure ethernet port for 802.3 encapsulated trunk traffic communication
From Notes_Wiki
<yambe:breadcrumb self="Configure ethernet port for 802.3 encapsulated trunk traffic communication">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb>
CentOS 8.x Configure ethernet port for 802.3 encapsulated trunk traffic communication
There is old article on this at Configuring ethernet port in trunk mode
On a trunk port there can be multiple tagged VLAN traffic. We can access traffic of a particular VLAN on a sub-interface. To create a sub-interface we need to create sub-interface configuration file using:
- To access traffic of a particular VLAN on a sub-interface, create sub-interface configuration file '/etc/sysconffig/network-scripts/ifcfg-<interface-name>.<vlan-id>'.
- Example name /etc/sysconfig/network-scripts/ifcfg-eth0.101 if interface eth0 is in trunk mode with VLAN 101 traffic coming tagged.
- DEVICE=eth0.101
- NAME=eth0.101
- VLAN=yes
- BOOTPROTO=static #Or BOOTPROTO="none" or BOOTPROTO="DHCP", etc.
- ONBOOT=yes
- IPADDR=""
- NETMASK=""
- GATEWAY=""
- DNS1=""
- DNS2=""
- and so on as per requirement.
- Example name /etc/sysconfig/network-scripts/ifcfg-eth0.101 if interface eth0 is in trunk mode with VLAN 101 traffic coming tagged.
- Restart network and see if sub-interface is up and running as expected
- nmcli networking off; nmcli networking on
- In case you do not see device eth0.101 up and working then try command:
- vconfig eth0 add 101
- and then again restart network using nmcli.
<yambe:breadcrumb self="Configure ethernet port for 802.3 encapsulated trunk traffic communication">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb>