1/256ths of a second (STP Timers)
showint
Member Posts: 68 ■■□□□□□□□□
in CCNA & CCENT
Hello,
I'm considering BPDU Message Content. It's written in the table that Message age/ Maximum age/ Hello time/ Forward delay is 1/256ths of a second, with no further explanation. What does it (1/256ths of a second) exactly mean?
Thank you.
I'm considering BPDU Message Content. It's written in the table that Message age/ Maximum age/ Hello time/ Forward delay is 1/256ths of a second, with no further explanation. What does it (1/256ths of a second) exactly mean?
Thank you.
Comments
-
APA Member Posts: 959Way out of scope for CCNA\CCENT but it is the format that the timer values are encoded into the BPDU for transmission.
802.1D IEEE standard states:
=====
9.2.8 Encoding of Timer Values
Timer Values shall be encoded in two octets, taken to represent an unsigned binary number multiplied by a unit of time of 1/256 of a second. This permits times in the range 0 to, but not including, 256 s to be represented.
=====
Basically what happens is we have two octets to represent timer values.
Two octets == IIIIIIIIIIIIIIII = 16 bits
If I turned on all those bits it would be 2^16 = 65536 (we count from 0 so basically that is 65535).
1/256 of a second = 0.00390625
65535 * 0.0390625 = 255.99609375
The timer value range that can be represented in the two octets are from 0 - 255 (255.99609375)
Hope that helps. I find it unlikely the CCNA\CCENT would test you on such fluff though..... nice to know but definitely not something you would ever need to call upon.
CCNA | CCNA:Security | CCNP | CCIP
JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
JNCIS:SP | JNCIP:SP -
Priston Member Posts: 999 ■■■■□□□□□□So if the timer is 2 seconds its 00000010 00000000?A.A.S. in Networking Technologies
A+, Network+, CCNA -
showint Member Posts: 68 ■■□□□□□□□□Priston, no, it is not.
1 second = 1000 msec
1/256 = 1000/256 ≈ 3,9 msec
2 seconds = 2.000 msec
2000 msec/3,9 msec ≈ 512
that is, it will be 0000 0010 0000 0000 -
APA Member Posts: 959No problems.
and you have it correct... 2 bytes considered as whole... 2 would be represented as 0000000000000010
CCNA | CCNA:Security | CCNP | CCIP
JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
JNCIS:SP | JNCIP:SP -
Priston Member Posts: 999 ■■■■□□□□□□Priston, no, it is not.
1 second = 1000 msec
1/256 = 1000/256 ≈ 3,9 msec
2 seconds = 2.000 msec
2000 msec/3,9 msec ≈ 512
that is, it will be 0000 0010 0000 0000A.A.S. in Networking Technologies
A+, Network+, CCNA -
showint Member Posts: 68 ■■□□□□□□□□Oh sorry. First I calculated incorrectly and thereby confused even APA. His answer was very detailed! super!
You have it correct. I checked it in Wireshark.
Hello Time:
2 seconds = 0x0200, that is, 0000 0010 0000 0000 in binary
Max age:
1 second = 1000 msec
1 sec/256 = 1000 msec/256 = 3.90625 msec
20 seconds = 20 * 1000 = 20 000 msec
20 000 msec/3,90625 msec= 5120
5120 is 0001 0100 0000 0000 in binary
If we compare it with WireShark's input, 0x1400 (which is 0001 0100 0000 000 in binary), it will match our calculated value.
Forward Delay:
15 seconds = 15 * 1000 = 15 000 msec
15 000 msec/ 3.90625 msec = 3840
3840 is 0000 1111 0000 0000 in binary
Wireshark's input 0x0f00 (which is 0000 1111 0000 0000 in binary) matches as well, which in turn proves that we got it right.
P.S. Now I'd like to learn how root path cost fits in 4 bytes) -
APA Member Posts: 959Yup, ignore my last post.
I explained it well the first time..... then failed to double check your answer.
Glad to be of some help
CCNA | CCNA:Security | CCNP | CCIP
JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
JNCIS:SP | JNCIP:SP