Linux strategic routing application and in-depth analysis

xiaoxiao2021-03-06  71

Linux Strategic Routing Application and In-depth Analysis 2002-12-12 · · Li Yuanjia ·· Yesky Previous 1 2 3 4 IP Route Adaptation (IP Route) Routing Table and Rule Composition System, can complete the management and lookup Work, but in order to make the routing of the IP layer more efficient, in the Linux routing system, all IP layers and RPDB adaptation work, and the function of Route Cache. The routing interface of the call interface IP layer is divided into a transmission routing interface and a receiving routing interface: When the route interface IP layer is sent, the IP_ROUTE_OUT function will be called when the route work is sent. After completing the simple conversion of some key values, this function will first find routing in the cache. If the failure will call IP_ROUTE_OUTPUT_SLOW, IP_ROUTE_OUTPUT_SLOW is called Fib_lookup to find routing in the routing table, if hit, first in Add this route to the cache, then return the result.

ip_route_out route.hip_route_output_key route.c 1984; ip_route_output_slow route.c 1690; "IP layer routing interface receiving a packet has been received, if required routing, call function ip_route_input, ip_route_input Looking now cache, if the call fails ip_route_inpu ip_route_input_slow IP_ROUTE_INPUT_SLOW Touch Fib_lookup to find routing in the routing table, if hit, first add this route in the cache, then return the result.

IP_ROUTE_INPUT_SLOW ROUTE.C 1312; "FIP_ROUTE_INPUT ROUTE.C 1622;" F Cache Routing Cache Save is the most recently used route. When IP is routed in the routing table, if the hit will increase the route in the routing cache. At the same time, the system will also check if the project in the routing cache has failed, and if the failure is cleared.

转载请注明原文地址:https://www.9cbs.com/read-109794.html

New Post(0)