Difference between revisions of "CentOS 8.x Configure ethernet port for 802.3 encapsulated trunk traffic communication"
From Notes_Wiki
(Created page with "<yambe:breadcrumb self="Configure ethernet port for 802.3 encapsulated trunk traffic communication">CentOS 8.x Network configuration|Network configuration</yambe:breadcrumb> =...") |
m |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x System Administration|System Administration]] > [[CentOS 8.x Network configuration|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]]''' | '''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: | 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: | |||
#:<pre> | |||
#:: modprobe 8021q | |||
#:: lsmod | grep 802 | |||
#:</pre> | |||
# Enable module on boot by creating '<tt>/etc/modules-load.d/01-8021q.conf</tt>' with: | |||
#:<pre> | |||
#:: 8021q | |||
#:</pre> | |||
# To access traffic of a particular VLAN on a sub-interface, create sub-interface configuration file '<tt>/etc/sysconffig/network-scripts/ifcfg-<interface-name>.<vlan-id></tt>'. | # To access traffic of a particular VLAN on a sub-interface, create sub-interface configuration file '<tt>/etc/sysconffig/network-scripts/ifcfg-<interface-name>.<vlan-id></tt>'. | ||
#:Example name <tt>/etc/sysconfig/network-scripts/ifcfg-eth0.101</tt> if interface eth0 is in trunk mode with VLAN 101 traffic coming tagged. | #:Example name <tt>/etc/sysconfig/network-scripts/ifcfg-eth0.101</tt> if interface eth0 is in trunk mode with VLAN 101 traffic coming tagged. | ||
#::<pre> | #::<pre> | ||
#::: 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 | #::: DEVICE=eth0.101 | ||
#::: ONBOOT=yes | #::: ONBOOT=yes | ||
#::</pre> | #::</pre> | ||
#::and so on as per requirement. | #::and so on as per requirement. | ||
Line 24: | Line 44: | ||
#:: nmcli networking off; nmcli networking on | #:: nmcli networking off; nmcli networking on | ||
#:</pre> | #:</pre> | ||
Note: | |||
* You can use | |||
*:<pre> | |||
*:: nmtui | |||
*:</pre> | |||
*:: 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 | |||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x System Administration|System Administration]] > [[CentOS 8.x Network configuration|Network configuration]] > [[CentOS 8.x Configure ethernet port for 802.3 encapsulated trunk traffic communication]] |
Latest revision as of 03:51, 19 April 2022
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:
- 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
Home > CentOS > CentOS 8.x > System Administration > Network configuration > CentOS 8.x Configure ethernet port for 802.3 encapsulated trunk traffic communication