Category Archives: networks

Agere DSP / Martian modem on Ubuntu 10.10

Dial-up modems have always been a pain on Linux.  I got this one working though.

System: old PC running Ubuntu 10.10 (yes, still).

Modem: PCI card with Agere DSP chipset — i.e. a 'winmodem'.

Scanmodem reveals that it will work with the 'martian' driver, which is available on Ubuntu as packages 'martian' and 'martian-source'.

Having installed the packages, there is still some work to do which has to be repeated every time the Linux kernel gets updated:

  1. Make sure that you've got the linux-headers-xx package that matches your current kernel.
  2. As root:
    cd /usr/src/modules/martian-modem/source
    make install
    depmod -a
    modprobe martian-dev

  3. Now you can run 'martian-modem –daemon' which sets up the modem as /dev/ttySM0
  4. I found that, after rebooting, it all Just Worked — /dev/ttySM0 was there and accessible.
  5. So I could set up Gnome PPP to use /dev/ttySM0
  6. Sorted.

(Those instructions are fairly minimal, but you should get the idea.)

IPv6 Tunnelling on Linux

IPv6 Tunnelling on Linux

This is probably fairly basic stuff, and there are many other webpages with similar information, but here, the information is set out in a way that makes sense to me.  Hopefully it will to others too.

These notes will help you set up IPv6 routing on your local network.

The plan: to enable one of the Linux computers on my home network to handle IPv6 tunnelling and route advertising.  All computers on the local network will then be able to access the IPv6 internet.


  • An ADSL/Cable/whatever modem/router that does NOT block protocol 41 packets.  If yours does block protocol 41, the tunnel won't work.  I don't know of a specific way of testing whether a router blocks protocol 41.
  • A Linux computer on your home network that will act as IPv6 router (don't confuse it with the 'router' that is probably also your ADSL modem and wifi access point).  (No doubt this can be done on Windows too, but don't ask me how).
  • An internet connection for the Linux computer with a fixed IP address (not a dynamically allocated one).  I'll refer to that fixed IP address as  Note that this need not be an externally routable address: if the computer is behind a NAT box, and has a local address such as, then that's the address to use where these instructions say ''.  [This is a correction to the previous version of these instructions.]


  • Your Linux computer is running a Debian-based system (including Ubuntu and Mint).  If not, you'll need find equivalent versions of some of the commands given here.


  • Once you've got IPv6 networking going, you'll suddenly need an IPv6 firewall, because your computers all now have externally accessible addresses.  This post won't tell you how to do that.

Step 1

Go to Hurricane Electric's and register for a tunnel.  (Other tunnel providers are available).

Hurricane Electric (HE) will allocate a /64 subnet (aka 'prefix') to you, such as 2001:db8:4321:abcd::/64.  (HE's tunnels really start with 2001:470: but I'll use the official example subnet of 2001:db8: in this document.)

Once you've registered, signed in, and created a tunnel, HE's page at will list your tunnels (you can have up to five) by their domain names, which will be something like

Click on the name of the tunnel to find all sorts of useful details, including:

Server IPv4 Address:
Server IPv6 Address: 2001:db8:4321:abcd::1/64
Client IPv4 Address:
Client IPv6 Address: 2001:db8:4321:abcd::2/64
Routed IPv6 Prefixes
Routed /64: 2001:db8:4322:abcd::/64

Note that represents the IPv4 address of the tunnel that has been assigned to you.  And will be replaced by your own external IPv4 address: if you're behind a firewall or ADSL router that does NAT, that's the real-world address of your ADSL router.

The tunnel has two ends, and each end has both an IPv4 address and an IPv6 one.  The IPv4 addresses are your own external address ( and the one assigned by HE (  The IPv6 addresses are in the /64 subnet assigned by HE for the purpose: the far end's address ends in ::1, the local end's address ends in ::2.  No other addresses in that subnet are used.

HE also give you another 'routed' /64 subnet: that's the one you'll use on your LAN.  In this example it's 2001:db8:4322:abcd::/64.

HE provide 'Example Configurations' which list the commands needed to set up the tunnel for a range of operating systems.  I'll use the 'Linux-route2' example:

modprobe ipv6
ip tunnel add he-ipv6 mode sit remote local ttl 255
ip link set he-ipv6 up
ip addr add 2001:db8:4321:abcd::2/64 dev he-ipv6
ip route add ::/0 dev he-ipv6
ip -f inet6 addr

Run those commands (as root), and you should be in business.  Now you can try


and browsing to sites such as, where the famous dancing turtle confirms that you're using IPv6.

To make those settings permanent you can add them to /etc/rc.local (or whichever file your version of Linux uses for locally-configured start-up commands). 

Step 2

Step 2 involves sharing the IPv6 goodness with other computers on your network. 

First, activate IPv6 packet forwarding on your 'router' with these commands:

sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo echo net.ipv6.conf.all.forwarding=1 >> /etc/sysctl.conf

The first of those commands enables forwarding now; the second makes the change permanent so that the setting will still be there after the computer is rebooted.

The Route Advertising Daemon radvd is what I used.  Install the radvd package, and then create /etc/radvd.conf containing something like this (taken from

interface eth0
    AdvSendAdvert on;
    MinRtrAdvInterval 5;
    MaxRtrAdvInterval 15;     

    prefix 2001:db8:4322:abcd::/64
        AdvOnLink on;
        AdvAutonomous on;

Start the radvd daemon (with sudo /etc/init.d/radvd start on Debian).  And then try accessing IPv6 from other computers on your LAN — magically, it works!  Windows Vista/7 computers will have to have teredo tunnelling turned off first, otherwise they'll use that instead of your own tunnel.  I'm not sure how Windows XP handles this.

What to do next

This is just the beginning of life with IPv6.  You'll want to go on to play with:

  • an IPv6 firewall, i.e. ip6tables settings, possibly wrapped in a more user-friendly scripting language such as ferm.
  • more control over address allocation, using a DHCPv6 server such as dibbler.