[Click] Using userlevel-click to forward packet
Cliff Frey
cliff at meraki.com
Thu Nov 19 13:56:07 EST 2009
Luca,
Please respond to the mailing list so that other people can help out too.
I believe that there is an example online:
http://read.cs.ucla.edu/click/examples/fromhost-tunnel.click
In some cases you can get away with just using ToHost... like in most of the
other examples.
On Thu, Nov 19, 2009 at 10:48 AM, Luca Belforte <
luca.belforte at student.uclouvain.be> wrote:
> Hello Cliff,
>
> thanks, this sound what i was searching for. (Strange that the xorp
> generator script doesn't use it)
>
> Did you have an example on how i can configure it?
>
> Thanks
>
> Luca
>
>
> Cliff Frey wrote:
> > Luca,
> >
> > You need to add a FromHost element to your config which will receive
> > packets from Linux, and a ToHost element that will deliver packets to
> > Linux.
> >
> > Cliff
> >
> > On Thu, Nov 19, 2009 at 10:10 AM, Luca Belforte
> > <luca.belforte at student.uclouvain.be
> > <mailto:luca.belforte at student.uclouvain.be>> wrote:
> >
> > I put here my click configuration
> >
> > I'm using click 1.7 because the 1.6 doesn't work with xorp
> >
> > //
> > // Generated by XORP FEA
> > //
> >
> >
> > // Shared IPv4 input path and routing table
> >
> > _xorp_ip4 :: Strip(14)
> > -> CheckIPHeader(INTERFACES 10.10.10.11/24
> > <http://10.10.10.11/24> 10.30.30.10/24 <http://10.30.30.10/24>)
> > -> _xorp_rt4 :: LinearIPLookup(10.10.10.11/32
> > <http://10.10.10.11/32> 2, 10.30.30.10/32 <http://10.30.30.10/32>
> 2);
> >
> >
> > // ARP responses are copied to each ARPQuerier and the host.
> >
> > _xorp_arpt :: Tee(3);
> >
> >
> > // Input and output paths for eth1
> >
> > FromDevice(eth1, SNIFFER false) -> _xorp_c0 :: Classifier(
> > 12/0800, // [0] IPv4 packet
> > 12/0806 20/0001, // [1] ARP request
> > 12/0806 20/0002, // [2] ARP reply
> > 12/86dd 20/3aff 54/87, // [3] IPv6 ICMP ND solicitation
> > 12/86dd 20/3aff 54/88, // [4] IPv6 ICMP ND advertisment
> > 12/86dd, // [5] IPv6 packet
> > -) // [6] Unsupported protocol;
> > _xorp_out0 :: Queue(200) -> _xorp_to_device0 :: ToDevice(eth1);
> >
> > // IPv4
> > _xorp_c0[0] -> Paint(1) -> _xorp_ip4;
> > _xorp_c0[1] -> ARPResponder(10.10.10.11 8:0:27:23:1a:29) ->
> > _xorp_out0;
> > _xorp_arpq0 :: ARPQuerier(10.10.10.11, 8:0:27:23:1a:29) ->
> > _xorp_out0;
> > _xorp_c0[2] -> _xorp_arpt;
> > _xorp_arpt[0] -> [1]_xorp_arpq0;
> >
> > // Discard IPv6
> > _xorp_c0[5] -> Discard;
> > _xorp_c0[3] -> Discard;
> > _xorp_c0[4] -> Discard;
> >
> > // Unknown protocol
> > _xorp_c0[6] -> Print("eth1 unknown protocol") -> Discard;
> >
> >
> > // Input and output paths for eth2
> >
> > FromDevice(eth2, SNIFFER false) -> _xorp_c1 :: Classifier(
> > 12/0800, // [0] IPv4 packet
> > 12/0806 20/0001, // [1] ARP request
> > 12/0806 20/0002, // [2] ARP reply
> > 12/86dd 20/3aff 54/87, // [3] IPv6 ICMP ND solicitation
> > 12/86dd 20/3aff 54/88, // [4] IPv6 ICMP ND advertisment
> > 12/86dd, // [5] IPv6 packet
> > -) // [6] Unsupported protocol;
> > _xorp_out1 :: Queue(200) -> _xorp_to_device1 :: ToDevice(eth2);
> >
> > // IPv4
> > _xorp_c1[0] -> Paint(2) -> _xorp_ip4;
> > _xorp_c1[1] -> ARPResponder(10.30.30.10 8:0:27:2b:ed:3f) ->
> > _xorp_out1;
> > _xorp_arpq1 :: ARPQuerier(10.30.30.10, 8:0:27:2b:ed:3f) ->
> > _xorp_out1;
> > _xorp_c1[2] -> _xorp_arpt;
> > _xorp_arpt[1] -> [1]_xorp_arpq1;
> >
> > // Discard IPv6
> > _xorp_c1[5] -> Discard;
> > _xorp_c1[3] -> Discard;
> > _xorp_c1[4] -> Discard;
> >
> > // Unknown protocol
> > _xorp_c1[6] -> Print("eth2 unknown protocol") -> Discard;
> >
> >
> > // Local delivery
> >
> > _xorp_toh :: Discard;
> >
> > // IPv4
> > _xorp_rt4[2] -> EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2) ->
> > _xorp_toh;
> > _xorp_arpt[2] -> _xorp_toh;
> >
> >
> > // Forwarding path for eth1
> >
> > // IPv4
> > _xorp_rt4[0] -> DropBroadcasts
> > -> _xorp_cp0 :: PaintTee(1)
> > -> _xorp_gio0 :: IPGWOptions(10.10.10.11)
> > -> FixIPSrc(10.10.10.11)
> > -> _xorp_dt0 :: DecIPTTL
> > -> _xorp_fr0 :: IPFragmenter(1500)
> > -> [0]_xorp_arpq0;
> > _xorp_dt0[1] -> ICMPError(10.10.10.11, timeexceeded) -> _xorp_rt4;
> > _xorp_fr0[1] -> ICMPError(10.10.10.11, unreachable, needfrag) ->
> > _xorp_rt4;
> > _xorp_gio0[1] -> ICMPError(10.10.10.11, parameterproblem) ->
> > _xorp_rt4;
> > _xorp_cp0[1] -> ICMPError(10.10.10.11, redirect, host) ->
> > _xorp_rt4;
> >
> >
> > // Forwarding path for eth2
> >
> > // IPv4
> > _xorp_rt4[1] -> DropBroadcasts
> > -> _xorp_cp1 :: PaintTee(2)
> > -> _xorp_gio1 :: IPGWOptions(10.30.30.10)
> > -> FixIPSrc(10.30.30.10)
> > -> _xorp_dt1 :: DecIPTTL
> > -> _xorp_fr1 :: IPFragmenter(1500)
> > -> [0]_xorp_arpq1;
> > _xorp_dt1[1] -> ICMPError(10.30.30.10, timeexceeded) -> _xorp_rt4;
> > _xorp_fr1[1] -> ICMPError(10.30.30.10, unreachable, needfrag) ->
> > _xorp_rt4;
> > _xorp_gio1[1] -> ICMPError(10.30.30.10, parameterproblem) ->
> > _xorp_rt4;
> > _xorp_cp1[1] -> ICMPError(10.30.30.10, redirect, host) ->
> > _xorp_rt4;
> >
> >
> > And here we can see the correct routing table:
> > 10.10.10.11/32 <http://10.10.10.11/32> - 2
> > 10.30.30.10/32 <http://10.30.30.10/32> - 2
> > 10.10.10.0/24 <http://10.10.10.0/24> - 0
> > 10.30.30.0/24 <http://10.30.30.0/24> - 1
> > 10.20.20.0/24 <http://10.20.20.0/24> 10.10.10.10 0
> >
> > (the subnet 10.20.20.0/24 <http://10.20.20.0/24> come from the
> > other router connected)
> >
> > So click know it.
> >
> > But if i do a :
> >
> > ping 10.20.20.10 (who exist) i have the following message:
> > connect: Network is unreachable
> >
> > The connect command doesn't know the click route :(
> >
> > I really don't know what do
> >
> > Thanks
> >
> > Luca
> >
> > Luca Belforte wrote:
> > > Hi Beyers,
> > >
> > > yes theoretically, but my problem is different. If y delete all
> > the ip
> > > route in the kernel (ip route flush all) so I'm sure the kernel
> > can't
> > > help. Then ping command doesn't work.
> > >
> > > My question is more how force click to process the who coming
> > from the
> > > system itself? (like a ping or traceroute command)
> > >
> > > Or opposite how to be sure that click process it?
> > >
> > > thanks
> > >
> > > Luca
> > >
> > > Beyers Cronje wrote:
> > >
> > >> Hi Luca,
> > >>
> > >> Theoretically using FromDevice with "SNIFFER false" then the
> kernel
> > >> should not process the packets.
> > >>
> > >> Beyers
> > >>
> > >> On Wed, Nov 18, 2009 at 10:08 PM, Luca Belforte
> > >> <luca.belforte at student.uclouvain.be
> > <mailto:luca.belforte at student.uclouvain.be>
> > >> <mailto:luca.belforte at student.uclouvain.be
> > <mailto:luca.belforte at student.uclouvain.be>>> wrote:
> > >>
> > >> Hello,
> > >>
> > >> i have a xorp+click installation, who works, click receive
> > the correct
> > >> routes.
> > >> But if i want to do a ping, or traceroute it still use the
> > kernel
> > >> route
> > >> informations.
> > >> I tried to disable the SNIFFING mode, but without success.
> > >>
> > >> How can i use click to route packet coming from the system?
> > >>
> > >> Thanks in advance
> > >>
> > >> Luca
> > >> _______________________________________________
> > >> click mailing list
> > >> click at amsterdam.lcs.mit.edu
> > <mailto:click at amsterdam.lcs.mit.edu>
> > <mailto:click at amsterdam.lcs.mit.edu
> > <mailto:click at amsterdam.lcs.mit.edu>>
> > >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> > >>
> > >>
> > >>
> > > _______________________________________________
> > > click mailing list
> > > click at amsterdam.lcs.mit.edu <mailto:click at amsterdam.lcs.mit.edu>
> > > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> > >
> > >
> > _______________________________________________
> > click mailing list
> > click at amsterdam.lcs.mit.edu <mailto:click at amsterdam.lcs.mit.edu>
> > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >
> >
>
More information about the click
mailing list