IPv6 WAN Modes and Transition Technologies

CDRouter simulates a service provider network on its WAN test interface. To test an IPv6-capable DUT, configure CDRouter to provide the same type of IPv4 and IPv6 service that the DUT expects from its service provider.

This article describes the IPv6 deployment scenarios that CDRouter supports, the WAN modes used for each one, and where to find detailed configuration information.

All of the scenarios below require the CDRouter IPv6 expansion, with IPv6 enabled in the config file:

testvar supportsIPv6 yes

Choosing a WAN scenario

Two testvars work together to define how the DUT connects to the WAN:

  • wanMode sets the IPv4 WAN mode, which is how the DUT gets IPv4 service. It also selects an IPv4-over-IPv6 transition technology such as DS-Lite or MAP-T.
  • ipv6WanMode sets the IPv6 WAN mode, which is how the DUT gets IPv6 service, either natively or through an IPv6-over-IPv4 tunnel.

When IPv6 is enabled, CDRouter’s default configuration is dual-stack, with both the IPv4 and IPv6 WAN modes set to DHCP and DHCPv6 prefix delegation enabled.

Find the scenario that matches the DUT’s service provider network, then set both testvars to match the DUT’s configuration.

Scenario Service provider network
Dual-stack Native IPv4 and native IPv6
IPv6-only Native IPv6 with no IPv4 service
IPv4 over IPv6 IPv6-only, with IPv4 service carried over IPv6
IPv6 over IPv4 IPv4-only, with IPv6 service carried over IPv4

Dual-stack

In a dual-stack network, the service provider delivers native IPv4 and native IPv6 service side by side. The DUT runs both protocols on its WAN interface and provides both IPv4 and IPv6 connectivity to clients on its LAN.

Set wanMode to the DUT’s IPv4 WAN mode, and set ipv6WanMode to one of the native IPv6 WAN modes below. For information on the IPv4 WAN modes, see WAN Configuration in the CDRouter User Guide.

Native IPv6 WAN modes

The native IPv6 WAN modes determine how the DUT gets its global IPv6 address on the WAN. They are also used in the IPv6-only and IPv4 over IPv6 scenarios.

IPv6 WAN mode Description
DHCP The DUT is assigned an IPv6 WAN address by CDRouter’s DHCPv6 server.
autoconf The DUT uses SLAAC to autoconfigure its WAN address from a network prefix received in CDRouter’s Router Advertisements.
static The DUT WAN interface is preconfigured with a static IPv6 address.
unnumbered No address is assigned to the DUT’s WAN interface. Only link-local addresses are used.
PPPoE The DUT forwards all IPv6 WAN traffic over a PPPoE connection instead of directly over Ethernet.

See Native IPv6 Testing with CDRouter for more details on the native IPv6 WAN modes, including complete WAN and LAN configuration examples.

DHCPv6 prefix delegation

CDRouter’s DHCPv6 server can delegate an IPv6 prefix to the DUT for use on its LAN. Prefix delegation works with all of the native IPv6 WAN modes, and is controlled by dhcpv6WanEnablePD. It is enabled by default when ipv6WanMode is DHCP, autoconf, unnumbered, or PPPoE. For static mode, enable it explicitly.

The delegated prefix is set with dhcpv6WanAssignPrefix and dhcpv6WanAssignPrefixLen:

testvar dhcpv6WanEnablePD         yes
testvar dhcpv6WanAssignPrefix     3001:dddd::
testvar dhcpv6WanAssignPrefixLen  48

Prefix delegation is required for unnumbered mode and for unnumbered PPPoE, since the delegated prefix is the DUT’s only source of global IPv6 addresses.

For more information, see DHCPv6 Prefix Delegation Testing with CDRouter.

IPv4 routing with IPv6 passthrough

Some dual-stack CPE routers route IPv4 traffic with NAT, but don’t route IPv6 traffic. Instead, they pass IPv6 traffic through between the WAN and the LAN without routing it, like a bridge, so that LAN clients get their IPv6 addresses directly from the service provider network. This is sometimes called IPv6 passthrough or IPv6 bridging.

A CDRouter config tests the DUT as either a router or a bridge, as set by forwardingMode, so it can’t test both behaviors at once. Test these DUTs with two separate config files:

Config What it tests
IPv4 routing The DUT’s IPv4 routing and NAT, with no IPv6 service on the WAN
IPv6 passthrough The DUT’s IPv6 bridging, with no IPv4 service on the WAN
# -- IPv4 routing config
testvar forwardingMode  route
testvar ipv6WanMode     none
# -- IPv6 passthrough config
testvar forwardingMode  bridge
testvar wanMode         none
testvar supportsIPv6    yes

For the rest of the bridge mode configuration, including how CDRouter assigns IPv6 addresses to LAN clients in bridge mode, see Access Point, Bridge, and Switch Testing with CDRouter.

IPv6-only

In an IPv6-only network, the service provider does not provide any means to carry IPv4 traffic across the WAN. Set wanMode to none, and set ipv6WanMode to one of the native IPv6 WAN modes:

testvar wanMode      none
testvar ipv6WanMode  DHCP

With wanMode set to none, CDRouter’s LAN clients still get IPv4 addresses from the DUT. If the DUT doesn’t support IPv4 at all, even on its LAN, set supportsIPv4 to no instead. CDRouter then turns off IPv4 on both the WAN and the LAN, and skips all tests that require IPv4.

For an example IPv6-only configuration, see Native IPv6 Testing with CDRouter.

If the service provider also delivers IPv4 service over its IPv6-only network, use one of the IPv4 over IPv6 technologies instead.

IPv4 over IPv6

Service providers that have moved their access networks to IPv6-only still need to give their customers access to the IPv4 Internet. IPv4-over-IPv6 transition technologies carry the customer’s IPv4 traffic across the IPv6-only network, either by encapsulating it in IPv6 or by translating it to IPv6. They also let many customers share a limited pool of public IPv4 addresses.

In CDRouter, each of these technologies is an IPv4 WAN mode that runs on top of a native IPv6 WAN mode. Set wanMode to the technology the DUT uses, and set ipv6WanMode to any of the native IPv6 WAN modes. CDRouter simulates the service provider’s end of the tunnel or translation on the WAN.

Technology IPv4 WAN mode How IPv4 crosses the IPv6 network Where IPv4 NAT happens Details
DS-Lite (RFC 6333) dslite Encapsulated in IPv6 Service provider DS-Lite Testing with CDRouter
LW4o6 (RFC 7596) LW4o6 Encapsulated in IPv6 DUT MAP and LW4o6 Testing with CDRouter
MAP-E (RFC 7597) MAP-E Encapsulated in IPv6 DUT MAP and LW4o6 Testing with CDRouter
MAP-T (RFC 7599) MAP-T Translated to IPv6 DUT MAP and LW4o6 Testing with CDRouter

CDRouter does not support 464XLAT (RFC 6877) or NAT64/DNS64 (RFC 6146, RFC 6147).

DS-Lite

In DS-Lite, the DUT acts as a Basic Bridging BroadBand (B4) element. It doesn’t perform NAT. Instead, it encapsulates IPv4 packets from its LAN in IPv6 and tunnels them to an Address Family Transition Router (AFTR) in the service provider network, which performs NAT. CDRouter creates the AFTR on the WAN at the address set by ipv6DsliteAftr:

testvar wanMode         dslite
testvar ipv6WanMode     DHCP
testvar ipv6DsliteAftr  3001:aaaa::1

MAP-E, MAP-T, and LW4o6

In MAP-E and MAP-T, the DUT performs NAT using a public IPv4 address that it shares with other customers, and a restricted range of ports. The DUT derives its IPv4 address and port range from mapping rules configured by the service provider, combined with its delegated IPv6 prefix. MAP-E encapsulates IPv4 packets in IPv6, and MAP-T translates them to IPv6. CDRouter simulates the service provider’s MAP Border Relay on the WAN.

LW4o6 is similar to MAP-E, but the DUT is provisioned with its public IPv4 address and port range directly, rather than deriving them. CDRouter simulates the service provider’s lwAFTR on the WAN.

By default, CDRouter provisions the DUT’s MAP or LW4o6 configuration using DHCPv6 options (RFC 7598).

IPv6 over IPv4

When the service provider’s access network supports only IPv4, the DUT can still provide IPv6 service to its LAN by tunneling IPv6 packets inside IPv4 to a relay router connected to the IPv6 Internet. With 6to4 and 6rd, the DUT derives its IPv6 prefix from its IPv4 WAN address, so no IPv6 address assignment is needed on the WAN.

Set wanMode to the DUT’s IPv4 WAN mode, and set ipv6WanMode to 6to4 or 6rd. CDRouter simulates the relay router on the WAN, at the IPv4 address set by ipv6RelayServer and the IPv6 address set by ipv6RelayServerGlobal.

6to4

6to4 (RFC 3056) combines the well-known prefix 2002::/16 with the DUT’s IPv4 WAN address to create a /48 prefix. Traffic to the native IPv6 Internet goes through a public 6to4 relay at the anycast address 192.88.99.1. 6to4 requires a public IPv4 WAN address.

testvar ipv6WanMode      6to4
testvar ipv6RelayServer  192.88.99.1

6rd

6rd (RFC 5969) is based on 6to4, but uses the service provider’s own IPv6 prefix and relay, so the service provider controls the entire path. The DUT’s 6rd prefix, prefix length, and IPv4 mask length must be configured on the DUT or provisioned in the DHCPv4 6rd option (option 212), and must match ipv6rdPrefix, ipv6rdPrefixLen, and ipv6rdIPv4MaskLen. When the IPv4 WAN mode is DHCP, CDRouter’s DHCPv4 server provides the 6rd option by default (ipv6rdDHCPv4Option).

testvar ipv6WanMode        6rd
testvar ipv6RelayServer    10.3.3.3
testvar ipv6rdPrefix       2010:1234::
testvar ipv6rdPrefixLen    32
testvar ipv6rdIPv4MaskLen  0

For prefix calculations and complete examples, see 6to4 and 6rd Testing with CDRouter.

IPv4-only WAN with a dual-stack LAN

Some DUTs provide IPv4 and IPv6 to clients on their LAN, but have no IPv6 service on a WAN interface. For example, a multi-service gateway might run dual-stack on its data/Internet WAN connection, but only IPv4 on separate WAN connections for voice, video, or IPTV service.

To configure a WAN interface with no IPv6 service, set ipv6WanMode to none. CDRouter automatically skips tests that aren’t supported in this configuration. For a multi-service gateway, set it in the testvar_group of each IPv4-only WAN interface:

testvar_group wan3 {
    testvar wanInterface  eth2
    testvar wanMode       DHCP
    testvar wanVlanId     300
    testvar ipv6WanMode   none
}

For more information, see Multi-service gateway testing with CDRouter.

Test modules for specific WAN modes

Most IPv6 test modules run in any WAN scenario. The following test modules verify functionality that is specific to a WAN mode or technology:

WAN mode or technology Test modules
DHCP dhcpv6-c, dhcpv6-IAs-c
autoconf slaac-wan
PPPoE pppoe-c-v6
DHCPv6 prefix delegation dhcpv6-pd
DS-Lite dslite
MAP-E and LW4o6 mape
MAP-T mapt
6to4 6to4
6rd 6rd