Difference between revisions of "CentOS 8.x Configure ethernet port for 802.3 encapsulated trunk traffic communication"
From Notes_Wiki
m |
m |
||
Line 54: | Line 54: | ||
*:: to configure appropriate interface and learn about the configuration parameters''' | *:: to configure appropriate interface and learn about the configuration parameters''' | ||
Refer: | |||
* https://tutoexpress.com/index.php/centos-configuring-802-1q-tag-vlan/ to see how to do the same via ip command | |||
<yambe:breadcrumb self="Configure ethernet port for 802.3 encapsulated trunk traffic communication">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb> | <yambe:breadcrumb self="Configure ethernet port for 802.3 encapsulated trunk traffic communication">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb> |
Revision as of 07:00, 8 June 2021
<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:
- Enable 8021q module using:
- modprobe 8021q
- lsmod | grep 802
- Enable module on boot by creating '/etc/modules-load.d/01-8021q.conf' with:
- 8021q
- 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.
- 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
Note:
- You can use
- nmtui
-
- to configure appropriate interface and learn about the configuration parameters
Refer:
- https://tutoexpress.com/index.php/centos-configuring-802-1q-tag-vlan/ to see how to do the same via ip command
<yambe:breadcrumb self="Configure ethernet port for 802.3 encapsulated trunk traffic communication">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb>