"IP address" is indispensable for understanding routing. Before we delve into routing, let's review the basics of IP addresses.
An IP address is information that corresponds to an address on a network. It is assigned to hosts such as personal computers, smartphones, and servers, and IP packets are forwarded using this IP address as a clue. Before learning about routing, let's first cover the basics of IP addresses.
An IP address is a 32-bit string of ``1''s or ``0''s. However, if it is written in binary, it is difficult for humans to understand. Therefore, it is common to divide it into 8-bit (1 octet) units and convert each to a decimal number.
How to represent IP addresses and subnets[Click image to enlarge]For example, to convert the IP address "11000000101010000000000101100100" to a decimal number, first divide the IP address "11000000.10101000.00000001.01100100" into 8 bits each, then divide each into 10. Convert to base number and write as "192.168.1.100".
The role of the "subnet mask" is to specify the "network part" (also called the prefix) that represents the network in the IP address. A 32-bit bit string of 1s or 0s, like an IP address, is written by dividing it into 8 bits each. The part "1" is the network part. The "0" part is the host part. The host part is used to identify terminals within the network.
For example, the subnet mask whose upper 25 digits are the network part is "11111111.11111111.11111111.10000000". If converted to decimal number, it can be expressed as "255.255.255.128".
However, it is difficult to understand in the same notation as the IP address. Therefore, "CIDR (Classless Inter-Domain Routing) notation" is often used, which indicates the length of the network part by putting "/" after the IP address and following it. For example, in "192.168.1.100/25", the upper 25 bits are the network part.
Now let's look at the basic mechanics of routing.
Networks that use IP, such as corporate networks and the Internet, are mainly composed of routers.
The role of the router is to forward the IP packets sent by computers connected to the company network to the destination IP address. If the IP packet received by a router is destined for a network directly connected to that router, no complicated processing is required.
Routing is a function that selects the optimum route[Click image to enlarge]However, if multiple networks are used to reach the destination, it is necessary to select the optimum route. If you don't forward the packets to the proper path, they will be detoured, delayed, or lost along the way.
That's where routing comes in. When a router receives an IP packet, it looks up the destination IP address in the IP header. Then refer to the routing table to see if the corresponding IP address is registered.
A router finds the optimal route based on its routing table[Click image to enlarge]Generally, the routing table contains the destination IP address, the IP address that indicates the next transfer destination (next hop), and the connection to the network. The number of the port where the For example, assume that a router connected to networks X, A, and C receives a packet destined for network Y from a terminal in network X. In this case, the router consults its own routing table and determines that it should forward the packet from port 2 to network A.
When a packet arrives for a network that is not registered in the routing table, it is forwarded to a network called "default route". Generally, the destination to the default route is expressed as "0.0.0.0/0".
Forward packets addressed to addresses not in the routing table to the default route [Click image to view larger image]This article is for paying members only. Please log in or apply on the next page.
Next page Selected by Longest Match