0

FYI: I've read everything on Serverfault related to this question and have faced a different issue.

Simply put, I've got one server (apache2) with couple of sites on it. It currently has 1 ip. I'm trying to assign/add another ip to that server, so I can give each site a different ip for ssl purposes.

I am not lucking out. The new ip simply is unreachable, I've pinged it. This is what I've got below, what am I doing wrong.

auto lo
iface lo inet loopback

auto eth0 eth0:0 eth0:1

iface eth0 inet static
address 70.116.5.244
netmask 255.255.255.0
gateway 70.116.5.1

#THE NEW IP
iface eth0:0 inet static
address 26.175.217.102
netmask 255.255.255.0

#PRIVATE IP
iface eth0:1 inet static
address 192.168.158.88
netmask 255.255.128.0

NOTE: THESE IP'S ARE TWEAKED BUT RELATIVE

I've read many questions here 90% similar to this but most actually have the IP respond, not this case. Thanks

netstar -r output

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         gw-u6.linode.co 0.0.0.0         UG        0 0          0 eth0
70.116.5.0      *               255.255.255.0   U         0 0          0 eth0
26.175.217.0    *               255.255.255.0   U         0 0          0 eth0
192.168.128.0   *               255.255.128.0   U         0 0          0 eth0
andrewk
  • 163
  • 8
  • 1. Is there any netfilter involvement? 2. Why not just work this through linode support? – EEAA Nov 24 '12 at 07:03
  • 2
    Your example IPs are in different netblocks (I'm assuming this is similar to the actual setup). I notice that you have a gateway set for eth0, but not eth0:0. Can you show the output of `netstat -r`? I suspect (but am not sure) that the return path doesn't know where to go. – jackhamm Nov 24 '12 at 07:16
  • Added `netstat -r` output in question. @EEAA linode does not have support such issues. – andrewk Nov 24 '12 at 07:21
  • 1
    I've been a linode customer for 7 years. Give their support a try. At the very least, they'll point you to a library article with copypasta for your distro. – EEAA Nov 24 '12 at 07:26
  • Is the upstream router actually routing traffic to the new IP? If you traceroute to it externally, do you get as far as the upstream router before the traceroute fails? – Mike Scott Nov 24 '12 at 07:46
  • Wow, All it needed was a reboot, I thought `service apache2 restart` was enough but not in this case. I had to reboot the server so linode's backend systems can configure routing for the new IP address. This was not in the documentation (too obvious I assume), but their support told me it. Thanks @EEAA – andrewk Nov 24 '12 at 07:47
  • 1
    The requirement to reboot your Linode VPS is documented in the [Linode Library](http://library.linode.com/networking/configuring-static-ip-interfaces), as well as in the [Linode wiki](http://www.linode.com/wiki/index.php/Multiple_IPs). – Michael Hampton Nov 24 '12 at 13:57
  • Earlier I specifically asked if you had rebooted. And you said that yes, you had done that. Well I've undeleted that answer - you can accept that now. – EEAA Nov 24 '12 at 14:25

2 Answers2

1

Linode requires that you reboot your node after adding the additional IP to it before their routing will work.

Have you done that?

EEAA
  • 108,414
  • 18
  • 172
  • 242
1
  1. Where did you try to ping from -> to ?

  2. Can you ping the new address locally. from it self?

    2.1. If not, try to add it some the broadcast (the last ip in the network ) and add default routes to the network

  3. I can see your netstat -r point to * in the gateway output, they normally points to 0.0.0.0 as they are virtual addresses they should be using the primary network as gateway eth0. But the virtual addresses was physical, then you could have assigned each card they own gateway.

Therefore give the eth0:0 and eth0:1 the broadcast information default gateway set to 0.0.0.0 and set up a route for them to point all to route everythin to the primary network.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
Joakim
  • 39
  • 2
  • 7