3.8. Route reference

The route/ section of the IPv4 sysctl's contains mainly some loosely related variables that changes the effect in the route cache, or the routing code in the kernel. Some will simply change how many error/warning messages are printed by the routing code, and others will change the garbage collection timings in the route cache.

3.8.1. error_burst

This variables is used in conjunction with error_cost to limit how many ICMP destination unreachable messages the routing code will send out. This variable tells the function the maximum amount of tokens that we have available, while the error_cost variable tells us how many tokens are used up by each ICMP destination unreachable packet. If error_burst is emptied and we receive more packets for that host, we will ignore them.


ICMP destination unreachable messages are generally sent when our host, or router, does not know how to reach a specific host or network. This may be for three basic reasons:

  1. We can not reach the nexthop to the destination.

  2. We have no route set up for the network segment or host.

  3. We have a routing rule or route set to unreachable, throw or prohibit.

During these three sircumstances, the networking code sends out ICMP Destination Unreachable messages with three different codes if necessary:

  1. ICMP host unreachable in case the host should be directly connected to a network we are part of, or if the host was set to unreachable or throw through a rule or route.

  2. ICMP network unreachable if we do not know how to reach the network in question, or if the network was set to unreachable or throw through a rule or route.

  3. ICMP communication administratively prohibited by filtering is sent if we have a rule or route set to prohibit.

The error_burst variable is per default set to 500 and takes an integer value. Together with the default value of error_cost this means that we allow the routing code to send 5 ICMP Destination unreachables per second.

3.8.2. error_cost

For a complete explanation, see the error_burst variable. Basically, this variable sets the cost of sending a single ICMP destination unreachable to someone.

The error_cost variable is per default set to 100, which means we can send a maximum of 5 ICMP destination unreachables per second, together with the default value of error_burst.

3.8.3. flush

This variable is extremely simple in use. It can not be read since it contains no real data. If you write anything to it as root, it will simply flush the whole routing cache. For example, if you know that a route has changed somewhere, you would simply echo something into this file, and the route cache will be emptied. If you would like to read the route cache, take a look at the /proc/net/rt_cache. This file contains a lot of information about the routes currently in the cache.

3.8.4. gc_elasticity

3.8.5. gc_interval

3.8.6. gc_min_interval

3.8.7. gc_thresh

3.8.8. gc_timeout

3.8.9. max_delay

3.8.10. max_size

3.8.11. min_adv_mss

3.8.12. min_delay

3.8.13. min_pmtu

3.8.14. mtu_expires

3.8.15. redirect_load

3.8.16. redirect_number

3.8.17. redirect_silence