Device configuration

Before configuring your device, you need to choose an IPv4 address that will be accessible from the mesh. To do this, head for the numbering page and choose an IPv4 address.

This section documents how you can configure your device to use the chosen IP.

You will need an IPv4 address if you want to provide general Internet access on the mesh. Otherwise, we encourage you to use IPv6.

OpenWRT

To configure the IP address on a OpenWRT device, use this or if you have a bullet or if you have a Nanostation M2 :

uci set network.lan.ipaddr=172.16.0.123
uci set network.lan.netmask=255.240.0.0

If there is a gateway on the local network, you should also use this:

uci set network.lan.gateway=172.16.0.1
uci set network.lan.dns=172.16.0.1

You may also commonly disable the DHCP server on LAN, so as to not interfere with the other router:

uci set dhcp.lan.ignore=1

[!] Warning: the above will make it more difficult to reach the machine again after a reboot. You will need to statically configure your laptop if it is the only device connected to the device, for example.

(!) If you are going through a babel configuration, you will want to configure an IP on (and create!) the WLAN interface, which may be absent at this point:

uci set network.wan=interface
uci set network.wan.ifname=wlan0
uci set network.wan.proto=static
uci set network.wan.ipaddr=172.16.0.42
uci set network.wan.netmask=255.255.255.255

Note that the netmask is 255.255.255.255 so that IP addresses are not looked up on the local network with ARP requests. Note, however, that this will make the interface unreachable with a regular non-babel computer, and will break completely non-babel setups.

Commit changes and reboot:

uci commit ; reboot & exit

FreeBSD

In rc.conf:

ifconfig_vr0="inet 172.16.0.42 netmask 255.240.0.0"
defaultrouter="172.16.0.1"

If this host is to be a router, use instead:

ifconfig_vr0="inet 172.16.0.1"
gateway_enable="YES"

Routing issues

We can already observe a basic problem here: globally routable IPs are not easily reachable from the mesh without adding static routes. This is something babel can fix.

Another option is to use pinfoflags field in rtadvd.conf to unset the second bit, the autonomous address-configuration flag (section 4.6.2 in RFC 2461), which would disable the use of that prefix in address autoconfiguration while at the same time announcing the route. To be tested.