From owner-freebsd-hackers Fri Aug 25 06:19:30 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id GAA02127 for hackers-outgoing; Fri, 25 Aug 1995 06:19:30 -0700 Received: from Jessica.RatsNest.VaBeach.VA.US (h-antique.richmond.infi.net [204.117.145.168]) by freefall.FreeBSD.org (8.6.11/8.6.6) with SMTP id GAA02117 for ; Fri, 25 Aug 1995 06:19:27 -0700 Message-Id: <199508251319.GAA02117@freefall.FreeBSD.org> Comments: Authenticated sender is From: "Pavlov's Cat" Organization: Organized? Me? Hah! To: hackers@freebsd.org Date: Fri, 25 Aug 1995 09:19:20 -240 Subject: ARP'ing (Discovery of IP Interfaces on a subnet) Reply-to: SimsS@Infi.Net Priority: normal X-mailer: Pegasus Mail for Windows (v2.01) Sender: hackers-owner@freebsd.org Precedence: bulk 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