Mailing List Archive

ARP problem race condition
Well,

I've found an interesting, but not totally unexpected race condition
under DR in 2.2.x that I've managed to create when installing VIP's on a
machine in DR mode, and I figured I'd stick it on the list in case someone
else runs into it later.

Basically, the cause is this:

ifconfig dummy0 10.0.1.15
echo 1 > /proc/sys/net/ipv4/conf/dummy0/hidden

You'll notice that there's going to be a small gap between the two which
allows an ARP request to come in, and for the server to reply. And yes,
it is big enough to be bitten by -- I've been bitten twice by it so far :)

The question then is, how do I solve it?

Try changing the order to this:

echo 1 > /proc/sys/net/ipv4/conf/default/hidden
ifconfig dummy0 10.0.1.15
echo 0 > /proc/sys/net/ipv4/conf/default/hidden

That way, it defaults to being hidden when it's first created.

Another possible method would be to configure dummy0 with a bogus IP
address, then set the hidden flag, but I think I prefer the first method.

Anybody else experience this problems and have other ways to address the
problem?

Thanks,

Kyle Sparger - Senior System Administrator
ksparger@dialtoneinternet.net - http://www.dialtoneinternet.net
Voice - (954) 581-0097 x 122
"Forget college, I'm going pro."
Re: ARP problem race condition [ In reply to ]
Hello,

On Thu, 15 Feb 2001, Kyle Sparger wrote:

> Well,
>
> I've found an interesting, but not totally unexpected race condition
> under DR in 2.2.x that I've managed to create when installing VIP's on a
> machine in DR mode, and I figured I'd stick it on the list in case someone
> else runs into it later.
>
> Basically, the cause is this:
>
> ifconfig dummy0 10.0.1.15
> echo 1 > /proc/sys/net/ipv4/conf/dummy0/hidden
>
> You'll notice that there's going to be a small gap between the two which

This can be a big hole :)

> allows an ARP request to come in, and for the server to reply. And yes,
> it is big enough to be bitten by -- I've been bitten twice by it so far :)
>
> The question then is, how do I solve it?
>
> Try changing the order to this:
>
> echo 1 > /proc/sys/net/ipv4/conf/default/hidden
> ifconfig dummy0 10.0.1.15
> echo 0 > /proc/sys/net/ipv4/conf/default/hidden
>
> That way, it defaults to being hidden when it's first created.
>
> Another possible method would be to configure dummy0 with a bogus IP
> address, then set the hidden flag, but I think I prefer the first method.
>
> Anybody else experience this problems and have other ways to address the
> problem?

Known effect :)

On boot:

echo 1 > /proc/sys/net/ipv4/conf/all/hidden

# For each hidden interface:
modprobe dummy0
ifconfig dummy0 0.0.0.0 up
echo 1 > /proc/sys/net/ipv4/conf/dummy0/hidden

# Now set any other IP address after boot

> Thanks,
>
> Kyle Sparger - Senior System Administrator
> ksparger@dialtoneinternet.net - http://www.dialtoneinternet.net
> Voice - (954) 581-0097 x 122
> "Forget college, I'm going pro."


Regards

--
Julian Anastasov <ja@ssi.bg>
Re: ARP problem race condition [ In reply to ]
On Thu, 15 Feb 2001, Kyle Sparger wrote:

> I've found an interesting, but not totally unexpected race condition
> under DR in 2.2.x that I've managed to create when installing VIP's on a
> machine in DR mode, and I figured I'd stick it on the list in case someone
> else runs into it later.

I'll stick it in the HOWTO.

> Basically, the cause is this:
>
> ifconfig dummy0 10.0.1.15
> echo 1 > /proc/sys/net/ipv4/conf/dummy0/hidden
>
> You'll notice that there's going to be a small gap between the two which
> allows an ARP request to come in, and for the server to reply. And yes,
> it is big enough to be bitten by -- I've been bitten twice by it so far :)
>
> The question then is, how do I solve it?
>
> Try changing the order to this:
>
> echo 1 > /proc/sys/net/ipv4/conf/default/hidden
> ifconfig dummy0 10.0.1.15
> echo 0 > /proc/sys/net/ipv4/conf/default/hidden
>
> That way, it defaults to being hidden when it's first created.

does it work?
why do you echo the "0"?

My preferred way of handling the arp problem is by having a host route on
the router to the VIP which goes to the director and not allowing packets
to the VIP to get onto the real-server network. This option is not always
available (eg if you don't control the router).

Joe

--
Joseph Mack mack@ncifcrf.gov
Re: ARP problem race condition [ In reply to ]
> does it work?

It works for me.

> why do you echo the "0"?

Well, I might just be configuring other interfaces later that I _do_ want
responding to ARP requests. Technically, it's not necessary, I just find
it useful in my particular setup.

> My preferred way of handling the arp problem is by having a host route on
> the router to the VIP which goes to the director and not allowing packets
> to the VIP to get onto the real-server network. This option is not always
> available (eg if you don't control the router).

That is absolutely the best way. But, like you said, it's not always
available :)

Thanks,

Kyle Sparger - Senior System Administrator
ksparger@dialtoneinternet.net - http://www.dialtoneinternet.net
Voice - (954) 581-0097 x 122
"Forget college, I'm going pro."