...
Gateway check can be extended by setting check-gateway
parameter. Gateway reachability can be checked by sending ARP probes, or ICMP messages or by checking active BFD sessions. The router periodically (every 10 seconds) checks gateway by sending either ICMP echo request (ping) or ARP request (arp). If no response from gateway is received for 10 seconds, request times out. After two timeouts gateway is considered unreachable. After receiving reply from gateway it is considered reachable and timeout counter is reset.
Route Storage
Routing information is stored to take as little memory as possible in a common case. These optimizations have non-obvious worst cases and impact on performance.
...