[manet] Re: A partial response to <Re: Review draft-perk ins-manet-aodvv2-05>

Juliusz Chroboczek <[email protected]> Thu, 24 Jul 2025 18:37:10 +0200
Newsgroups gmane.ietf.manet
Message-ID <[email protected]>
> For the benefit of the uninitiated (myself, possibly others), can you explain 
> what the default-to-self hack is? (Or provide a reference).

It was explained to me by Henning.  I believe it is due to Henning, he'll
correct me if I'm wrong.

Traditional routing protocols interact with the forwarding plane through
the routing table.  The routing table provides a narrow interface between
the routing protocol (which is implemented in user space), and the
forwarding plane (which is implemented in the kernel or in hardware).
This naturally limits what these protocols can do.

AODV is a very interesting research project, which explores what can be
done when the control protocol does not limit itself to managing the
routing table.  Unfortunately, that means that the natural way to
implement AODV is to blend the control plane intimately with the
forwarding plane; thus, AODV implementations tend to be kernel modules
that touch all sorts of places within the kernel, which makes them complex
and brittle (only compatible with a specific kernel version).

Henning found a way to implement a large subset of AODV in userspace.  My
reaction to it was "it's a brilliant hack", to which Henning replied in
his typically modest way "I don't know if it's brilliant, but it's
certainly a hack".  So, with Henning's permission, I call it the
"deault-to-self hack".

In Henning's approach, the AODV implementation sets up a TUN interface.
Initially, there is a single default route pointing at the TUN interface,
and no other routes.  When a data packet arrives, it gets forwarded to the
TUN interface, and handled by the AODV implementation.

Over time, the AODV implementation populates the routing table, and so
only packets to unknown destinations get routed to the AODV
implementation.  Hence, the implementation gets the performance of native
routing for known destinations, and slow-path userspace processing for
unknown destinations only.

Henning's solution is brilliant, but nobody has a doubt that it is a hack.
Userspace receives raw IP packets, so it needs to duplicate all of the IP
processing that's being done in the kernel.  It also has some limitations,
which I don't recall right now, that prevented Henning for implementing
the whole o AODV

However, if somebody were serious about AODV implementation, Henning's
route-to-self hack could serve as a basis for a proper user/kernel
interface suitable for AODV.

-- Juliusz

_______________________________________________
manet mailing list -- [email protected]
To unsubscribe send an email to [email protected]