[Xorp-users] Using kernel-level click and XORP

Pavlin Radoslavov pavlin@icir.org
Wed, 19 Jan 2005 15:52:00 -0800


> Sometime ago, somebody said here that click in the user-level mode would 
> only route packets that are beeing forwarded by the node. This means 
> that packets generated by the node itself go directly through the IP 
> stack to the linux kernel forwarding table. In order to have these 
> packets forwarded by click, there were two possibilities: using the 
> KernelTun() element or using click in the kernel-level mode.
> 
> Well, I tried the second choice and it doesn't seem to work. In the 
> scenario below, node B has kernel-level click+XORP installed and I 
> removed all routes from the linux forwarding table to guarantee packets 
> are not routed through linux. In this case I can ping from A to C, but I 
> can't ping from B to C.
> 
> A - B - C
> 
> Shouldn't this work? Should I explicitly configure this behavior somewhere?

It won't work by the default Click configuration generated by XORP.
I guess the reason is because the packets originated by the host
are processed first by the host IP stack.
Hence, if you remove all forwarding entries from your
kernel, the outgoing packets won't be able to leave the IP stack.

If the packet passes through the host IP stack, then you need
something in the Click configuration to "pick-up" the packet and
pass it through the Click IP stack.
I guess what you need there is the FromHost Click element
(see http://www.pdos.lcs.mit.edu/click/doc/FromHost.n.html), and at
the same time you may have to add the appropriate forwarding entry
(e.g., 0.0.0.0/0 in addition to the entry automatically added by
FromHost) to your kernel that points to the fake interface created
by FromHost.
Eddie and Marko, please correct me if I am missing something.

In general, dealing with this goes beyond the scope of XORP,
so you have to modify the sample fea/xorp_fea_click_config_generator
script for your own needs.

On the other hand, if you don't really need the packets originated
by the host to go through the Click configuration, then just don't
delete the routes for the directly-connected subnets, and the ping
from B to C should work.

Regards,
Pavlin