It’s simple really..
You can define a static IP as follows:
You can then define a route out to the internet:
Or if you’d like to acquire an address via a local DHCP server:
That’s all there is to it! Now.. these settings won’t stick on reboot, you’ll have to refer to your distro’s startup files. On debian you want /etc/network/interfaces
A sample stanza for the above configuration:
All done!
Tags: dhclient, dhcp, eth0, ifconfig, route, route add, static IP
I’ve used OpenWrt previously to this project to build some firmwards for the Linksys Router WRT54 range. OpenWrt is an incredibly powerful and small Linux distro. Although debian is probably better suited to the reasonably powerful hardware, I wanted to give OpenWrt a go anyway.
Unless you’re running a MIPS 4Kc processor on your host which I’m guessing you’re not, you’ll either need to cross compile your binaries, or just compile them natively on the device itself. Compiling on the device works fine as long as you have the relevant packages, however if I was going to build a 2.6 kernel, I’d rather do it on an x86 quad core intel host, rather than waiting a week for the device to do it. I also wanted to minimize the writes on the CF card.
OpenWrt comes with a nice buildroot environment which you can read about and download from www.openwrt.org using Subversion.
Here http://downloads.openwrt.org/kamikaze/docs/openwrt.html#x1-310002 is a great HOWTO on getting the build root environment set up on your x86 host.
Also, see: http://wiki.mikrotik.com/wiki/RB500_Linux_SDK – this is a very complete HOWTO, which is why I’ve not covered most of the installation process and just detailed customizations.
You’ll need to select the RB5xx target for the kernel. Also, run:
In your build root top directory, and add USB support (as my one is modded for USB which is not RB5xx default.
While you’re there, browse to the networking options and make sure you have everything you want, specifically the schedulers for traffic shaping.
Here is my precompiled image:
Tags: /dev/cfa1, /dev/cfa2, /dev/cfa3, bridge, build root, buildroot, debian, dropbear, ifconfig, iptables, kamikaze, mikrotik, miniupnp, miniupnpd, mips 4kc, multiple isps, multiple providers, ntp, ntp client, openwrt, precompiled image, rb532a, rbxxx, split route, subversion, svn kernel, uplink, usb, usb support, x86
Following on from the previous article, I’ve written some scripts which you’ll find in the /root/scripts/ directory of the prebuilt image. I’ve attached and commented them here, as they could also be useful elsewhere.
bridge.sh #For setting up a simple bridge
(more…)
Tags: 532a, APNIC Box, bandwidth management, bandwidth rate, bridge, cbq, ifconfig, iproute2, iptables, lcd, Linux, picolcd, qdisc, routerboard, routerboard 532a, shaping, tc, time, usblcd, usleep