IPv6 Support for N900

  1. From IPv4-only to dual-stack
  2. Solution Overview
  3. Enabling IPv6 on Linux Kernel
  4. Setting up IPv6 Connectivity on Wi-Fi
  5. Setting up IPv6 Connectivity on 3G
  6. Setting up IPv6 Connectivity on built-in Web browser
  7. Testing IPv6 connectivity
From IPv4-only to dual-stack

The Nokia N900 mobile computer comes with support for both Wi-Fi and 3G Internet connectivity, and as such, the Maemo 5 operational system provides UI support for setting up Wi-Fi and 3G Internet connectivity. However, the Linux kernel version distributed with Maemo 5 (i.e. N900) does not have IPv6 support enabled by default, and hence the N900 is an IPv4-only device. As the IPv4 address space depletion problem becomes more apparent (see IPv4 address space depletion reports, updated in a daily-basis), need for IPv6 increases, and so des interest for experiments of parallel IPv4 and IPv6 connectivity on cellular networks. Wi-Fi networks can be easily updated to provide IPv6 capabilities (in some deployments, it's a matter of a simple re-configuration), but people interested in IPv6 connectivity will not find by default in N900 devices support for IPv6. Furthermore, in 3G networks dual-stack support requires capability for two, parallel Packet Data Protocol (PDP) contexts (one for the IPv4 connectivity and another for the IPv6 connectivity), which require the configuration of two different Access Pont Names (APNs) (one for each PDP context). Currently the Maemo 5 UI for setting up 3G connectivity does not allow configuration and use of more than one APN (although the Maemo 5's 3G connectivity infrastructure itself is dual-stack ready).

Solution Overview

The idea of this project is to bring IPv6 Internet connectivity capabilities for the Wi-Fi and 3G interfaces of the Maemo 5 (and as a consequence, in N900), thereby enabling users to start testing today the solutions for the IPv4 address depletion problem soon-to-be available on their mobile operators. In fact, IPv6 support is already implemented both on the N900 hardware and on the Maemo 5 connectivity framework, such that enabling it requires following the series of steps listed below:

After following the instructions in this page, an N900 device wil be able to utilize dual-stack Internet connectivity on both Wi-Fi and 3G accesses, if the network operators do provide such dual-stack access. This project does not guarantee 100% completeness of IPv6 support on n900, as it is an experimental work, and further collaborations in bug fixing and enhancing user experience is welcomed. In particular applications' IPv6 support is not improved by this project.

Enabling IPv6 on Linux Kernel

In this section we provide detailed instructions on how to install an IPv6-enabled kernel (the so-called Power Kernel), produced by Thomas Tanner ("titan") from Maemo forum (see Maemo talk thread). This kernel version provides notonly IPv6 support (including Mobile IPv6, privacy and ip6tables), but also iptables (NAT,connection tracking, packet filtering), Wifi mesh, QoS, hotspot fixes, IP tunneling, device mapper+dmloop, cryptoloop, builtin ext3 for booting from other media, ext4, XFS, reiserfs, NTFS reading, ISO9660, UDF, CIFS, automounter, EFI partitions, UTF8 codepages, mouse+joystick input, kernel config, cryptd, SHA256+512, blowfish, USB 1.1+2.0+generic drivers,USB hubs,USB video+serial, USB/IP, kexec and more...

Prior to proceeding with the installation, the Extras, Extras-Testing and Extras-Devel repositories on the N900 device have to be enabled. The Extras repository is supposed to be pre-configured in the Nokia N900, but it is disabled by default. To enable it:

  1. Go into the Application Manager application
  2. Tap the menu Application catalogs, and if the Select connection... prompt shows up, select the proper Internet connection
  3. Tap on the Maemo Extras repository (i.e. maemo.org)
  4. Uncheck Disabled
  5. If the Maemo Extras repository is not there, you can manually add it by adding a new application catalog entry for Extras (Catalog name Maemo Extras, Web address http://repository.maemo.org/extras/, Distribution fremantle, Components free non-free)
  6. Add the Extras-Testing repository (Catalog name Maemo Extras-testing, Web address http://repository.maemo.org/extras-testing/, Distribution fremantle, Components free non-free) and the Extras-Devel repository (Catalog name Maemo Extras-devel, Web address http://repository.maemo.org/extras-devel/, Distribution fremantle, Components free non-free)
  7. Return to the main Application Manager screen
  8. Refresh repository information (by tapping on Update), if the update process does not start automatically; Internet connectivity is required to complete the process, so if you're not connected to the Internet then the OS will ask you to choose one
  9. Wait for the update process to finish
  10. Proceed to install rootsh (necessary to gain root access on a N900 terminal), by tapping on Download, then tapping on All, and then choosing the rootsh package, finally tapping on the Install button.
From now on, the necessary repositories are ready to use on your N900, and a root shell can be obtained by typing the command sudo gainroot from a N900 terminal, so you can safely leave the Application Manager application. In order to proceed with kernel installation, you need to:
  1. Launch the X Terminal application
  2. Type in the command sudo gainroot
  3. Type in apt-get install kernel-power-flasher to launch the request to install the IPv6-enabled kernel available at Extras-Testing repository
  4. Type in Y for all confirmations
  5. After finishing the download, the new kernel will be flashed automatically to your N900 device. To conclude the installation process, simply reboot (i.e. turn of the device and then turn on the device)
Congratulations, your Linux kernel is now IPv6-ready! If you feel brave and wish to compile your own kernel version, starting from this version provided by Thomas Tanner, you need the Scratchbox environment installed in your environment (see instructions here). Once you have your Scratchbox environment set, follow the instructions below (within a Scratchbox session for FREMANTLE_ARMEL platform):
  1. Type in fakeroot apt-get source kernel-maemo
  2. Enter on the ~\maemo_kernel directory
  3. Extract the kernel source directory
  4. Enter on the kernel source directory
  5. Type in fakeroot dpkg-buildpackage -nc
The kernel configuration file is located on debian/rx51maemo_defconfig, so if you wish to configure your own kernel simply change this file and repeat the fakeroot dpkg-buildpackage -nc command.

Setting up IPv6 Connectivity on Wi-Fi

If your Wi-Fi network has dual-stack (IPv4/IPv6) connectivity, then the use of the updated kernel is enough for gaining IPv6 access. However, if your Wi-Fi network is IPv6-only, further configuration steps are required.

In order to ensure your N900 will be able to resolve DNS names in IPv6-only Wi-Fi networks, you must add (not replace!) a proper DNS server in the file /etc/resolv.conf. As an example, in our environment this corresponds to adding (not replacing!) the following line in the /etc/resolv.conf file: nameserver 2001:470:b:c8::1

In order to enable IPv6 connectivity on an IPv6-only Wi-Fi interface, you need first to disable the feature of auto-drop of Wi-Fi interface when the DHCPv4 request fails. To do that:

  1. Tap on Settings, then on Internet connections
  2. Tap on Connections
  3. Tap on New, then on Next
  4. Enter any alias for the new Wi-Fi connection and tap in Next
  5. A question on whether you wish to scan for Wi-Fi networks will be done, answer Yes
  6. Locate your IPv6 Wi-Fi network, select it and tap in Next
  7. Tap on Advanced
  8. On the IP Addres tab, uncheck the Auto-retrieve IP address check box, letting all other fields intact (i.e. not messing with them) , and then tap Done
After these procedures, you can now proceed and test your IPv6-only connectivity via Wi-Fi for your N900 device. First, disconnect from your current Wi-Fi network and connect to the just-created IPv6-only Wi-Fi connection. Then, type in the command ping6 -c www.kame.net on an XTerminal with root privileges. The result must indicate successful communication with the peer.

Setting up IPv6 Connectivity on 3G

In order to enable Internet connectivity using 3GPP cellular networks (i.e. GPRS/EDGE/3G/etc...) for N900, it is necessary to setup a new cellular Internet Access Point (IAP), which requires configuring the given Access Pont Names (APNs) for that network. An APN identifies an IP Packet Data Network (PDN)that a mobile data user wants to communicate with, and is necessary in order to enable the creation of Packet Data Protocol (PDP) contexts. In the case of dual-stack (IPv4/IPv6) Internet connectivity for cellular networks, the default solution for pre-Release 8 3GPP networks is to establish two separate PDP contexts, one for the IPv4 connectivity and another for the IPv6 connectivity, which in the N900 case means setting up two separate IAPs, each one with the required APN configuration. However, N900 does not allow connecting to more than one IAP at the same time through the Internet Connectivity (ICd2) User Interface (UI), and therefore, although both the N900 device HW and the Linux kernel do have IPv6 capabilities, the N900 UI is not prepared to allow dual-stack Internet connectivity to occur for 3G networks.

N900 cellular connectivity framework does provide PDP context creations by console script using a D-Bus interface, and as such, we can automate dual-stack connectivity by adding a set of scripts that create the IPv6 PDP context when the IPv4 PDP context is created, and also deleting the IPv6 PDP context when the IPv4 context is deleted. By doing that, each PDP context will have its own Linux interface (say, gprs0 for IPv4, gprs1 for IPv6), which is actually not an issue as all the correspondent IPv4 traffic is routed automatically to/from the IPv4 interface (i.e. gprs0), as well as all IPv6 traffic is routed automatically to/from the IPv6 interface (i.e. gprs1). The required scripts for the automation of the creation (00_enable_apn_ipv6) and deletion (00_disable_apn_ipv6) of the IPv6 PDP contexts can be found here (therefore, you must download them on the N900 and save in some place you can remember later), and the following setup steps must be performed prior to enabling dual-stack cellular connectivity:

After that, cellular IPv6 connectivity (through the gprs1 interface) will be available whenever cellular IPv4 connectvity is also activated, and cellular IPv6 connectivity will be deactivated whenever the cellular IPv4 connectivity is also deactivated.

In most cases it should be enough to automatically use the DNS server which address is obtained during the IPv4 PDP context setup. However, in the case you need separate DNS server configuration for the cellular IPv6 connectivity, you will need to setup a new DNS server entry on the file /var/run/resolv.conf.gprs, which exists only while the cellular Internet connectivity is up, and therefore whenever the cellular Internet connectivity is up this DNS entry must be re-entered. By default, the script we provided does not do that, so in order to do that you need to edit the file at /etc/network/if-up.d/00_enable_apn_ipv6, set ADD_IPv6_DNS="yes" and then set your IPv6 DNS server address in IPv6_DNS.

Setting up IPv6 Connectivity on built-in Web browser

The N900 native Web browser comes with IPv6 support disabled by default. However, this can be changed by following the steps below:

  1. Ppen the native Web browser
  2. Access the address about:config
  3. There will be a warning, you just need to click on the I'll be careful, I promise! button
  4. A table with all configuration options will appear. At the top, type in disableIPv6 in the filter text box
  5. There will appear only one item in the table, corresponding to the disableIPv6 configuration with the value set to true. Select it, and in order to invert the value to false, you can either double-click on it or press Enter on the keyboard.
  6. Close the browser and open it again
Congratulations, your browser now has IPv6 support.

Testing IPv6 connectivity

In order to test it, access the address http://www.kame.net and check if the turtle image at the top of the page must appear swimming, otherwise it didn't accessed the page via IPv6.