Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Red Hat Enterprise Linux Server Cookbook

You're reading from   Red Hat Enterprise Linux Server Cookbook Over 60 recipes to help you build, configure, and orchestrate RHEL 7 Server to make your everyday administration experience seamless

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781784392017
Length 250 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Jakub Gaj Jakub Gaj
Author Profile Icon Jakub Gaj
Jakub Gaj
William Leemans William Leemans
Author Profile Icon William Leemans
William Leemans
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Working with KVM Guests FREE CHAPTER 2. Deploying RHEL "En Masse" 3. Configuring Your Network 4. Configuring Your New System 5. Using SELinux 6. Orchestrating with Ansible 7. Puppet Configuration Management 8. Yum and Repositories 9. Securing RHEL 7 10. Monitoring and Performance Tuning Index

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 it. Perform the following steps:

  1. Create a VLAN interface using the following command:

    ~]# nmcli connection add type vlan dev eth0 id 1 ip4 10.0.0.2/8 gw4 10.0.0.1
    Connection 'vlan' (4473572d-26c0-49b8-a1a4-c20b485dad0d) successfully added.
    ~]...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime