Good day everyone. Well, let's begin today. We're going to make this video to talk a little bit about IP addressing version 4 and subnets. My name is Gabriel Marcano, I'm an instructor at the Cisco Academy UCB in Maracay, Venezuela, and well, I decided to make this video because it's a rather complicated topic to teach and study, and well, as support for the IP addressing course and class. What is an IP address? First of all, well, an IP address is nothing more than a 32-bit binary number, just as computers and electronic devices see it. It's simply a 32-bit number. These 32 bits are divided into bytes. We know that a byte is 8 bits, therefore an IP address would be made up of 4 bytes. Each of these bytes is transformed into its decimal notation and separated by periods. The first B, in the example we have here on screen, 131 108 122 204, becomes 131 108.12 204. Once that The IP address has been divided into bytes and transformed into decimal. Each byte is what is called dotted decimal notation. This IP address, which is composed of 32 bits, consists of a network identifier and a host identifier. A certain number of bits in the IP address belong to the network identifier, and a certain number of bits belong to the host identifier. In this case, the division is in half. But that can vary, as we will see later. Here we have 16 network bits and, of course, the remaining 16 bits, which are for the host. What defines the number of network bits and the number of bits? Well, it's the address class. In 1981, IPv4 addresses were assigned according to classful addressing, what is called the old class. Depending on the IP address, a specific class was assigned, and it was determined how many bits belonged to the network and how many bits belonged to the host. What are the address classes? Well, there are basically five classes, but we are only going to study three. There we have class A, class B, and class C. We are not going to study class D and class E because they are not relevant. In this course, when dealing with Class A addresses, the first 8 bits represent the network, and the remaining 24 bits represent the host. When dealing with Class B addresses, the first 16 bits represent the network, and the remaining 16 bits represent the host. And when dealing with Class C addresses, the first 24 bits represent the network, and the remaining 8 bits represent the host. Now, how do we determine the class of a specific IP address? For example, we have the address 19218 10050. How can we determine the class of this IP address? In this case, to determine the class of an IP address, we refer to the first octet. What decimal value does the first octet have? Here is a table where you can see the ranges of values for each IP address depending on the value of its first octet. In this case, the first octet has a value of 192. Therefore, it falls within the range of addresses belonging to Class C. It is always good practice to verify the first octet in every IP address we see, in every IP address we are configuring, in every network we are studying. To verify the first octet value and determine the address class, this class scheme was used with IP version 4 addresses. Note that the class scheme is no longer used because IP version 6 addressing does not work with classes; this only applies to the IP version 4 protocol. For example, we have the address 200 100 210 200. Based on our existing knowledge, we know it is a Class C address because the first octet value is 200. Therefore, we know that in a Class C address, the first, second, and third octets represent the network identifier, and the fourth octet represents the host identifier. In this other example, we have the address 172 16 25. We know from the value of its first octet that it is a Class B address. Therefore, the network identifier is contained in the first two octets (the first 16 bits), and the host identifier is contained in the last two octets ( 16 bits). In this case, we have the address 172 16 25 with its network prefix. 16 bits is a way of explicitly stating which bits belong to the network. In this other example, we have a Class C address, right? Where we place a 24-bit network prefix. The network prefix tells us how many bits of the IP address represent the network, and therefore it is understood that the remaining bits, that is, the remaining 8 bits, are for the host. Masks and prefixes are simply two different ways of representing the same thing: how many network bits and how many host bits an IP address has. If we take the address 192.168. 168.100, we know that there are 24 network bits. Here we can represent a mask by setting the number of bits belonging to the network to ones and the number of bits belonging to the host to zeros. If we denote this number in decimal notation (Ada), we will obtain a number like this: 255.255 255.0. In the case of class B, we have 16 bits, so we can represent a mask as 255 25500. In the case of class A, we know that there are 8 network bits, so we can represent a mask with 88 bits set to one and 24 bits set to zero. Represented in dotted decimal notation, we obtain a number that is 25.0.0. These are network masks. We can represent this IP address with a slash prefix 24, or we can represent it with a network mask. These are two different ways of representing the same thing. If we take the IP address and its mask and perform an AND operation with these two numbers in their binary value, we will obtain the address of the network to which that IP belongs. A network address will always be Expressed in dotted decimal notation, the Host portion will always be zero. Here we have a table with different IP addresses, the class they belong to, the default mask, and the network address. Notice that in network addresses, the Host portion is zero. That's a good way to identify a network address. Now, what are subnets? Here we have a network address, 10.0.0, which is also represented in binary. Similarly, we have the mask represented in its decimal notation, 25.0.0, and also represented in its binary notation. We have 24 Host bits. What happens when I have so much Host addressing but I'm not going to use all the addresses? What happens to the other address space? It's simply lost. One of the things we can do to save or not waste address space is to create subnets. A subnet is nothing more than a division of a larger network. To create subnets, you have to take bits from the Host portion and reassign them to the network portion. We change them in the mask. There we have an example. Look. The 4 bits with which the Host portion begins are used to establish the mask with four additional bits. Initially, it has eight; we add 4 additional bits to the mask, and the mask would then have a prefix of 12, or a mask in dotted decimal notation of 255.2 40.00. If we borrow 4 bits, we perform a 2 to the 4 power operation, which shows that we can create 16 subnets. That is, we are dividing this Class A into 16 subnets. Of course, each of these subnets is much smaller than the initial Class A. It is important to realize here that it is the mask that explicitly establishes which are the network and subnet bits that I am establishing. In this example, for a Class C network and a default mask of 255.255 255.0, the addressing space for Host is much smaller. But what happens if I only want to use 10 devices here? If I use these 8 Host bits with the default mask, I would be wasting addresses because I would only be using the 10 that I need to change the mask to explicitly define how many subnet bits I'm going to use. In this case, I change the mask to use three additional bits. Therefore, the mask becomes 27 bits, expressed in network prefix notation, or a mask like 255 255 255 224. With 3 bits, I can create eight subnets. 2 to TR equals eight subnets. Here we have the created subnets. Look closely here where the bits I'm borrowing are. There are three bits I 'm borrowing to address these subnets. So the first subnet would be 192 168 168.0 because within the 3 additional bits I'm borrowing, the initial value is 00. But what would the second network be, the one that follows this one? Well, if you can see, these three additional bits change, and the value of the new subnet, the value of the next subnet, is 192 168 168 32. Why? Because the next combination of bits within these 3 bits is 001 and the value of the octet together with the 5 additional bits is 32 the next subnet the subnet 192.168. 168.6 cu is the third available network for this range of created subnets. The fourth subnet would be subnet 96. Notice very well how the bits we borrow from the Host portion change. All the combinations that can be made with these three bits are the subnets we have created. Each of these networks has 5 Host bits. If we take an example, the network 192 168 168 224, we can see that the first Host is 192 168 168 225. Notice very well the value of the octet. The subnet is 111, but the Host is the first of that subnet. Subsequently comes Host 192 168 168 226. We can realize that the network is 111 at the binary level. Subsequently comes the third Host, which is 227, the fourth Host, which is 228, and so on until we reach the last Host, which is all ones except for the last bit and the broadcast address, which is the last address within that Range Oh
Estructura de las direcciones IP, prefijos de red y máscaras. Subredes (Subnetting)