Adding an additional address manually can be done using Network Manager. To determine which network interface you need to assign the additional address to, run the following command:
ip a s
In the example, the default interface is specified as "eth0". Now, run the following command:
nmcli connection show
In our case, the interface name is "System eth0". We will be adding the address to this interface.
Enter the command: nmcli connection modify <Interface name in quotes> +ipv4.addresses <IP address/CIDR>
Then bring the interface up: nmcli connection up "System eth0"
Reboot the server: reboot
Debian/Ubuntu
We will add the additional address using systemd-networkd. First, check the network interface to which the IP address should be added:
ip a s
Open the file located at: /etc/systemd/network/10-eth0.network
In the opened file, assign the second address:
For example, your first address may be 192.168.0.25/24, and the second one 192.168.0.26/24.
Save the file.
Restart systemd-networkd: