I am using Ubuntu 10.10

I want to change my VPS's default IP. My VPS comes with two IPs, but it always show the first IP 184.22.111.120 when I check with this page: http://www.lagado.com/proxy-test

But I want to use the second IP: 184.22.111.121

#vi /etc/network/interfaces outputs the following:

auto venet0
iface venet0 inet manual
        up ifconfig venet0 up
        up ifconfig venet0 0
        up route add default dev venet0
        down route del default dev venet0
        down ifconfig venet0 down


iface venet0 inet6 manual

auto venet0:0
iface venet0:0 inet static
        address 184.22.111.120
        netmask 255.255.255.255

auto venet0:1
iface venet0:1 inet static
        address 184.22.111.121
        netmask 255.255.255.255

Thanks a lot!

link|improve this question

25% accept rate
feedback

migrated from stackoverflow.com Sep 27 '11 at 20:20

This question came from our site for professional and enthusiast programmers.

1 Answer

Reassign them so that the desired IP is under the auto venet0:0 block as that will be the default:

auto venet0:0
iface venet0:0 inet static
        address 184.22.111.121
        net mask 255.255.255.255

auto venet0:1
iface venet0:1 inet static
        address 184.22.111.120
        netmask 255.255.255.255
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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