Skip to Content
Red Hat Enterprise Linux Server Cookbook
book

Red Hat Enterprise Linux Server Cookbook

by William Leemans
December 2015
Intermediate to advanced
250 pages
4h 41m
English
Packt Publishing
Content preview from Red Hat Enterprise Linux Server Cookbook

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

CentOS 7 Server Deployment Cookbook

CentOS 7 Server Deployment Cookbook

Timothy Boronczyk

Publisher Resources

ISBN: 9781784392017