IPv6 Subnetting – How to Subnet IPv6 Addresses

ipip addressipv6subnet

I was making an IPv6 exercise in which I had to configure two Router Interface: G0/0 and G0/1

G0/0 uses 2001:DB8:FADE:00FF::/64 and I have to use to next subnet for G0/1

This is the answer, but What I don't get to understand is, how to move the bits:

G0/0 2001:DB8:FADE:00FF::1/64 
G0/1 2001:DB8:FADE:0100::1/64

00FF - 0000 0000 1111 1111
0100 - 0000 0001 0000 0000

Let's say:

000F - 0000 0000 0000 1111

What is going on after? The last bits back to zero, while I increment +1 on third part? Like 0000 0000 0001 0000 = 0010 (Hex).


Update:

I would like to know how develop this binaries until the Hex value gets FFFF

Example:

00FF - 0000 0000 1111 1111     
       0000 0001 0000 0000
       0000 0001 0000 0001
       0000 0001 0000 0010

Trying to simplify, the fourth part reaches 1111 while previous parts keep the values, after

  0000 0001 0001 1111
  0000 0001 0010 1111

Now, the third part starts to build until 1111, the next is second part and etc..

Am I correct? I'm not getting to develop that values :\

Best Answer

IPv6 is easy when it comes to this since you aren't really doing subnetting the way IPv4 does. Under normal circumstances, with very few exceptions, you have one subnet size (/64). All you need to do is be able to count in hexadecimal.

An IPv6 address is just a single 128-bit number. There are two parts: the Network ID, and the Interface ID. Each is 64-bits. You only need to concentrate in the Network ID for what you want to do. The text representation of IPv6 is broken into words separated by colons for ease of reading. Some would call this oxymoronic when it comes to big, ugly IPv6 addresses, but try to read one without the colons.

In Decimal, you count 0 to 9. When you get to 9, the next step is to increment the next higher digit and start over at 0 (9 goes to 10). The same applies to Hexadecimal, except that you count 0 to f (f goes to 10). If you want to throw Binary into the mix, each four Binary digits equal one Hexadecimal digit. Hexadecimal <-> Binary is much, much easier than throwing Decimal into the mix the way IPv4 does.

I think you are confusing yourself by thinking about blocks. In your example:

000F = 0000 0000 0000 1111

you ask what comes next. What happens when you look at it like this:

000F = 0000000000001111

Binary counts the same way as Decimal or Hexadecimal:

Binary  Decimal Hexadecimal
    0       0        0
    1       1        1
   10       2        2
   11       3        3
  100       4        4
  101       5        5
  110       6        6
  111       7        7
 1000       8        8
 1001       9        9
 1010      10        a
 1011      11        b
 1100      12        c
 1101      13        d
 1110      14        e
 1111      15        f
10000      16       10
10001      17       11
10010      18       12
10011      19       13

and so on...

It's really all simple counting. You should just get comfortable with doing it in Hexadecimal. One big reason you do IPv4 in Binary is that you need to do bitwise operations to figure out where the boundaries are, but with IPv6, you are really just given a single 64-bit boundary. There is far less bit manipulation.

Related Topic