Research on Route tables and linux route tables in linux

Source: Internet
Author: User

Research on Route tables and linux route tables in linux
Linux has 0 ~ 255 a total of 256 route tables. The value 0 indicates unspec (not specified), and the value 253,254,255 indicates default, main, and local tables, respectively. All the tables except the preceding four tables are left to the user-specified table. Now let's talk about the functions of the above five system tables. The first is the unspec of Table 0. This table can be understood as the sum of all route tables. That is to say, all route entries in the route tables have a corresponding one in this table. In this way, you can view the route entries of all route tables in the system. Of course, the operation on the route entries in this table is also equivalent to the operation on the corresponding route entries in other tables. Therefore, be careful not to clear the route table; otherwise, all route entries will disappear. Next is the main table. This table is the most important route table. By default, all route entries added to this table are added. Local table, which stores all the route entries in the local range, that is, the route to the local address.
Linux route table settings?

Is the IP addresses of lan1 and lan1 the network number of each network segment or the IP address of a terminal in the network?
Can this be explained in detail? For example, subnet mask

Linux route table Problems

My personal understanding is as follows:
Destination CIDR block or host
Gateway address. "*" indicates the network to which the target host belongs. No route is required.
Genmask network mask
Flags. Some possible tags are as follows:
U-route is active
H-target is a host
G-route pointing to Gateway
R-Restore table items generated by Dynamic Routing
D-dynamic installation by the routing background program
M-modified by the routing background program
! -Route rejection
Metric route distance to the number of intermediate connections required for the specified network (not used in linux kernel)
Ref route entry reference times (not used in linux kernel)
Use the number of times this route entry is searched by the routing software
Iface: output interface corresponding to this route table entry
In the first route table, all the information destined for the network segment 192.168.7.0 goes to the device eth7, and so on to 192. 168.8.0 route.
169.254.0.0 was originally an addressing range provided by windows. It was designed to automatically assign IP addresses to all hosts on the local LAN when DHCP cannot obtain IP addresses, in this way, you do not need a server, but only need a network cable to achieve the effect of networking. Linux also contains this route address, probably to be compatible with windows.
The last route means that any information from 192.168.7.250 can go to any network.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.