IPv6 over IPv4 Lab

In this lab we are going to construct an IPv6 network, however since the Cisco routers are not running a version of IOS that is IPv6 capable, we're going to create the IPv6 network over top of an IPv4 network. The IPv4 network will consist of the Cisco routers running OSPF. The IPv6 network will consist of OpenBSD routers. This will result in the following network configuration:

The Cisco router address assignments are as follows:

Int. Router 1 Router 2 Router 3 Router 4
E0/0 192.168.100.200/24 192.168.100.201/24 192.168.100.202/24 192.168.100.203/24
E1/0 192.168.10.254/24 192.168.20.254/24 192.168.30.254/24 192.168.40.254/24

The OpenBSD router address assignments are as follows:

Int. Router 1 Router 2 Router 3 Router 4
vr0 192.168.10.253/24 192.168.20.253/24 192.168.30.253/24 192.168.40.253/24
vr1 fc00:1::1/64 fc00:2::1/64 fc00:3::1/64 fc00:4::1/64

Configure the IPv4 Network

The first step is to configure your IPv4 network using your Cisco router:

  1. You may want to start by erasing your router's configuration. To do this run erase nvram followed by reload. Make sure you set a hostname, set an enable secret and disable CDP after reload.
  2. Configure appropriate IP addresses on your router interfaces.
  3. Configure OSPF and verify that you are learning routes from other routers.

Configure the IPv6 over IPv4 Network

The second step is to configure your IPv6 over IPv4 network using your OpenBSD router:

  1. Configure your "external" network interface (the one connected to your Cisco router) using the appropriate IPv4 address.
  2. Configure your "internal" network interface (the one connected to your Linux workstation) using the appropriate IPv6 address. Hint: you'll need to specify inet6 as the address family - see man ifconfig if you can't figure it out.
  3. In this lab we are not going to configure a dynamic routing protocol on the OpenBSD router, instead you'll need to add a default route via your Cisco router (ie. via 192.168.x0.254). You should now be able to ping another group's OpenBSD router from your OpenBSD router.
  4. Enable IPv6 forwarding (routing):
    sysctl net.inet6.ip6.forwarding=1
  5. This is the fun part - you need to configure the IPv6 tunnels for each of the IPv6 networks. I'd suggest starting with one of these, then add the next two after you have the first one working. To create the tunnels you need to do the following (where x is your group number and y is the remote group number):
    # ifconfig gif0 create
    # ifconfig gif0 tunnel 192.168.x0.253 192.168.y0.253
    # ifconfig gif0 inet6 fc00::x fc00::y prefixlen 128
    
    This creates a new generic tunneling interface numbered gif0, specifies the physical end points of the tunnel (the IPv4 addresses) and assigns point-to-point IPv6 addresses for use as the tunnel end points. The IPv6 address should end in your group number.
     
    The 192.168.x0.253 address needs to be your external IPv4 address and the 192.168.y0.253 needs to be the IPv4 address of the OpenBSD router at the other end of the tunnel. The interface number needs to be increased for each tunnel (ie. gif0 for tunnel 0, gif1 for tunnel 1, etc).
  6. After both routers are configured you should be able to ping over the tunnel using ping6 fc00::y.
  7. Add routes to the IPv6 networks via the IPv6 addresses specified as your tunnel end points. For example:
    route add -inet6 fc00:y::0 -prefixlen 64 fc00::y
    
  8. You should now be able to ping from your fc00:x::1 address to the internal IPv6 address on another group's router using
    ping6 -S fc00:x::1 fc00:y::1
    

You have just completed an IPv6 over IPv4 network configuration!

Configuring your Workstation

The last step is to configure your Linux workstation to participate in your IPv6 network. To do this you need to assign it an IPv6 address and specify your OpenBSD router as the default IPv6 gateway.

  1. Linux's ifconfig and route commands do not know how to handle IPv6 (at least not on the version of Linux we're using). Instead you need to use the ip command. To set an IPv6 address try the following:
    ip addr add fc00:x::2/64 dev eth0
  2. To set an IPv6 default gateway try the following:
    ip route add ::/0 via fc00:x::1
    You should now be able to ping between workstations or between your workstation and other OpenBSD routers.

For the really adventurous, try running rtadvd (the Router Advertisement Daemon) on your OpenBSD router, then plug a laptop running Windows Vista or Windows XP (with IPv6 enabled) into your switch - does it get a sensible IPv6 address? Can you reach the other IPv6 networks? If you're running Linux you may be able to do the same using rtsol (you may have to get this from the USAGI Project or similar).