[ltp] automatic network probing
Robert Hajime Lanning
linux-thinkpad@linux-thinkpad.org
Fri, 21 Nov 2003 21:59:41 -0800 (PST)
<quote who="AndréWyrwa">
> This just brought up a question i was asking myself some time ago.
>
> I'd like to probe for in which network i am without interfering too much
> with the network. To explain a bit more, imagine the following situation
> (the actual problem I had was solved by using a dock and wireless at
> home and no dock and wired lan at work, but I'm still interested in the
> case):
You would bring up the interface with some address like "0.0.0.1" then
run tcpdump on it and look for broadcast traffic, you should atleast see
ARPs running by.
You could identify a network by getting enough MAC matches. The only
issue with this is that the network profile may change if some key ethernet
cards go belly-up. You would have to keep learning the network over time,
as servers get upgraded and moved.
You would also have to make network choices on a more fuzzy match. Because,
if you look for a specific MAC, it may take up to a minute or so to see it.
You would take, say the first 10 MACs that you see, and match it up to a
list of atleast twenty. If atleast 3 to 4 match, then you are on that
network.
And watch for other mobile machines. They could be moving to the same
networks you do.
--
END OF LINE
-MCP