Show MAC Address in Cisco via Command

Posted on

In this article, there will be an information delivered on how to check MAC Address in Cisco Network Devices in the Command Line.

Cisco Network Devices such as Routers, Switches maintains static MAC address entries that are saved in its startup configuration across reboots and flushes the dynamic entries.

So, in order to display that information about the MAC address entries which is displayed in the form of a table, use the show mac address-table command and type it in the command prompt provided in the CLI (Command Line Interface) within  the privilege command mode.

To enable a privilege command mode in a router, read the following article title ‘Enabling Cisco Network Device to Permit Privilege Command’ in this link. After enabling privilege command mode has already done successfully, type the ‘show mac address-table’ command in it as shown below :

show mac address-table

This is the sample of the executed output shown in the image :

Show MAC Address in Cisco via Command
Show MAC Address in Cisco via Command

Since the above device is not even connected to any other devices, it doesn’t record any MAC Address of any devices at all, show the table of MAC Address List displayed is empty. The image below shows how the device is actually located which is a single device without any connection elsewhere :

Show MAC Address in Cisco via Command
Show MAC Address in Cisco via Command

To display the output which has several contents of MAC Address List, below is another example of the command execution done by performing remote access via SSH service to a real Cisco router network device :

user@hostname:~$ ssh user@xxx.xxx.xxx.xxx
User Access Verification
Password:
Cisco xxxxx xxxxx xxxxxxxxxx (XXXX-XXXX) Software
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2012, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php
Router-Core# 

After successfully connected to Cisco Router Network Device, execute the following command to display MAC Address List :

show mac address-table

The output of the above command in the privilege command mode prompt inside the real Cisco Router Network Device :

Router-Core# show mac address-table
Legend:
* - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC
age - seconds since last seen,+ - primary entry using vPC Peer-Link,
(T) - True, (F) - False
VLAN     MAC Address      Type      age     Secure NTFY Ports/SWID.SSID.LID
---------+-----------------+--------+---------+------+----+------------------
G 22       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 32       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 83       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 84       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 85       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 86       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 87       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 88       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 89       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 90       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 91       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 92       xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 101      xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 182      xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
G 183      xxxx.xxxx.xxxx    static       -       F    F  3579.0.2596(R)
...

Since the output is too long, the rest of the output is omitted. But based on the above output, ‘show mac address-table’ is effective to display MAC Address List of any devices connected to the device where the command is being executed. The list itself is displayed in form of a table.

Leave a Reply