[PLUG] changing IP addresses

Jason LaPier jason.lapier at gmail.com
Tue Oct 18 16:31:39 UTC 2011


Hey all - I need someone to check my work on something. I have a remote
server out there and the ISP needs to change IP addresses. I have a couple
of addresses on this box. What I'm thinking: I should be able to just add
the new addresses to /etc/network/interfaces (this is Ubuntu 10.10), right
after the old addresses and if I restart the networking services, I'll still
be able to access it by its old IP addresses. Then when they make the switch
at the network level, the box will be accessible by its new addresses (we'll
ignore DNS changes for this question). My only concern is whether or not I
can add multiple gateways for multiple IP addresses to the same interface; I
don't see why not, but this is one of those things I'd love to get
confirmation on before I cut myself off from a remote server :)

Here's what my updated /etc/network/interfaces file would look like:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
    address aaa.aaa.152.150
    netmask 255.255.255.0
    gateway aaa.aaa.152.1
auto eth0:0
iface eth0:0 inet static
    address aaa.aaa.152.106
    netmask 255.255.255.0
auto eth0:1
iface eth0:1 inet static
    address aaa.aaa.152.149
    netmask 255.255.255.0

# adding these new addresses
auto eth0:2
iface eth0:2 inet static
    address bbb.bbb.42.111
    netmask 255.255.255.0
    gateway bbb.bbb.42.1
auto eth0:3
iface eth0:3 inet static
    address bbb.bbb.42.112
    netmask 255.255.255.0
    gateway bbb.bbb.42.1


Does anyone see any problems with this? Does anyone know how to test syntax
or configuration on this file before I restart my services?

Thanks!

- Jason L.



More information about the PLUG mailing list