Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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

Configuring IPv4 settings

Changing your IP addresses is pretty straightforward in the old ifcfg-style files, and it's actually pretty simple using NetworkManager tools as well.

As kickstart is only used to set up a system, it is not relevant to go in depth into this matter in this recipe.

How to do it…

Let's change our current IPv4 address and gateway for eth1 to 10.0.0.3/8, with 10.0.0.2 as the default gateway.

Setting your IPv4 configuration using nmcli

Perform the following steps:

  1. Set the ipv4 information by executing the following command line:
    ~]# nmcli connection modify eth0 ipv4.addresses 10.0.0.3/8 ipv4.gateway 10.0.0.2
    
  2. Now, run the following to verify the information:
    ~]# nmcli connection show eth0
    

    Here is an example output of the preceding commands:

    Setting your IPv4 configuration using nmcli

Setting your IPv4 configuration using nmtui

The nmtui tool takes a bit more work, but the end result remains the same. Perform the following steps:

  1. Start nmtui, select the interface that you wish to modify, and click on <Edit...
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 $19.99/month. Cancel anytime