IPv6 prefix length

PenfoldPenfold Member Posts: 43 ■■■□□□□□□□
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?

Comments

  • Dieg0MDieg0M Member Posts: 861
    For 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::/44
    Follow my CCDE journey at www.routingnull0.com
  • NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    Penfold wrote: »
    I see three blocks of 16 = 48, then two nibbles so that's 48 + 8 = 56.
    That's a reasonable approach. You've (just about) proved the prefix must be /56 or longer.
    another example where 3BED:800::/44??? How is that possible I just don't get it?
    It's just like IPv4. Given "207.0.0.0", the subnet mask must be at least eight bits long, but could be any length between /8 and /32. E.g., if it's a /16 the next subnet is 207.1.0.0. If it's a /24, the next subnet is 207.0.1.0.

    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.
  • NetworkVeteranNetworkVeteran 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.
    I suppose it's worth pointing out a more subtle way you're going wrong in both cases is not using binary.

    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.
  • Dieg0MDieg0M Member Posts: 861
    Very well explained M. NetworkVeteran.
    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
  • PenfoldPenfold 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.
  • WilyOneWilyOne Member Posts: 131
    While 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
Sign In or Register to comment.