O'Reilly logo

Red Hat Enterprise Linux Server Cookbook by William Leemans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a VLAN interface

VLANs are isolated broadcast domains that run over a single physical network. They allow you to segment a local network and also to "stretch" a LAN over multiple physical locations. Most enterprises implement this on their network switching environment, but in some cases, the tagged VLANs reach your server.

Getting ready

In order to configure a VLAN, we need an established network connection on the local network interface.

How to do it…

For the sake of ease, our physical network interface is called eth0. The VLAN's ID is 1, and the IPv4 address is 10.0.0.2, with a subnet mask of 255.0.0.0 and a default gateway of 10.0.0.1.

Creating the VLAN connection with nmcli

With nmcli, we need to first create the connection and then activate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required