OpenWrt Forum Archive

Topic: Click Modular Router on WRT54G

The content of this topic has been archived on 24 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Dear list:

There is a neat software out there that lets you modify existing routing protocol features and define and implement your own routing protocols pretty easily. It's called click modular router, and it would be a great addition to the WRT box. Currently, it runs on i386 and ARM using glibc. More info here: http://www.pdos.lcs.mit.edu/click/

Has anyone tried to port it to BCM-MIPS using uClibc?
Who would be interested in helping to port it to the Linksys box?

- Gromit.

What advantages does click have over how we currently do things?

What advantages does click have over how we currently do things?

From what I read on the website it's a nice product. The problem is that all the standard tools don't work anymore, so new toolsets are needed to control the routing and firewall. The biggest advantage I see is performance. I might have a look at this to see if routing performance on the Linksys can be improved by using this stuff instead of the standard linux routing. It looks a little complicated and overwhelming to configure though. Oh well, never hurts to download the thing, and try to compile it against the openwrt buildroot just to see how troublesome porting would be.

What advantages does click have over how we currently do things?

Well, we're using this product to play around with routing protocol implementations to enhance performance, convergence, stability, and to test new concepts in a real life testbed compared to simulation-only approaches.

For instance, it would be real easy to implement mesh networking for community projects with the WRT using TBRPF, DSR, AODV, or OLSR and to modify these protocols to meet your needs. Implementations are all C++, and modules, which each router is based on, can be written to your heart's content. Once the click router infrastructure is in place, you can change your routing on the fly and test what works best for you. Each of these protocols has its pros and cons.

There is a userlevel driver, and a kernel driver that each can execute a configuration file that stores the actual router. The kernel driver (module)really boosts performance, but needs a kernel patch that is not easily implemented.

Like PolarWolf, I will see how far I get compiling Click for mipsel, against uClibc with the 2.4.20 kernel. If we can pull this off, it will enhance the flexibility and usefulness of the WRT as an experimentation platform by some orders of magnitude.

- Gromit.

OK, I have compiled the latest version of Click using the OpenWRT toolchain. However, there four problems:

1) Since Click is based on autoconf and ./configure, I don't know whether it actually compiled against uclibc. This is what I did to compile a userlevel driver:
- modified the buildroot/Makefile to switch on c++ (INSTALL_LIBSTDCPP:=true)
- set CC=mipsel-linux-uclibc-gcc
- added buildroot/build_mipsel/staging_dir/bin to $PATH
$> cd <clickdir>
$> ./configure --host=mipsel-linux --build=i686-pc-linux-gnu --disable-linuxmodule --enable-tools=mixed
$> cd userlevel
$> gmake

The verbose info I got from ./configure, however, said something about host=mipsel-unknown-linux-gnu, which hints at glibc. Passing --host=mipsel-linux-uclibc to ./configure results in error 'system `uclibc' not recognized'. How can I make sure I've compiled against uclibc?

2) How is libstdc++ implemented in openwrt and how do I get it on the box?

3) Click needs the tun/tap kernel functionality. Nico's patch looks great, but how do I use tun.o when 'mknod' is missing to create the /dev/tap0?

4) How do I access the 16MB RAM of the G box? df only shows 1.8M usable flash ROM available, but no RAM space. Nothing mounted to give access to RAM. Click userlevel needs about 10MB. wink

Any thoughts anyone?

Thanks,
- Gromit.

Guess this topic is quite old, but did you manage to get click wortking on your WRT54? I am also very interested in this. Any help is appreciated.

Regards. R Martin Svendsen

Some of the people doing things with the WGT have implemented it.  Since the two projects are "kissing cousins" I would expect their  efforts to be of use in this venue as well.

I hope the list police don't boot me for mentioning another distro, which I have seen happen lately :-(

http://sarwiki.informatik.hu-berlin.de/ … ling_Click

The discussion might have continued from here.