[Click] Problems with KernelTun element

John Bicket jbicket at amsterdam.lcs.mit.edu
Wed Jan 26 11:57:26 EST 2005


There are no ethernet headers on packets coming from KernelTun,
so all your packets are probably getting dropped at the classifier.
Inserting a Print element after "tun" in your configuration will show
this. There is a kerneltap example in conf/test-tun.click.

FromHost and ToHost do more or less what kerneltun does, but they send
and receive packets with ethernet headers.


--john

jmorillo at ac.upc.edu [jmorillo at ac.upc.edu] wrote:
>Hello,
>
>We were trying to use the KernelTun element in order to enable (userlevel) Click
>to route traffic that is generated by the same computer. Firstly we created an
>virtual interface through the KernelTun element and then we added a default
>route towards this interface. The idea is that every packet generated by the
>computer goes to this interface, and consequently to Click, and then they
>follow the normal routing flow.
>
>Well, as a first step we didn't introduce routing at all, we just wanted to make
>sure that we were using KernelTun in the right way (and it seems that we are
>not!). In this example, we want that every packet that arrives through tun0
>goes directly to eth0. We copied below the only part of the configuration that
>deals with KernelTun. In this machine we have three interfaces and we are
>already able to do routing among them with this configuration file. The only
>problem now is KernelTun.
>
>elementclass FixChecksums {
>    input -> SetIPChecksum
>        -> ipc :: IPClassifier(tcp, udp, -)
>        -> SetTCPChecksum
>        -> output;
>    ipc[1] -> SetUDPChecksum -> output;
>    ipc[2] -> output
>}
>
>tun :: KernelTun(1.0.0.1/8)-> fromhost_cl :: Classifier(12/0806, 12/0800);
>fromhost_cl[0] -> ARPResponder(0.0.0.0/0 1:1:1:1:1:1) -> tun;
>
>_xorp_out0 :: Queue(200) -> _xorp_to_device0 :: ToDevice(eth0);
>_xorp_arpq0 :: ARPQuerier(10.0.0.1, 00:0C:6E:F2:9B:6E) -> _xorp_out0;
>
>fromhost_cl[1] -> Strip(14)
>               -> StoreIPAddress(10.0.0.1, 12)         
>               -> FixChecksums                         
>               -> _xorp_arpq0
>
>To test this configuration we did a ping to 10.0.0.4 which is directly connected
>to the eth0 (10.0.0.1) interface of this computer. With etherreal we could see
>that ICMP packet are being delivered to tun0, but they are not sent through
>eth0. Anybody may help us? Thank you...
>
>Cheers,
>
>Julian
>_______________________________________________
>click mailing list
>click at amsterdam.lcs.mit.edu
>https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list