logo
. . .

How to add extra IP to Alma Linux 8 OS?

To add extra IP in your Alma Linux 8 OS, follow the instructions, you need to be root user or use sudo before all commands:

Step 1: First check the current connect detail:
SSH: nmcli connection show

Result will similar like below:

NAME         UUID                                  TYPE      DEVICE
System eth0  5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03  ethernet  eth0

Step 2: Here “System eth0” is your connection profile. To add this IP to the System eth0 connection profile, use the following nmcli command:

SSH: nmcli con mod "System eth0" +ipv4.addresses "192.168.100.10/32"

Step 3 (optional): You can change/add the gateway by below command, normally no need:

SSH: nmcli con mod "System eth0" ipv4.gateway "192.168.1.1"

Step 4: Restart the Network Connection, Apply the changes by restarting the network connection:

SSH: nmcli con up "System eth0"

Step 5: Verify the New IP Address, Check that the new IP address has been added successfully:

SSH: ip addr show eth0

You are done, you can see that your extra IP already response to ping.

Please rate this article to help us improve our Knowledge Base.

0 0