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
to9
. When you get to9
, the next step is to increment the next higher digit and start over at0
(9
goes to10
). The same applies to Hexadecimal, except that you count0
tof
(f
goes to10
). 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:
you ask what comes next. What happens when you look at it like this:
Binary counts the same way as Decimal or Hexadecimal:
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.