IPv6 prefix length
Penfold
Member Posts: 43 ■■■□□□□□□□
in CCNA & CCENT
I let my CCNA expire a while ago so I picked up Wendell Odoms 100-101 as a refresher but I'm totally stuck on IPv6!
On the section for working out prefix lengths he explains that the prefix for 2000:1234:5678:9A00:: is /56.
Ok I don't know whether I'm going about this completely wrong so I see three blocks of 16 = 48, then two nibbles so that's 48 + 8 = 56.
On the next page there is another example where 3BED:800::/44??? How is that possible I just don't get it?
On the section for working out prefix lengths he explains that the prefix for 2000:1234:5678:9A00:: is /56.
Ok I don't know whether I'm going about this completely wrong so I see three blocks of 16 = 48, then two nibbles so that's 48 + 8 = 56.
On the next page there is another example where 3BED:800::/44??? How is that possible I just don't get it?
Comments
-
Dieg0M Member Posts: 861For example:
2000:1234:5678:9ABC:1234:4567:89AB/56
The prefix where the address resides is:
2000:1234:5678:9ABC:1234:4567:89AB/56
2000:1234:5678:9A00:0000:0000:0000/56
or abbreviated
2000:1234:5678:9A00::/56
In the second example:
3BED:0800:0012:2345:2222:1234:5678:0ABC
The prefix where the address resides is:
3BED:0800:0012:2345:2222:1234:5678:0ABC/44
3BED:0800:0000:0000:0000:0000:0000:0000/44
or abbreviated in any of these ways
3BED:0800:0000::/44
or
3BED:0800:0::/44
or
3BED:800::/44Follow my CCDE journey at www.routingnull0.com -
NetworkVeteran Member Posts: 2,338 ■■■■■■■■□□I see three blocks of 16 = 48, then two nibbles so that's 48 + 8 = 56.another example where 3BED:800::/44??? How is that possible I just don't get it?
Turning to the IPv6 case, given 38ED:0811:: (a slightly simplified address) the mask must be at least 32 bits long, but could be any length between /32 and /128. The address imposes some limits on the mask, but the address alone is not enough to deduce the mask, which is why both bits of info are sent in routing updates. -
NetworkVeteran Member Posts: 2,338 ■■■■■■■■□□2000:1234:5678:9A00:: is /56. Ok I don't know whether I'm going about this completely wrong so I see three blocks of 16 = 48, then two nibbles so that's 48 + 8 = 56.
In the case of the above address, "9a" (hex) = "10011010" (binary). Thus, in the above I see three blocks of 16 = 48, then 7 bits, so /55 would actually be the shortest possible mask. Note, your way of looking at it is a good estimate of the correct answer, but without getting down and dirty with binary you're going to make small mistakes. -
Dieg0M Member Posts: 861Very well explained M. NetworkVeteran.NetworkVeteran wrote: »The address imposes some limits on the mask, but the address alone is not enough to deduce the mask
This is probably what he was getting confused with.Follow my CCDE journey at www.routingnull0.com -
Penfold Member Posts: 43 ■■■□□□□□□□I know you can't get the mask from just the address alone but the questions were (which I probably didn't explain very well) find the prefix from a given address/length e.g.:
34BA:B:B:0:5555:0:6060:707/36 and the prefix would be 34BA:B::/36
But I think I got it now after going through your posts and the book a few times so thanks for the help guys. -
WilyOne Member Posts: 131While it's true you can eliminate leading zeroes within quartets, and substitute contiguous zeros with "::", to explicitly show the 36 bits I would write the above as:
34BA:000B:0::/36