Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 1999 14:33:15 -0500 (EST)
From:      Matt Behrens <mbehrens@globaldsl.com>
To:        Dan Nelson <dnelson@emsphone.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Getting ARP replies on a connected network w/o having IP configured?
Message-ID:  <Pine.LNX.4.10.9911101323010.589-100000@jerry.globaldsl.com>
In-Reply-To: <19991109224317.A14176@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dan, thanks for your help.  I read up a little more on tcpdump and got the
info I need.  I think this might work pretty well; my laptop is currently
sitting next to me "learning" the characteristics of this LAN by observing
packets.  (Actually, it's already seen all it needs to know, but it
doesn't hurt to leave it) :-)

Now I wonder if you or any of the other -questions folk might be able to
answer another question -- is there an (easy) way to make a specific host
(either by its IP or by its MAC address) put a packet on the wire
indicating its IP and MAC, from an interface with no IPs?  I can capture
packets off the wire with tcpdump on an interface that's up but has no
address; but on some of the more quiet networks it might take awhile,
almost making it worthwhile to configure the interface manually :-)

On Tue, 9 Nov 1999, Dan Nelson wrote:

> In the last episode (Nov 09), Matt Behrens said:
> > I have a laptop that frequently moves from network to network and I'd
> > like it to intelligently configure itself based on MAC addresses of
> > other hosts it sees on the local LAN segment; essentially
> > "fingerprinting" the LAN it's on.
> 
> So you'll have it assign itself a (hopefully predetermined) IP based on
> the MAC addresses it sees?  Interesting idea.
>  
> > Obviously this gets done as root. :-)  Is there some function that I
> > can use, or maybe some shell command?  (Just executing "arp -a" with
> > an unconfigured interface either returns nothing or hangs.)
> 
> Try the tcpdump command.  You don't even need to listen for arps; all
> ethernet packets have a MAC address.  "tcpdump -e -n -c 10" will dump
> 10 packets with ethernet headers, in a nice easy-to-parse format.
> 
> If you want to write something in C, you can directly use the packet
> capture library.  Man pcap for the details.
> 
> -- 
> 	Dan Nelson
> 	dnelson@emsphone.com
> 

Matt Behrens <mbehrens@globaldsl.com>
System Engineer, Global DSL Communications



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.9911101323010.589-100000>