cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2416
Views
15
Helpful
2
Replies

STP: Comparing MAC addresses

trane.m
Level 1
Level 1

Hello,

I'm learning about Spanning Tree Protocol.

In STP, when choosing the root bridge, priority numbers are compared. If 2 priority numbers are equal, the switch with the lowest MAC address is chosen as root bridge.

But, i'm not sure how to compare MAC addresses to figure out which switch will be chosen.

Example with 2 switches:

SW1, Priority nr.: 12289, MAC: 014A.38F1.BA81

SW2, Priority nr.: 12289, MAC: 014A.3821.2981

It makes sense to me to look at the numbers as 12 small (1 character long) individual numbers, and not 3 big (4 character long) individual numbers.

But if a wanted to convert the letters to numbers, how would that look? 01410.38151.111081?

Or this that something one cannot do, so you just compare them, character by character? Meaning that, in this example, SW2 would be root bridge?

2 Accepted Solutions

Accepted Solutions

Hello

The base mac address are in hexadecimal: 

 

SW1, Priority nr.: 12289, MAC: 014A.38F1.BA81

SW2, Priority nr.: 12289, MAC: 014A.3821.2981  <  lowest base mac >

Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

Hello,

 

the way I remember it is: you compare both values, left to right, and convert the first non-matching character from hex to decimal. So in your case it F and 2. F in decimal is 15, and 2 is 2. So the top MAC address is the highest.

 

HEX: 014A.38F1.BA81
HEX: 014A.3821.2981

 

Hex / Decimal

0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
10 = 16
11 = 17

 

 

View solution in original post

2 Replies 2

Hello

The base mac address are in hexadecimal: 

 

SW1, Priority nr.: 12289, MAC: 014A.38F1.BA81

SW2, Priority nr.: 12289, MAC: 014A.3821.2981  <  lowest base mac >

Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello,

 

the way I remember it is: you compare both values, left to right, and convert the first non-matching character from hex to decimal. So in your case it F and 2. F in decimal is 15, and 2 is 2. So the top MAC address is the highest.

 

HEX: 014A.38F1.BA81
HEX: 014A.3821.2981

 

Hex / Decimal

0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
10 = 16
11 = 17

 

 

Review Cisco Networking for a $25 gift card