Showing results for 
Search instead for 
Did you mean: 

switch mac address


Hi guys,

Ok , I am studying little bit of switching technology for my day to day job requirement. May be following are very basic questions for you guys but really difficult to understand for me.

  • How one can fine the MAC address of a cisco switch. For example, when I run "sh ver" I get the MAC address. & when I run "sh mac addre-table"

       I also get the MAC address. So what MAC address is announced in BPDU's to decide the root of the network ?

  • How to fine the port priority of a cisco switch ?



20 Replies 20


BPDU's are used Spanning-tree, and while there is more to be explained than that, the easiest way is to point you to the section of cisco's site that covers the configuration, explanation of and adminitration of spanning-tree, and its uses.

I hope this helps, if you need anything else just post any additional questions.

Thanks Norman for your reply.

The document you refered is much technicial. I only need the answer of one question.

  1. How to find the MAC address of a cisco switch ?
  2. "sh mac address-table" shows mac addresses. "sh ver" show mac address. What is the actual MAC address of a cisco switch, Please.


Your switch is likely to have many MAC addresses.

If you do a show interface for each of the interfaces, you will probably find that each one has a different MAC address.

There is one "master" MAC address for the switch, known as the Bridge ID.  You can see that be doing a show spanning-tree and looking for the "Bridge ID" (not necessarily the Root ID).

If you do a show mac-address-table, those are not the MAC addresses of your switch, but the MAC addresses of the things attached to your switch, together with the ports they are attached to.

Does that help?

Kevin Dorrell


Yes Kevin , it is good explaination but when we run "show version" we see the MAC address. So is this MAC address the Bridge ID that is used in spanning-tree for the selection of root bridge ?


Not all switches will tell you the base MAC address for a show version. For example, my 4500s do not, but my 3560s do so.  And in my 3560s, yes, the MAC address shown in show version is the same as the Bridge ID shown in show spanning-tree.

But the really reliable way to find out the Bridge ID used in spanning-tree is to do a show spanning-tree.

Kevin Dorrell


      Try, sh switch

it depends on the IOs and platform version. I give the most i know:
show version some old version
show sh int e0/0 | i bia >>>>>only for first module 0/0 otherwise it increments
show tech | i Amd >>>> it s the first line is the switch mac
shoz spanning-tree >>>put your switch spanning-tree priority 0 for all vlan or one vlan >>> you have the Root ID and the bridge is.root is this switch of course.
for 4000 and 6000 series is a little different and the show module will give you an idea about all macs used in the specific card.

[Kevin Dorrell] If you do a

show mac-address-table

, those are not the MAC addresses of your switch, but the MAC addresses of the things attached to your switch, together with the ports they are attached to.

i agree though if you type show mac-address-table | i No  then I think you'll find what you're after.

thank you

The mac address of a switch is usually the preceding number of the MAC-Address on the first port .


Eg: The mac-address on the first port gi0/1 is  0019.e728.8101. The mac address of  the switch would be 0019.e728.8100.






"sh mac address-table" is not MAC addresses for the switch ports. These are the MAC addresses for the devices attached to the specific port. Cisco switches use the MAC address table to "learn" MAC addresses of devices on ports to reduce discovery broadcasts once the entry is added to the MAC table. If more than one device is attached to a single port on the switch (maybe through a hub) then the MAC table will have multiple MAC addresses (for each device on the single port).


I know this is old but I recently learned this command. Try it out. It shows the mac address of the interface, not what's attached.

show interfaces | i (.* line protocol is )|(.* address is)

I also came across to figure out how to get this mac address. I found in 3 ways. BTW I tested this with Packet Tracer 7.2 for Cisco 3560 switch not sure, if this is true for the actual hardware.

  • sh ver (check the Base ethernet MAC Address output)
  • sh interfaces | i CPU 
  • sh int vlan 1 or the vlan interface associated with your root switch when you issue "sh spanning tree"

I hope this helps others that are trying to figure out this. Again this is based on Packet Tracer and default settings for electing a root bridge. 


Dear Moallina 15,



Actually, you are right, you can get the switch's mac address from these commands, in addition to the command:

#show spanning-tree 

which shows the same mac address that is shown by the other commands!


The most interesting that get my attention when you have mentioned the # show int vlan 1, and what I would like to share, that each SVI should get a unique mac address as the default one (vlan 1), and the logic of the switch of giving mac addresses to the created SVI is to change in the last 2 characters of the switch mac address itself, and start addressing by 01, then 02 and so on, each time you create a new vlan and make its SVI up, it will directly give it a mac address according to this logic! 


For example, 

1. type #show version

you can get now the mac address of the switch itself that is used in the STP election, for example 


2. create vlan 5 by typing #vlan 5

then make its SVI up by typing #int vlan 5

now, you can use the command #show int vlan 5, to get the mac address of the SVI of vlan 5,

you will find it 


this 01, is not representing the conversion of 5 (as it's vlan 5) to hexadecimal, it's just representing the first SVI you have created in the switch.

3. if you configured one more vlan and make its SVI up, it will get 


regardless the vlan has a higher value (i.e 20) than the first one that you have created which was value 5, even if you would create the new one with lower value (i.e 4) than the first one that you have created it, it would be the same.


So, the only factor that controls the value of the last 2 characters in the SVI, is the precedence of vlan and it's SVI creation!


Sounds interesting to try ? Please try it and give us your feedback, if it's a useful information that can add something to your experience and knowledge!

FYKI, it can be tested via Cisco Packet Tracer.


Thanks in Advance!


Andrew Khalil 

Hi Khalil,    

 About the last Hex XY or lets say last byte is split in 2 part XXXX YYYY. One part is the slot number and the second part 4 bits are for the port number when you have a fixed number of slot and type( i will explain latter)  . Once again it depends on your platform, stack, module, IOS version and the type of port Ethernet, Fast s different from one to another. sometimes it first XXXX are port and YYYY are slot.

 I  tested with this version adventerprisek9-15.1 with only 2 slot and 4 port each.i did a quick test by creating 3 vlans :

Vlan2                  unassigned      YES unset  administratively down down    
Vlan100                unassigned      YES unset  up                    up      
Vlan200                unassigned      YES unset  down                  down    
Switch#sh tech | i SVI      
  Hardware is Ethernet SVI, address is aabb.cc81.f000 (bia aabb.cc81.f000)
  Hardware is Ethernet SVI, address is aabb.cc81.f000 (bia aabb.cc81.f000)
  Hardware is Ethernet SVI, address is aabb.cc81.f000 (bia aabb.cc81.f000)

Same mac like the switch
Switch#sh spanning-tree root id
VLAN0001         8001.aabb.cc01.f000
VLAN0100         8064.aabb.cc01.f000

In your test it seems to add 1 to the last Hex of the switch mac add  like In this version>>>

Switch Ports Model              SW Version            SW Image                 
------ ----- -----              ----------            ----------               
*    1 26    WS-C3560-24PS      12.2(55)SE9           C3560-IPSERVICESK9-M  

512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address       : 00:16:46:39:E8:80

 I have 24 Fast Ethernet and 2 Gigabit slot0 With vlan 1 up.

Switch# sh tech | i SVI
  Hardware is EtherSVI, address is 0016.4639.e8c0 (bia 0016.4639.e8c0) For vlan 1 and

I created 1 new Vlan and that s increment the last Hex
 sh tech | i SVI
  Hardware is EtherSVI, address is 0016.4639.e8c0 (bia 0016.4639.e8c0) Vlan 1
  Hardware is EtherSVI, address is 0016.4639.e8c1 (bia 0016.4639.e8c1)
  Hardware is EtherSVI, address is 0016.4639.e8c2 (bia 0016.4639.e8c2) New Vlan

For the Fast Ethernet it begin fro  e881 last Hex of switch mac 80 1000 0000 and start with 81.82.83 till 8F then the next mac for the next port  will be 0016.4639.e890 1001 0000 . if you have less then FFFF  will always have
tast  number= Last bit
But again, it depends on your platform and the type of port.i explain Why:

 In my test, I noticed that the first SVI vlan has Hex e8c0 and the next Mac Hex e8c1 is the first Giga Ethernet G0 / 1 and the second Giga Ethernet G0 / 2 was classified in the Fast Ethernet HEX e880, but not in the range e8c0 .

The most important thing is to know your  switch mac add  and this is your ROOT hardware address. The choice of the 2 last byte depends may be on some hardware  algorithm implemented  by Cisco.




Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: