lkml.org 
[lkml]   [1999]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Why no printk for duplicate IPs?
Date
From
Peter Benie wrote:
> Marc Merlin writes ("Re: Why no printk for duplicate IPs?"):
> > On mer, sep 29, 1999 at 11:47:29 +0100, Alan Cox wrote:
> > > > So, is it correct that for IPv4, linux won't report the fact that
> > > > another machine is answering ARP requests for one of its IPs?
> > > ARP Replies are unicast
> >
> > good point.
> >
> > However, at least Solaris, Irix and 95/NT give you a warning when someone
> > steals your IP (at runtime, not ifconfig time).
> > I suppose they do an ARP request on their own IP after answering an ARP
> > request themselves, and watch for an answer.
> >
> > Any reason we can't do that?
>
> An alternative approach is to log when we receive a broadcast IP from an
> external interface which is apparently from one of our own addresses.

Yes, THAT's it.

You use the ARP REQUESTS of the double to detect that it's using your
IP. That's the "runtime" check.

As I was the original one to suggest doing the gratuitous ARP in the
first place, and people have convinced me that not ifconfiging the
interface is NOT a good idea, I've done some more thinking:

The "don't ifconfig it" is good for when someone is manually playing
with ifconfig, and making a typo. The "ifconfig anyway" approach is
good for servers which happen to boot during a "hostile takeover".

How about printing a message, and waiting 10 seconds before
continueing to ifconfig the interface? That will annoy the
slippery-finger-sysadmin to the point of reading the message and
pressing control-C to prevent the mixup.

Note that if you happen to have an important old server sitting
somewhere and you are test-driving the new machine, the new machine is
likely to be faster and get registered in other people's arp caches
for quite a while even if the "bad" situation lasts just a few
seconds.

Roger.

--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.122 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site