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

From Notes_Wiki

Home > CentOS > CentOS 8.x > System Administration > Network configuration > 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. Enable 8021q module using:
    modprobe 8021q
    lsmod | grep 802
  2. Enable module on boot by creating '/etc/modules-load.d/01-8021q.conf' with:
    8021q
  3. 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.
    VLAN=yes
    TYPE=Vlan
    PHYSDEV=eth0
    VLAN_ID=101
    REORDER_HDR=yes
    GVRP=no
    MVRP=no
    HWADDR=
    PROXY_METHOD=none
    BROWSER_ONLY=no
    BOOTPROTO=none
    IPADDR=10.100.1.11
    PREFIX=24
    GATEWAY=10.100.1.1
    DNS1=10.100.1.2
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6_DISABLED=yes
    IPV6INIT=no
    NAME=eth0.101
    DEVICE=eth0.101
    ONBOOT=yes
    and so on as per requirement.
  4. Restart network and see if sub-interface is up and running as expected
    nmcli networking off; nmcli networking on


Note:

  • You can use
    nmtui
    to configure appropriate interface and learn about the configuration parameters

Refer:


Home > CentOS > CentOS 8.x > System Administration > Network configuration > CentOS 8.x Configure ethernet port for 802.3 encapsulated trunk traffic communication