Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

OVH VPS - adding IP to Ubuntu 16.04

mik997mik997 Member
edited May 2016 in General

anyone done this on Ubuntu 16.04?

I have tried the following /etc/network/interfaces config but only succeeded in locking myself out of the instance 8-}

    auto ens3
    iface ens3 inet static
    address xxx.xxx.xxx.xxx
    netmask 255.255.255.255
    broadcast xxx.xxx.xxx.xxx

    auto ens3:0
    iface ens3:0 inet static
        address yyy.yyy.yyy.yyy
        netmask 255.255.255.255
        broadcast yyy.yyy.yyy.yyy

Comments

  • RizRiz Member
    edited May 2016

    I don't think you need to specify the netmask / broadcast, this is what I'm using on my debian machines (where eth0 is my main interface) -

    auto eth0:1
    iface eth0:1 inet static
    address x.x.x.x/32
    
    Thanked by 1mik997
  • mik997mik997 Member
    edited May 2016

    hey Riz,

    thanks for the suggestion .. so I've now tried:

    auto ens3
    iface ens3 inet dhcp
    
    auto ens3:1
    iface ens3:1 inet static
    address x.x.x.x/32
    
    /etc/init.d/networking restart
    

    but still no joy :( ens3 is my primary interface btw ..

    should I be using the post-up directive perhaps ..?

  • as far as I recall, it's only possible to add IP with a reinstall

    Thanked by 1mik997
  • mik997mik997 Member

    @century1stop said:
    as far as I recall, it's only possible to add IP with a reinstall

    lol that's a bit extreme imo .. ;P

    crap OVH documentation is here

    I have a support ticket open but who knows when I'll get a reply ...

  • you follow the guide after IP binds to your vps interface. their information on IP assignment is in the additional IPv4 section, "only available on install". something of that sort, I may be wrong though hehe

    @mik997 said:

  • budi1413budi1413 Veteran

    How about using "ifdown ens3; ifup ens3;" instead "/etc/init.d/networking restart".

    Thanked by 1mik997
  • mik997mik997 Member

    @budi1413 said:
    How about using "ifdown ens3; ifup ens3;" instead "/etc/init.d/networking restart".

    genius! ifup ens3:1 did the trick :) :)

  • budi1413budi1413 Veteran

    Glad it work. :)

Sign In or Register to comment.