CentOS 8.x Configure ethernet port for 802.3 encapsulated trunk traffic communication

From Notes_Wiki
Revision as of 04:16, 8 June 2021 by Saurabh (talk | contribs)

<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:

  1. 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.
  2. Restart network and see if sub-interface is up and running as expected
    nmcli networking off; nmcli networking on


Refer: https://www.snel.com/support/802-1q-vlan-tagging-in-centos-8/ esp. if you want to use ip routing 2 along with sub-interfaces.


<yambe:breadcrumb self="Configure ethernet port for 802.3 encapsulated trunk traffic communication">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb>