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...>:
    Setting your IPv4 configuration using nmtui
  2. Now, modify the IPv4 configuration to your liking and click on <OK>.

There's more…

Managing IPv6 ip addresses is as straightforward as configuring your IPv4 counterparts.

The options you need to use in kickstart to set your ip address and gateway are:

  • --ip: This is used to set the system's IPv4 address
  • --netmask: This is used for the subnet mask
  • --gateway: This is used to set the IPv4 gateway
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset