Skip site navigation (1)Skip section navigation (2)
Date:               Fri, 25 Aug 1995 09:19:20 -240
From:      "Pavlov's Cat" <Pavlov's.Cat>
To:        hackers@freebsd.org
Subject:         ARP'ing (Discovery of IP Interfaces on a subnet)
Message-ID:  <199508251319.GAA02117@freefall.FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Greetings, hack-folks.  (Sorry for being a little off-topic, but I'm coming
straight to the experts)

My shop has a problem managing IP addresses.  This is only being compounded
by the roll-out of Win-95, since now *everybody's a Net-Expert ;-).

Problem is: Users are configuring their boxes with arbitrary IP addresses.  
By this I mean, they'll go over to the next cubicle, snoop at the IP address 
and then go back and configure a "similar" address in order to get IP running 
on their box.  Something like:  "Gee, Joe Blow is 192.168.69.69, huh?  Well, 
it's 1:30 right now, so I'll make my box 192.168.69.130."

You can probably imagine that this is *not* a "Good Thing(tm)".

I've looked at a DHCP implementation to help solve this problem, but until I can 
round up a Non-NT DHCP server (is there a "Free" one?) I'm in a jam.  Bootp 
isn't an option because most of the boxes we're running don't have a bootp 
client capability.

I figured that I could cobble up a little hack that works kind of like the 
following nugget of meta-code:
	for ( i=0 ; i<256 ; i++ ) {  // look for every IP in the subnet
		MacAddress = arp("192.168.69", i );  // anybody out there?
		if (MacAddress)	// If I got a MAC address from IP address
			printf("192.168.69.i\t",MacAddress); // show it
	}

This would give me a list of the MAC addresses of the interfaces connected to 
the local segment.

Then I got to thinking (always dangerous!) and decided that I could probably
hack up a script that banged this output against *my* canonical list of
assigned addresses and show me those IP addresses that I don't know about. 
(Then I can hunt down these rogues (dogs that they are) and comandeer their
ethernet adapters until they learn to play nice on the net.)

Before I jump in and make the all-singing, all-dancing ARP discovery toolkit, 
is there a package somewhere that does this sort of thing?

Some background:
I've got RMON'ed Cabletron hubs, but they don't know about IP-layer stuff, 
just datalink layer stuff. 

Sun NetMangler isn't any help here.

Spectrum sucks.  At least for this kind of thing.

Ultimately, I'd like to "cron" this thing so every couple of hours or so
it'd tell me who's on the verge of creating an address collision with
another node.

If you've got any ideas, I'd sure like to hear about 'em.

Again, sorry for being off-topic, but the FreeBSD brain trust is too potent 
to ignore.

Thanks!

--
...sjs...

Steve Sims  (SJS7)                                    SimsS@Infi.Net
Systems Engineer, IPC Technologies, Inc.          Virginia Beach, VA
"Everyone wants to save the Earth; 
   Nobody wants to help Mom do the dishes."         ...P.J. O'Roarke



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508251319.GAA02117>