Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

10.8. Configuring VLAN switchport mode

Red Hat Enterprise Linux machines are often used as routers and enable an advanced VLAN configuration on their network interfaces. You need to set switchport mode when the Ethernet interface is connected to a switch and there are VLANs running over the physical interface. A Red Hat Enterprise Linux server or workstation is usually connected to only one VLAN, which makes switchport mode access suitable, and the default setting.
In certain scenarios, multiple tagged VLANs use the same physical link, that is Ethernet between the switch and Red Hat Enterprise Linux machine, which requires switchport mode trunk to be configured on both ends.
For example, when a Red Hat Enterprise Linux machine is used as a router, the machine needs to forward tagged packets from the various VLANs behind the router to the switch over the same physical Ethernet, and maintain separation between those VLANs.
With the setup described, for example, in Section 10.3, “Configure 802.1Q VLAN Tagging Using the Command Line Tool, nmcli”, use the Cisco switchport mode trunk. If you only set an IP address on an interface, use Cisco switchport mode access.