Adding second ip address Ubuntu 16.04

Discussion in 'Technical' started by Kronz, Jul 13, 2017.

  1. Kronz

    Kronz New Member

    How do I add a second IP address to a Ubuntu 16.04 machine?

    So far, I did the following:

    1. Opened /etc/network/interfaces/
    2. Added the following lines
    iface eth0 inet static
    address X.X.X.X
    netmask 255.255.255.0

    when I ping the new IP from the same computer, it responds to ping, but when I ping it from a different PC it says DESTINATION HOST UNREACHABLE

    Any idea ?
     
  2. Tomislav Aurednik

    Tomislav Aurednik Member HowtoForge Supporter

    same network controler
    iface eth0:1 inet static
    address X.X.X.X
    netmask 255.255.255.0

    diffrent network controller
    iface eth1 inet static
    address X.X.X.X
    netmask 255.255.255.0

    you have to start/restart the second network interface
     
  3. Kronz

    Kronz New Member

    Yes, I did that and still the second IP doesn't work.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    are you sure that the network interface is eth0 and not something like ens33 or so? What is the name of the interface of the first IP that you have already?
     

Share This Page