Discover which Cisco switch port a server is connected

Share this:

This article describes how to discover which Cisco switch port a server is connected using IP address or MAC-Address information.

Solution


First step is getting the desired server’s IP address and its MAC-Address.

clip_image002

After that, you will have two discovery method options: by IP address and by MAC Address

By IP address

1. Connect to the switch either through a console or remotely and issue the command ping serveripaddress (in our case 10.130.1.163).

clip_image004

The ‘!’ marks indicates the ping was successful.

2. After that, issue the command show ip arp serveripaddress (in our case 10.130.1.163).

This will return the server’s MAC-Address.

clip_image006

3. Finally, issue the command show mac address-table address and the MAC-Address we have discovered (in our case 0050.56b8.0680).

clip_image008

The Cisco switch port that the server is connected to is displayed at the column ‘port’ (in our case, the server is connected at port GigabitEthernet2/29).

By MAC-Address

If you already have the server’s MAC-Address, just issue the command as described in Step 3 above and you are done.

Written by Andre Moreira