[Winpcap-users] Getting a MAC Address

Guy Harris guy at alum.mit.edu
Sat Jan 26 20:17:20 GMT 2008


:: [F]usion[S]tream :: -- Gmail wrote:
> How does one go about retrieving a MAC Address from a device that is not 
> on a local network. Spent 2 days working on ARP before realising that it 
> supposedly only works on the local network (even though wikipedia seems 
> to say otherwise).
> 
> Say the device is behind a NAT, when i want to start sending data down 
> the line, do i use the MAC of the device behind the NAT or the MAC of 
> the router itself?

What do you mean by "sending data down the line"?

With IP, for example, if the IP implementation in a networking stack 
wants to send data to a device that's not on the local network, it 
checks its routing table to see where packets to that IP address should 
be routed, and gets back the IP address of a machine that *is* on one of 
the local networks to which the machine is attached.  It then sends the 
packet to that machine, under the expectation that said machine will 
then either send the packet to the ultimate destination, if it's 
directly connected to that machine, or to another router, if it's not.

If it's sending to the router, and it's connected to the router via a 
LAN (rather than, say, a point-to-point link), it would send the packet 
to the router's MAC address.

This means that the packets need to be sent via a routable protocol, 
such as IPv4, IPv6, or IPX.

What protocol(s) do the packets you're trying to send use?


More information about the Winpcap-users mailing list