How to add secondary IP address using nmcli

On an AlmaLinux 9 server, I wanted to add secondary IPs to a server. First, I checked the network interface device name used in the server with the command

The current public IP address was assigned to the network interface with the name enp13s0. To see how it is configured, I run

That showed the server am using Network Manager to configure the IP address

You can add additional IP adding using nmcli command.

Example

To make the IPs online, run

Now ip a command lists all secondary IP addresses

To list all network interface devices using nmcli, run

Back to IP

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *