4G Router Overlapping Routing Settings The principle of the router The principle of the routing table is that if a host has multiple network interfaces, when it sends a packet to a specific IP address, it decides which interface to use. The specific settings Purpose, subnet mask, gateway, flag, interface 201.66.39.0255.255.255.02018.104.22.168Ueth1 201.66.37.0255.255.255.02022.214.171.124Ueth0 The host sends all the data destined for the host (126.96.36.199-188.8.131.52) in the network 184.108.40.206 through the interface eth0 (IP address is 220.127.116.11), and all the destinations are the data passing through the interface in the network 18.104.22.168. Eth1 (IP address is 22.214.171.124) is sent. The flag U indicates that the route status is "up" (i.e., active state). For a directly connected network, some software does not give the IP address of the interface as in the previous example, but only the interface. Routing Table Principle: This example only involves a directly connected host, so what about the destination host in the remote network? If you connect to the network 126.96.36.199 through a gateway with an IP address of 188.8.131.52, you can add one to the routing table: 73.0.0.0255.0.0.020184.108.40.206UGeth0 This entry tells the host that all packets destined for the host within network 220.127.116.11 are routed through 18.104.22.168. The flag G indicates that this item directs the packet to the external gateway. Similarly, you can define a route to a specific host through the gateway, and add the flag H (host): 22.214.171.124126.96.36.199188.8.131.52UGHeth0 The following is the principle of the routing table, except for special entries: 127.0.0.125184.108.40.206127.0.0.1UHlo0 Default0.0.0.020220.127.116.11UGeth1 The first principle of the routing table principle is the loopback interface, which is used by the host to send data to itself. It is usually used to test and run applications that are above IP but require local communication. This is the host route to the specific address 127.0.0.1 (interface lo0 is the "fake" NIC inside the IP stack). The second item of the routing table principle is very interesting. In order to prevent each route on the host that may reach the network on the Internet, a default route
can be defined. If there is no entry in the routing table that matches the destination address, the packet is was sent to the default gateway. Most hosts simply connect to the network through a network card, so only through one router to other networks, there are only three items in the routing table: the loop back entry, the local subnet entry, and the default entry (pointing to the router). Overlapping routes, assuming the following overlapping items in the routing table: 18.104.22.16822.214.171.124126.96.36.199UGHeth0 1.2.3.0255.255.255.020188.8.131.52UGeth0 1.2.0.0255.255.0.020184.108.40.206UGeth1 Default0.0.0.020220.127.116.11UGeth1 The reason why these routes overlap is because these four routes all contain the address 18.104.22.168. If you send data to 22.214.171.124, which route will you choose? In this case, the first route is selected, passing the gateway 126.96.36.199. The principle is to choose the subnet mask with the longest (most accurate). Similarly, the data sent to 188.8.131.52 selects the second route. Routing Table Principle Note: This principle only applies to indirect routing (through the gateway). Defining two interfaces on the same subnet is illegal in many software implementations. For example, the following settings are usually illegal (although some software will try to load balance on both interfaces): Eth0184.108.40.206220.127.116.11 Eth118.104.22.16822.214.171.124 The strategy for overlapping routes is very useful. It allows the default route to work as a route with a destination of 0.0.0.0 and a subnet mask of 0.0.0.0, and does not need to be implemented as a special case of routing software. Looking back at CIDR, the above example is still used: A service provider is given 256 Class C networks, from 126.96.36.199 to 188.8.131.52. The routing table outside the service provider knows all of these routes with only one entry: 184.108.40.206, and the subnet mask is 255.255.0.0.
E-Lins Technology informs about the 4G Router Overlapping Routing Settings.