Network configuration in Debian/Ubuntu
You can manually specify it in the configuration file:
nano /etc/network/interfaces/interfaces.d/50-cloud-init (For Debian)
After adding the additional IP address on the network interface, save the file with ctrl + X key combination.
And enter the command:
An additional IP address has been added to the Debian network interface.
nano /etc/netplan/*.yaml (For Ubuntu)
After adding an additional IP address to the network interface, save the file with the ctrl + X key combination.
You can check the saved settings file with the command:
Then, if all is well, apply the settings on the fly:
Network configuration in CentOS.
You can manually specify it in the configuration file. The configuration of network interfaces is stored in /etc/sysconfig/network-scripts/ifcfg-ethX.
X is the number of the physical interface.
Example file /etc/sysconfig/network-scripts/ifcfg-eth0
How to start editing the file: write the command "nano" before the file itself. Example: nano /etc/sysconfig/network-scripts/ifcfg-eth0
Additional addresses (aliases) are configured in the ifcfg-ethX:Y files.
X is the physical interface number, Y is the alias number (numbering from 0).
(ONLY FOR INSTALLING 2,3,4 addresses(and IPV6)! NOT REQUIRED WHEN CONFIGURING A SINGLE IPV6 )
Example file: /etc/sysconfig/network-scripts/ifcfg-eth0:1
How to start editing the file: write the command "nano" before the file itself. Example: nano /etc/sysconfig/network-scripts/ifcfg-eth0:1
After adding the additional IP address on the network interface, save the file with ctrl + X key combination.
And enter the command:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article