0

I have a LAN consisting of switches connected to each other then to some devices, How to get the mac address of the switch connected to a specific port on the main switch then get the ports and device names who have their mac address present in the switching table.

I know it is a trivial question but I am so confused and google has disappointed me for the first time.

3
  • First of all, do the spoke switches have layer 3 interfaces, or management interfaces? If they are "dumb" layer 2 switches, they may not have a MAC?
    – Baldrick
    Jun 19, 2013 at 14:01
  • the switch mac is not the problem it is how to get the devices connected to this switch and the port they are on and their mac addresses using the cli Jun 19, 2013 at 14:07
  • 1
    You could start by telling us what make and model these switches are.
    – joeqwerty
    Jun 19, 2013 at 14:45

1 Answer 1

0

The switch probably doesn't have a MAC address that you care about. What you care about is the switching table, which is the table that the switch uses to list which MAC addresses are available through which ports.

If you have a managable switch, this table should be viewable through the management interface. Refer to your documentation, the magic word is probably "switching" or "forwarding" or "bridge".

If you have a snmp-enabled switch, you can probably query the snmp table directly. This will require at least some messing around with net-snmp, and possibly some scripting if you are up for that. Alternatively there are tools available which can extract this information for you and display it, such as NetDisco.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .