Date: Fri, 25 Aug 1995 11:24:37 -0700 (PDT) From: "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com> To: SimsS@Infi.Net Cc: hackers@freebsd.org Subject: Re: ARP'ing (Discovery of IP Interfaces on a subnet) Message-ID: <199508251824.LAA02693@gndrsh.aac.dev.com> In-Reply-To: <199508251319.GAA02117@freefall.FreeBSD.org> from "Pavlov's Cat" at Aug 25, 95 09:19:20 am
next in thread | previous 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
> }
Real fast way that will get you a bunch of them in a very short time
is ``ping -c 2 192.168.69.255'' if your netmask is 0xffffff00. Then just
look at the arp cache. Note the count needs to be 2 or the ping stops after
the first packet comes back instead of waiting for a bit.
This can cause a bit of a storm as all host try to reply to you at once,
but it is usable.
Then a quick arp -a will show you which IP addresses responded that DNS
can not look up as they won't have a hostname :-).
--
Rod Grimes rgrimes@gndrsh.aac.dev.com
Accurate Automation Company Reliable computers for FreeBSD
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508251824.LAA02693>
