In linux, the concept of routing is distributed. linux routes mainly store three route-related data. A physically connects to the host address information table ARP table of the local machine; B determines how a network address should go through the data table during network access, and C queries the route cache address data table recently used. (1) neighbor structure. neighbour_table is a data structure containing information of all adjacent elements connected to the local machine. This structure corresponds to an array of neighbor, neighbor corresponds to the neighbor of the adjacent host. Due to different protocols, multiple neighbour_table instances are connected through the next in neighbour_table; in the neighbor structure, there is also a network interface device (net_device pointer) used to represent the host connected to the neighbor, the MAC of the network interface, and the MAC (2) FIB structure of the neighbor, the routing rules are saved in FIB. Through the query and calculation of FIB data, you can obtain the method to reach the specified address. The general route query order is: first to the route cache to find; then the rule is calculated from FIB. (3) route structure, indicating the route Cache