03-03-2022
10:02 PM
- last edited on
03-04-2022
01:14 PM
by
Translator
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?
Solved! Go to Solution.
03-03-2022
11:52 PM
- last edited on
03-04-2022
01:15 PM
by
Translator
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 >
03-04-2022 01:36 AM
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
03-03-2022
11:52 PM
- last edited on
03-04-2022
01:15 PM
by
Translator
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 >
03-04-2022 01:36 AM
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
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