IP addresses consist of two main components: a network designation part and a host designation part.

In addition, each IP connection requires at least one unique IP address. But generally, establishing IP communications requires two additional components: the subnet mask and the default gateway address.

A subnet mask is required in all IP implementations. It determines which part of the address belongs to the host and which part to the network. For this, the logical AND operation is used. The AND operation in binary arithmetic is very simple. It essentially represents the multiplication of values ​​in the same positions.

To determine the network address (the part of the IP address that determines which network it belongs to), simply multiply the values ​​of the position of the binary representation of the IP address and the values ​​of the corresponding positions of the binary representation of the subnet mask. The result is a binary number that needs to be converted back to decimal to get the network address. After that, it becomes possible to apply routing. Routing refers to the action of redirecting a packet from one logical network (or subnet) to another. And a router is just a device that does that kind of action.

If it becomes necessary to transfer information from one host to another, the sender's host takes the IP address of the recipient's host and its own IP address (check it on the site https://ip-locations.org/), after which the "AND" operation is performed with both addresses. If the result obtained for both addresses is the same, the sender's host assumes that it is on the same logical network as the recipient's host, and direct communication is possible between them. And if the results are different, then it is assumed that the hosts are on different logical networks (i.e. separated by a router) and therefore must use a router to communicate with each other.

At first glance, the router appears to be doing very simple tasks. But in reality, it must have information about all the networks to which it is directly connected in order to be able to redirect packets transmitted by hosts to them. In addition, the router must correctly route packets from hosts to these networks. Finally, it must restrict (or eliminate) broadcasts. It is the last function that determines the need to use the first and second of the above functions.

Let's see how these actions are performed in practice. To send information to any host, you need to know the MAC address (or other Layer 2 address) of that host. This problem in a flat network (usually called a flat network, not segmented by a router) is easy to solve. To determine the MAC address, you just need to use ARP broadcast. But flat networks have serious scalability drawbacks because once a broadcast message has been sent, all hosts receive and process it.

For example, it is enough to imagine that on the Internet about every five seconds, there are broadcasts of requests for IP addresses from 100 million hosts. In this case, each host will receive approximately 20 million packets every second. If the reader suspects that most hosts will find it difficult to handle so many packets (especially since they are mostly connected using low speed lines, such as 56K modem connections), then he is indeed right. Assuming the packets are 60 bytes in size, each host would need to process roughly one gigabyte per second (gigabytes, not gigabits). Therefore, each host will need an OS-192 (at 9.953 Gbps) or faster connection to be able to transfer any data. This does not even take into account the possibility of an avalanche-like increase in the volume of broadcasting, which occurs if one of the devices begins to transmit broadcast packets at maximum speed. Even LAN connections can stop working when such a problem occurs, so you can only imagine what will happen on most WAN connections.

For this reason, routers are used to segment flat networks into hierarchical networks consisting of multiple broadcast domains. A broadcast domain is a portion of the network to which broadcasts are limited. Routers segment networks into broadcast domains to avoid overloading all devices on the network. 


Read More

Comments (0)

There are no comments posted here yet

Leave your comments

Posting comment as a guest. Sign up or login to your account.
Attachments (0 / 3)
Share Your Location