I to setup multiple IPs on my Ubuntu 16.04.1 server. I have it in a data center and they gave me 5 IPs range 170-174.


You need to create aliases of your network interface.

  • By creating temporary aliases using ip address add command. The aliases setup this way will be lost upon a reboot and you will need to recreate those aliases.

    sudo ip addr add xx.xx.xx.xx/xx dev eth0
    # For example
    sudo ip addr add dev eth0
  • If you need a more permanent solution, you would have to edit /etc/network/interfaces file and add alias definitions there.

Then use ip addr show command to see the changes. Then you would have to do sudo ifdown eth0 && sudo ifup eth0 to activate these settings without a reboot.

  • Ok so I did this and 4 out of the 5 ips work. The only work not working is 171. It is a /29 ip – Ajaydev Singh Sep 1 '16 at 10:26
  • since you wanna use /29, 2**(32-29) - 2 = 2**3 - 2 = 8 - 2 = 6 that means only 6 hosts are allowed to use. – Rahul Sep 1 '16 at 10:32
  • You do think its a problem with the hosting company because I added all of them but 171 is not working but others work and have no problems. – Ajaydev Singh Sep 1 '16 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.