From the course: Subnetting in Your Head

DNA of an IPv4 address

From the course: Subnetting in Your Head

Start my 1-month free trial

DNA of an IPv4 address

- [Instructor] Many people make much more out of an IP address than need be. Every IP address is 32 bits 32 ones and zeroes. We divide those 32 bits into four even sections which we call octets because they each have eight bits. That's called dotted decimal notation. Now, that sounds complicated if you concentrate on the binary. But what an IP address really is is just 128 at the beginning, and then we divide by two as we move from the left to the right, because just one less power of two. So 128, 64, 32, 16, eight, four, two, one, dot. And then just do that three more times. So how do we use these values? Well, let's take an example of an IP address 192.168.1.20. How does the system produce the 192? If we have a one as the very first bit of the very first octet, then that will have a value of 128. And if we have a one in the second bit of the first octet, then that will have a value of 64. Add 128 and 64, and you get 192. So if we have ones in the 128 and the 64, but on all of the rest of the bits in that first octet we have zeroes, then the total will be 192. To produce 168, we'll need the first bit, because that's 128. We're not getting there unless we use it. We can't use the 64 because we would go over. But we need to use the 32, so now we're at 160. Can't use the 16 because we would go over, and so we'll use the eight. If we total 128 plus 32 plus eight, we get 168. To create the value of one, all we need are zeroes in all the bit values except for the one that's worth one. If we have a one in that last bit in the third octet and zeroes everywhere else in that octet, that produces a one for the octet. And then to produce the 20, we need just the 16 and the four to have ones in the fourth octet. Everything else is zero. That's how we get 192.168.1.20. And we can use these bits and these bit values to produce any IP address we choose.

Contents