7

So yes, I'm pretty new to networking and I hope this isn't a stupid question. I couldn't find an answer on google nor could I find something here (but I'm also sure about the terminology), so I thought I give it a shot:

Lets say there is a large local network that spans multiple buildings. I can connect to that network via WLAN or via cable and from multiple spots of course. Is there a way to tell on what spot I am currently located?

Or in other words: Is there something that identifies a certain connection point (router, hotspot) and that I can access from a client computer to recognize that I've been here before?

3 Answers 3

9

That's going to depend on how the network is designed/implemented and how exactly you are connected. Please note that I'm not implying everything I'm suggesting would be "polite" or free of side effects. You seem to be asking about, basically, how to reverse engineer the network design and topology.

Wireless APs will identify themselves, so you can look at your wireless interface and note the name/BSSID, then build up a map of where you are physically and what APs you see. There are applications which will show you signal strength of multiple APs that are in range, so you can get a feel for what is nearby; Doing that from a a few different places lets you roughly work out what AP are where. And, you may be able to simply find the APs visually for more hints to the layout.

For physical cabling (and this is all true for Wireless APs too,) you can note the IP network you find yourself within. You could also look at the default gateway you are given by DHCP. You can ping scan the IP network or even service sweep to note "stationary" things like printers, which you can then physically find, to provide you with more physical clues.

More difficult is teasing out any virtualization that is designed in. On the wireless APs, you have their names so you can physically separate them; while your IP networking might be the same on every AP if you're on the same VLAN.

If you have administrative access to the physical networking gear, then it's just a matter of looking for your computer's MAC address in the networking gear.

1
  • Great answer! Creating kind of a map of the network is even a level higher than I originally aimed to. I also realize that I have a lot more to learn but you gave a great route for orientation. Thanks!
    – basilikum
    Jun 19, 2013 at 22:50
8

For the wired connections, if there is a discovery protocol running, then you can typically find out to which switch you are connected, which port in the switch, which VLAN, and other information. Don't be surprised if this isn't running on a port to which you connect, as it is generally a best practice to have this turned off.

There are multiple discovery protocols, standards based or proprietary, but it is most common to find one of two. The first is CDP or Cisco Discovery Protocol, which as the name implies is something run by Cisco devices. The second is LLDP or Link Layer Discovery Protocol, which is a IEEE standard for exchanging this information.

You can use tcpdump in any *nix based OS (you may need to install, but generally it already will be) to view this information with the following commands (substituting the appropriate interface).

For CDP:

tcpdump -nn -v -i eth0 -s 1500 -c 1 'ether[20:2] == 0x2000'

For LLDP:

tcpdump -nn -v -i eth0 -s 1500 -c 1 'ether proto 0x88cc'

You can also use Wireshark or any other packet capture tool if you prefer (display filters in Wireshark are just "cdp" or "lldp"). Additionally, there are software packages that are written to listen for this information, but I am not familiar with them myself (I generally stick to captures).

6

The exact way to check depends a bit on the OS and/or drivers of the client, but for wifi you should be able to look up the BSSID (Broadcast Service Set Identifier) which is the MAC address of the access point. On OSX you can check this by alt-clicking on the wifi icon.

You can check the forwarding tables of your switches and access points to find out which one originates the MAC address of your device if you want to check looking from the network perspective.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.