Knowledge

Wireless router settings have overlapping routes and static routes



Wireless router settings have overlapping routes and static routes


Wireless router settings have overlapping routes and static route settings. Let's take a look at each.

Overlapping routes; high-power wireless routers

Assume that there are the following overlapping items in the routing table:

Destination Mask Gateway Flag Interface

1.2.3.4 255.255.255.255 201.66.37.253 UGH eth0

1.2.3.0 255.255.255.0 201.66.37.254 UG eth0

1.2.0.0 255.255.0.0 201.66.37.253 UG eth1

Default 0.0.0.0 201.66.39.254 UG eth1

The reason why these routes overlap is because these four routes all contain the address 1.2.3.4. If you send data to 1.2.3.4, which route would you choose? In this case, the first route will be selected via gateway 201.66.37.253. The principle is to choose the subnet mask with the longest (most accurate). Similarly, the data sent to 1.2.3.5 selects the second route.

Static route

Looking back at the routing table we have established, we have six entries:

Destination Mask Gateway Flag Interface

127.0.0.1 255.255.255.255 127.0.0.1 UH lo0

201.66.37.0 255.255.255.0 201.66.37.74 U eth0

201.66.39.0 255.255.255.0 201.66.39.21 U eth1

Default 0.0.0.0 201.66.39.254 UG eth1

73.0.0.0 255.0.0.0 201.66.37.254 UG eth0

91.32.74.21 255.255.255.255 201.66.37.254 UGH eth0

How do these entries get? The first one is added by the routing software when the routing table is initialized. The second and third are automatically created when the network adapter binds the IP address, and the remaining three must be manually added. In the UNIX system, this is through the command route. This can be done manually by the user or at the start of the rc script. The above method involves a static route, which is usually created at startup and will not change without manual intervention.