Weblog entry #5 for lykwydchykyn
#5
delay when using 2 IPs
Posted by lykwydchykyn on Fri 19 May 2006 at 04:51
I've played around with putting two IP's on a NIC before (e.g. -- eth0 & eth0:1), but I never could get use out of it because whenever I do it it seems to cause a delay when accessing network services, either from the box or to the box.
Well, now I have had to implement it for a server for actual reasons, and I'm wondering what exactly is causing this delay. I've observed it on at least 3 debian boxes, so I know it's not just a hardware issue or anything.
The delay seems to happen just on first access; once the service is accessed, there is no slowness; just an initial delay of 10-30 seconds.
The two IP's are on the same block, if it makes a difference, though I've observed it in situations where the IP's were on different blocks and at least once where there were two NIC's on separate blocks on the machine.
Anyone know what's up? Do I need to put in static routes or something?
Well, now I have had to implement it for a server for actual reasons, and I'm wondering what exactly is causing this delay. I've observed it on at least 3 debian boxes, so I know it's not just a hardware issue or anything.
The delay seems to happen just on first access; once the service is accessed, there is no slowness; just an initial delay of 10-30 seconds.
The two IP's are on the same block, if it makes a difference, though I've observed it in situations where the IP's were on different blocks and at least once where there were two NIC's on separate blocks on the machine.
Anyone know what's up? Do I need to put in static routes or something?
Comments on this Entry
eth0:1 would be down to using "ifconfig" which is the wrong way, ifconfig is evil.
Install iproute and do an;
"up ip addr add dev $IFACE a.b.c.d/nm"
"down ip addr flush dev $IFACE"
In /etc/network/interfaces
I have many machines with many IP addresses running Sarge, and I see no delay.
My guess would be something is doing a DNS lookup and timing out, check the reverse lookup of IP addresses is right.
Possibly there any other kit in the way? I'm thinking router or firewall, or maybe even a switch, doing something daft with arp requests.
Be aware that where the addresses are on the same IP block that routing out may be not exactly what you expect.
Install iproute and do an;
"up ip addr add dev $IFACE a.b.c.d/nm"
"down ip addr flush dev $IFACE"
In /etc/network/interfaces
I have many machines with many IP addresses running Sarge, and I see no delay.
My guess would be something is doing a DNS lookup and timing out, check the reverse lookup of IP addresses is right.
Possibly there any other kit in the way? I'm thinking router or firewall, or maybe even a switch, doing something daft with arp requests.
Be aware that where the addresses are on the same IP block that routing out may be not exactly what you expect.
[ Parent | Reply to this comment ]
Posted by Anonymous (66.236.xx.xx) on Fri 19 May 2006 at 22:30
Thanks! I will check into iproute on Monday.
Is the "ip addr" part literal, or do you mean I should put the actual ip in there? I guess I should read the man page :-).
Is the "ip addr" part literal, or do you mean I should put the actual ip in there? I guess I should read the man page :-).
[ Parent | Reply to this comment ]
I'm with you: DNS or ARP would be my guess. It'd be interesting to run tcpdump on both of those interfaces and see what's going on.
[ Parent | Reply to this comment ]