[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

IP-aliases, sporadically changing src address for outbound traffic



Hello,

I have a debian/sarge web- and mailserver (kernel 2.6.8-2-386) with one interface and 3 IP-aliases on the same subnet (see /etc/network/interfaces below).

Today the default src address for outbound connections seems to have changed from .213 to .212 and back for no reason. I noticed this because one php-script connects to a webservice that is configured to accept connection from .213 only mailed a warning and postfix sending this warning used .212. I have mails from this server an hour before and after this warning that use .213 and I cannot reproduce the change with netcat etc. -- it's always .213. Then I found four older mails -- using .212. Funny enough the connection to the webservice works flawlessly for several weeks and I never found any of the other two IPs (.6 and .178).

I've had minor problems with IP-aliases before -- but only in the way that adding an alias to the end of /etc/network/interfaces changes the default outgoing address to the new alias-IP. But then it was a permanent change (at least I didn't notice any further changes) and you could permanently change it back with:

ip route add ... dev eth0 src ...

That was a bit annoying but not a real problem.
Now it seems to happen "somtimes" and there is not the slightest trace of anything suspicious in /var/log/messages. Plus the server is not loaded at all.

Now I'm a bit puzzled if
a) this is normal/known
b) ip route ... src ... will fix it (hard to test)

Thanks in advance,
Henrik


--- 8< /etc/network/interfaces ---

auto lo eth0 eth0:0 eth0:1 eth0:2
iface lo inet loopback

iface eth0 inet static
        address xxx.yyy.zzz.6
        netmask 255.255.255.0
        gateway xxx.yyy.zzz.1

iface eth0:0 inet static
        address xxx.yyy.zzz.178
        netmask 255.255.255.0
        gateway xxx.yyy.zzz.1

iface eth0:1 inet static
        address xxx.yyy.zzz.212
        netmask 255.255.255.0
        gateway xxx.yyy.zzz.1

iface eth0:2 inet static
        address xxx.yyy.zzz.213
        netmask 255.255.255.0
        gateway xxx.yyy.zzz.1

--- >8 ---


--- 8< ifconfig ---

eth0      Link encap:Ethernet  HWaddr 00:0C:76:62:02:A0
inet addr:xxx.yyy.zzz.6 Bcast:xxx.yyy.zzz.255 Mask:255.255.255.0
          inet6 addr: fe80::20c:76ff:fe62:2a0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:101356798 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1623084 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1961659835 (1.8 GiB)  TX bytes:1032623017 (984.7 MiB)

eth0:0    Link encap:Ethernet  HWaddr 00:0C:76:62:02:A0
inet addr:xxx.yyy.zzz.178 Bcast:xxx.yyy.zzz.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:1    Link encap:Ethernet  HWaddr 00:0C:76:62:02:A0
inet addr:xxx.yyy.zzz.212 Bcast:xxx.yyy.zzz.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:2    Link encap:Ethernet  HWaddr 00:0C:76:62:02:A0
inet addr:xxx.yyy.zzz.213 Bcast:xxx.yyy.zzz.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:63385 errors:0 dropped:0 overruns:0 frame:0
          TX packets:63385 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5385623 (5.1 MiB)  TX bytes:5385623 (5.1 MiB)

--- >8 ---

--
Henrik Heil, zweipol Coy & Heil GbR
http://www.zweipol.net/



Reply to: