Rrouted is a Linux 2.2 alternative for request-route, providing routing functionality for network requests. The project offers an improved implementation to replace the older version, adding more features and stability to the system.
To operate, rrouted installs a default route via a SLIP device on which this daemon listens. When a packet is sent over this device, it is queued and request-route is invoked. Once request-route has finished, the daemon will attempt to resend the packet. Unlike diald, the program called from request-route must establish its own default route.
To use rrouted, your kernel must support SLIP (or you can install it as a module). To compile rrouted, use the command: gcc -O3 -Wall -s -o rrouted rrouted.c -lpthread. If you don't have pthreads, use: gcc -O3 -Wall -DNO_THREADS -s -o rrouted rrouted.c. Note that even with threads, only one request-route is invoked for each destination at once.
When running rrouted, you have several options. You can set a route to the target "host" or "net/mask" and invoke a "script" when packets are routed via it. The default is "-n 0.0.0.0 -m 0.0.0.0 -s /sbin/request-route", which means that without any arguments, 2.0 kerneld behavior is matched. "dummynet" is a netmask of unused addresses from which rrouted picks one for its SLIP device, default 10.255.255.0. Note that the device and route are taken down when the daemon is killed.
In summary, rrouted is a powerful tool for transparently replacing the request-route functionality that was removed from Linux 2.1. It operates as a daemon that invokes a script on every IP packet with an unreachable destination. With several configuration options, rrouted is versatile and customizable for a range of use cases. Overall, it is an excellent replacement for the outdated request-route.