▷ What is ip addressing and how does it work [very clear]
Table of contents:
- IP addressing
- IP adress
- Network and host fields and IP address type
- Subnet mask
- How to get the network and host address
- Abbreviated notation address-mask
Today, most data connection networks use the TCP / IP protocol, on which IP addressing is based. Each computer that is connected to a network needs two basic identifiers, the IP address and the subnet mask. In this article we will see what IP addressing consists of and what use they have for the Internet network.
Index of contents
IP addressing
Computers and networks that operate using the TCP / IP protocol (Transmission Control Protocol / Internet Protocol). This protocol requires that the computers that work with it have two parameters configured on their network interface, these are the IP address and the subnet mask.
IP adress
First, we have the IP address, which practically everyone will know. It is a logical address of 4 bytes or 32 bits, each one separated by a point, with which a computer or host in a network is uniquely identified.
Currently, computers have two types of IP addresses. First, there is the IPv4 address, which effectively has a length of 4 bytes (0 - 255) and which could be represented as follows:
Decimal notation (best known) | 192.168.3.120 |
Binary notation | 11000000.10101000.00000011.01111000 |
Hexadecimal notation | C0 A8 03 78 |
And the IPv6 address, which is designed for the case where traditional IP addressing falls short. In this case we will have a logical address of 128 bits, so it covers a much wider range than the IPv6 address. We will see this almost always written in hexadecimal format:
2010: DB92: AC32: FA10: 00AA: 1254: A03D: CC49
We are before a chain of up to 8 terms separated by the two points where each can represent 128 bits.
In our case, 100% of the time, we will use the traditional IPv4 address method for IP addressing, so this will be the one we see.
Network and host fields and IP address type
An IP address can be divided into two parts called network and host. Based on these two fields we will have these types of IP addresses:
- Class A: we only use the first byte to define the network where we are. The next three bytes will be used to identify the host within this network. The address range is from 0.0.0.0 to 127.255.255.255. Class A is used for very large networks since we will have addressing for up to 16 million computers. Class B: in this case we would be using the first two bytes of the address to define the network and the other two to define the host. This range goes from 128.0.0.0 to 191.255.255.255. It is also intended for size extender networks. Class C: In this case we use the first three bytes to address networks and the last byte to define the host. In this way we will have the well-known range of 0.0.0 to 223, 255, 255, 255. Class D: Class D IP range is not in common use for normal users as it is intended for experimental use and specific machine groups. This range is from 224.0.0.0 to 239.255.255.255. Class E: finally we have class E, which is also not used in normal use equipment. In this case we will have a range that starts at byte 223.0.0.0 to the rest.
Subnet mask
Once the IP addressing properties for the hosts within a network are known, we turn to another not less important parameter, which is the subnet mask.
For each IP class you can have a certain number of subnets. A subnet is a separate physical network that shares the same IP address with other physical networks, that is, we are now identifying the main network where the hosts connect.
Precisely the function of the subnet mask is to ensure that computers that share the same network identifier and that are located in different physical networks can communicate. It will be our router or server that makes the correspondence between the information of the subnet mask and the IP address of the hosts.
There are three types of subnet masks, for each of the classes used:
TO | 255.0.0.0 |
B | 255.255.0.0 |
C | 255.255.255.0 |
How to get the network and host address
Now the question is to know how a router can identify the network to which a host belongs to differentiate it from a different network. The procedure is very simple if we know the IP address and the subnet mask, so we will have to do an AND operation in binary. For example:
Host IP address: 181.20.6.19 (10110101.010100.000110.010011) Subnet mask: 255.255.0.0 (111111.111111.000000.000000)
Binary AND operation: (will only be 1 if both characters are 1)
Result: 181.20.0.0 (10110101.010100.000000.000000)
Then, this will be the network to which the host with address 181.20.6.19 belongs. Easy.
Abbreviated notation address-mask
Surely you have seen the notation of 192.168.1.1/24 or 180.10.1.1/16 quite a few times. Let's see what this means quickly.
When we see this notation what we are reading is the IP address of a host, in this case it could be the IP address of a router and the bits assigned to the identification of the network. So:
- If we have 192.168.1.1/24, it means that the first 24 bits (in binary) are destined for the network, so the subnet mask would be 255.255.255.0, and the network it belongs to would be 192.168.1.0. If we have 180.10.1.1/16, it will mean that the first 16 bits are destined for the network, then it would be 255.25.0.0, and the network it belongs to would be 180.10.0.0.
Well, it would be.
Basically, this consists of IP addressing in data transmission networks between computers. As you can see it is quite intuitive and easy to understand once you see some examples.
You can complement this information with the following:
If you have any additional questions on this matter, write us in the comment box to help you.
Ip: what is it, how does it work and how to hide it
What is IP, how does it work and how can I hide my IP. Everything you need to know about IP to navigate safely and hidden on the Internet. Meaning IP.
What is it and how does a gpu or graphics card work?
We explain what it is and how a GPU or graphics card that coexists inside your computer works. History, models and their functions in your system.
What is l1, l2 and l3 cache and how does it work?
The L1, L2 and L3 cache is an item you should know about the CPU and its performance. Learn how it works and what it is.