How To Add IP Address to Interface in CentOS
CentOS how to add multiple IP addresses to the existing network interface, this is also known as “adding a network alias”. Please note – this is not a tutorial for adding an second interface, it adds an additional IP address to the existing network card.
This article is useful for the following:
- CentOS add IP address
- Adding a second IP address in CentOS
- CentOS add multiple IP addresses
- Add IP address to interface
CentOS Add Second IP Address
Copy the existing network script:
After you have copied the file open it and edit it to look like:
Obviously enter your IP address information, I don’t think type=ethernet is actually required.
Confirm the IP address information is correct and restart the network service:
When the service restarts you should be able to access your server via the new IP address.
Note, you can add multiple IP addresses to the same interface in CentOS by creating fcfg-eth0:1, fcfg-eth0:2, fcfg-eth0:3 and so on…
thank you very much, very helpful