02-11-2010 07:42 PM - edited 03-06-2019 09:41 AM
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.
I also get the MAC address. So what MAC address is announced in BPDU's to decide the root of the network ?
Thanks
Tahir.
02-11-2010 08:06 PM
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.
02-12-2010 04:57 AM
Thanks Norman for your reply.
The document you refered is much technicial. I only need the answer of one question.
Thanks
02-12-2010 05:26 AM
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
Luxembourg
02-12-2010 05:41 AM
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 ?
Thanks.
02-12-2010 05:51 AM
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
Luxembourg
12-30-2014 03:16 AM
Try, sh switch
12-29-2018 11:01 AM
10-15-2013 08:20 AM
[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
05-29-2014 12:20 PM
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.
02-25-2021 03:26 PM - edited 02-25-2021 06:39 PM
"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).
07-07-2017 05:38 AM
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)
12-29-2018 10:31 AM
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.
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.
12-29-2018 12:15 PM - edited 12-29-2018 12:16 PM
Dear Moallina 15,
Greetings,
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
00E0.F7A7.E9A5
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
00E0.F7A7.E901
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
00E0.F7A7.E902
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
12-30-2018 01:25 PM
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 Ethernet...it 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.
Regards
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide