Command to find which Server NIC is Connected to which Cisco Switch Port

Written by James McDonald

February 6, 2013

Command to find out which ethernet card is connected to which Cisco switch port

show mac-address-table  | include b8ac.6f98

  10    b8ac.6f98.4cdf    DYNAMIC     Gi0/23
   1    b8ac.6f98.4cd7    DYNAMIC     Gi0/8
   1    b8ac.6f98.4cd9    DYNAMIC     Gi0/3

Where the above values are:
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----

Note: You may have to ping the ip of the server NIC to get the MAC to appear in the switch mac-address-table

Use show mac-address-table and then narrow it down by piping the output to the include command restricted to part of the servers MAC  address

Display your server MAC addresses with:

 ifconfig -a | grep HWaddr
eth0      Link encap:Ethernet  HWaddr B8:AC:6F:98:4C:D7
eth1      Link encap:Ethernet  HWaddr B8:AC:6F:98:4C:D9
eth2      Link encap:Ethernet  HWaddr B8:AC:6F:98:4C:DB
eth3      Link encap:Ethernet  HWaddr B8:AC:6F:98:4C:DD

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

How to Research a CPU Upgrade

How to Research a CPU Upgrade

Upgrade Time! Doing a lot of VMWare Workstation virtualization to create labs for self-study and training. Finding...