Forum Moderators: bakedjake
Our server has one NIC. The old IP address is assigned to ifcfg-eth0. Three other old IPs are assigned to virtual interfaces ifcfg-eth0:0, 0:1, 0:2. This setup has worked fine. These address are on a 255.255.255.248 netmask.
I'm trying to add 4 more virtual interfaces as ifcfg-eth0:3, 0:4, 0:5, 0:6 for the new IP addresses from the new ISP. These have a 255.255.255.0 netmask.
This seems to work locally. I can ping the new IPs from another machine on the same internal network (IP from same block) running W2K. The problem is, when I try to ping the Linux box from the internet, I get no response. I first thought it was an external routing problem, but if I ping the W2k box from the internet it DOES work. So the requests are getting to the local network, but the Linux box is somehow not responding properly when the request is external.
I suspect that a virtual interface cannot be on a different netmask as the real interface, but I cannot find documentation to specify if it should or should not work.
Can any networking gurus help me out here?
Thanks!
FWIW, in my experience, when moving from one ISP to another it's a good idea to have a copy of your website running from both the new and old locations until the new IP propagates. If possible, get your old ISP to set the time-to-live (TTL) on the old DNS record to something like one hour so when the change goes through it will be picked up more quickly on non-authoritative DNS servers.
We run our own webserver, so we will not be using a different box. What we are doing is moving from a DSL connection to a T1 connection. We have both connections live right now.
The W2K box is using one of the new IPs (for testing only).
>Also you can't attach IPs that don't fall into the same netmask to the same interface.
This is what I was afraid of. If this is true, then that is my problem. Is the only solution to add a second NIC to the server?
Thanks for the TTL suggestion. I hadn't thought of that.
So right now, the primary interface netmask is 255.255.255.248 and the virtuals I'm trying to add are 255.255.255.0.
If I make one of the new IPs the primary and the old IPs as virtual would that work?
I.e. is the 255.255.255.248 considered within 255.255.255.0?
(This would make it easier to delete the old IPs later anyway).
But yeah, 255.255.255.248 is within 255.255.255.0. And I don't know if it would work to make the primary IP the new one and the old one the virtual one. It's worth a try!
eth1 Link encap:Ethernet HWaddr 00:10:5A:E1:8F:F9
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
eth1:1 Link encap:Ethernet HWaddr 00:10:5A:E1:8F:F9
inet addr:10.50.0.253 Bcast:10.255.255.255 Mask:255.0.0.0
Your problem is most likely routing, since if a packet was directed to the old address, it should return through the old connection. You need to route based on source address, which is called policy routing.
DNS is probably your best bet -- lower the TTLs, make the cutover, and wait.
Sean
Of course, like the above poster stated, a virtual can have an IP and subnet totally unrelated to the main address with no problem. The only thing a 2nd nic will buy you is a seperate physical connection so that you can connect it to your other network physically.
You should do some traceroutes to confirm, but it sounds like you have incoming packets from two different networks, but probably have a default route for outgoing packets for only one network. This is only a major problem if your outgoing network provider doesn't route packets for you that don't appear to have originated from their network. This is done as an anti-spoofing measure.
Someday, I'll revisit the issue of connecting both networks to the server. I've always wondered how a redundant ISP connection to a web server would work. (It's not as easy as I first thought...)
Thanks to everyone for your help.
I've always wondered how a redundant ISP connection to a web server would work
In a nutshell, your web server only gets one IP, your router has multiple connections and uses a protocol called BGP to advertise your network out both connections. Definately best left to an ISP or large company, especially since a decent router capable of holding 2 copies of the Internet routing table is in the $30K range.
Sean