BSD DevCenter
oreilly.comSafari Books Online.Conferences.


OpenBSD Explained

OpenBSD and the Future of the Internet



Many vendors nowadays offer networking solutions said to be on the "bleeding edge" of technology and development. This is particularly common in the Linux community, with tools like GNOME-based WML browsers touted as leading the way. However, the singular protocol of the future that seems certain to be adopted and even more certain to cause a considerable headache for those not leading the way now is the new Internet itself -- IPv6. The Internet as we know it is based entirely around the IPv4 (Internet Protocol Version 4). This is becoming rapidly deprecated due to limitations, such as the maximum number of live hosts.

OpenBSD 2.7 now ships with complete IPv6 support. In real world terms, this means you could feasibly operate a purely IPv6 network of OpenBSD machines, or have them participate in an IPv6 internetwork. The most common method of IPv6 implementation at the moment, however, is integration into the "6bone." This is a virtual IPv6 backbone comprised of hosts through which users can tunnel Ipv6 over IPv4. The basic premise is to facilitate IPv6 development and the existence of an IPv6 "internet" without the necessity of completely rebuilding the backbone infrastructure.


Configuration of an IPv6 tunnel is reasonably simple. Assuming the host machine is already entirely configured to operate on the Internet with a live interface (as discussed in previous articles of this series), the first step is to obtain tunnel config information from After selecting OpenBSD 2.7-current as your operating system, the site will return a Perl script which, once run as root, will entirely configure your system for IPv6 operation. We recently configured the machine to operate under such a method; a quick decomposition of the commands involved follows:

  • Configure the IPv4 tunnel:

    /sbin/ifconfig gif0 giftunnel

  • Configure the IPv6 tunnel:

    /sbin/ifconfig gif0 inet6 3ffe:b00:c18:1fff:0:0:0:2d9
     3ffe:b00:c18:1fff:0:0:0:2d8 prefixlen 127

  • Make the remote end of the PTP tunnel the default IPv6 route:

    /sbin/route add -inet6 default 3ffe:b00:c18:1fff:0:0:0:2d9

The obvious next step from this was to configure a machine to operate using purely IPv6 -- not just an IPv4 tunnel. OpenBSD 2.7-current now supports installation via IPv6 FTP, but at the time of my setting this up, this was not the case. After installating OpenBSD via normal IPv4, I proceeded to remove all IPv4-based config:

  • Remove the IPv4 config on my Ethernet interface:

    /sbin/ifconfig ep0 down

  • Remove the IPv4 routes (default being the only one):

    /sbin/route delete default

The next step was to reconfigure the machine with a valid IPv6 address. One thing I failed to find documentation on was the IPv6 equivalent of style ranges (ranges of IP space reserved for internal private network usage). Instead, I decided to use the live IPv6 address that had been assigned for testing purposes:

  • Configure the Ethernet interface (specifying usage of 10baseT media):

    /sbin/ifconfig ep0 inet6 
    3ffe:b00:c18:1fff:0:0:0:2d9 media 10baseT

  • Configure the IPv6 defaultroute to use this interface:

    /sbin/route add -inet6 default 3ffe:b00:c18:1fff:0:0:0:2d9

With this in place, the machine is able to operate on a purely IPv6-based network, although to date I have been unable to procure another machine to complete the project.


The adoption of IPv6 is becoming more and more rapid, and I see OpenBSD's total compatibility with the protocol before any other OS (besides NetBSD) as a proud exemplification of its bleeding edge status. It's interesting to note that the commercial "leaders" in networking, i.e., Cisco, Sun, etc., have been slow to produce anything IPv6-related, let alone a completely IPv6-compatible product line.

This article is the last in the OpenBSD Explained networking series. The next series will focus on server operations such as databases, system performance tuning, and administration techniques.

David Jorm has been involved with open source and security projects for several years, originally with OpenBSD and Debian GNU/Linux, now with the development team at

Read more OpenBSD Explained columns.

Discuss this article in the Operating Systems Forum.

Return to the BSD DevCenter.


Sponsored by: