Reputation: 11
in our production line we place a chunk of Windows devices (PCs, Notebooks, …) on a shelve for the preinstallation and test procedure. The devices are swapped out frequently.
I would like to digitally map those shelve and Show it with some Information About that device on a screen. To figure out which device is placed on which Point I would like to query the MAC address of the port on the switch where the device is connected to.
It could be something like a one hop Tracert just with MAC address instead of IP Address.
Are there any Methods that I can programmatically use. I would prefer some C# Methods.
Thanks in advance.
Upvotes: 1
Views: 212
Reputation: 137497
You need to use a managed Ethernet switch for this.
Any Ethernet switch will maintain a table that maps a MAC address to a port on the switch. But, a regular "dumb" switch has no facility for exposing this information to you.
If you are using a managed switch, then the question becomes very specific to the particular make and model of switch that you're using. Cisco, Netgear, etc. will all present this information in different ways.
A managed switch may publish this information via SNMP.
Upvotes: 1