Native IPv6 Testing with CDRouter
In dual-stack and IPv6-only networks, the service provider delivers
native IPv6 service directly on the DUT’s WAN link, without tunneling or
translation. The testvar ipv6WanMode sets the IPv6 WAN
mode, which determines how the DUT gets its global IPv6 address on the
WAN:
| IPv6 WAN mode | DUT’s global WAN IPv6 address |
|---|---|
DHCP |
Assigned by CDRouter’s DHCPv6 server |
autoconf |
Configured by the DUT with SLAAC, using the prefix in CDRouter’s Router Advertisements |
unnumbered |
None. Neither the DUT nor CDRouter has a global WAN address. |
static |
Manually configured on the DUT |
PPPoE |
Assigned over a PPPoE session, using one of the modes above. ipv6PPPoEAddressMode sets which one. |
none |
None. IPv6 is disabled on the WAN, and the DUT provides IPv6 only on its LAN. |
This article describes how to configure CDRouter for each of these native IPv6 WAN modes. It also explains how CDRouter determines the DUT’s expected LAN prefix, and provides complete example configurations.
CDRouter also supports the 6to4 and 6rd IPv6 WAN modes, which tunnel
IPv6 over an IPv4 WAN. For all of the WAN modes and transition
technologies that CDRouter supports, see
IPv6 WAN Modes and Transition Technologies.
Dual-stack networks
In a dual-stack network, the DUT has native IPv4 and IPv6 service on
its WAN. This is CDRouter’s default configuration when IPv6 is first
enabled with the testvar supportsIPv6.
CDRouter’s IPv4 and IPv6 WAN modes are set independently, by the
testvars wanMode and ipv6WanMode. For
example, this config uses CDRouter’s default WAN settings: DHCP for
IPv4, and DHCPv6 with prefix delegation for IPv6:
SECTION "Base Configuration" {
SECTION "WAN" {
SECTION "WAN Interface" {
testvar wanInterface eth2
testvar wanMode DHCP
testvar wanIspIp 202.254.1.1
testvar wanIspAssignIp 202.254.1.2
testvar wanIspMask 255.255.255.0
testvar wanDomainName cdroutertest.com
testvar forwardingMode route
}
}
}
SECTION "CDRouter IPv6 Expansion" {
testvar supportsIPv6 yes
SECTION "IPv6 WAN" {
testvar ipv6WanMode DHCP
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspAssignIp 3001::2
testvar ipv6WanIspPrefixLen 64
SECTION "DHCPv6 Prefix Delegation" {
testvar dhcpv6WanEnablePD yes
testvar dhcpv6WanAssignPrefix 3001:dddd::
testvar dhcpv6WanAssignPrefixLen 48
}
}
}
IPv6-only networks
Many DUTs can run IPv6 on the WAN with no native IPv4 service. In these networks, either IPv4 is used only on the LAN, or a transition technology carries IPv4 traffic across the IPv6 WAN.
To configure CDRouter for IPv6-only WAN service, set the IPv4
wanMode to none, and ipv6WanMode to
any of the native IPv6 WAN modes that the DUT supports:
testvar supportsIPv6 yes
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.
If the DUT carries IPv4 traffic over the IPv6 WAN, set
wanMode to one of the following transition technologies
instead of none:
- DS-Lite (
dslite) - MAP-E and MAP-T (
MAP-EorMAP-T) - Lightweight 4over6 (
LW4o6)
How CDRouter simulates a native IPv6 WAN
In all of the native IPv6 WAN modes, CDRouter:
- Uses the global IPv6 address
ipv6WanIspIpon the WAN network, which has the prefix lengthipv6WanIspPrefixLen. Inunnumberedmode, CDRouter has no global WAN address. - Sends Router Advertisements on the WAN. The DUT learns CDRouter’s link-local address from these Router Advertisements, and uses it as its default router.
- Runs a DHCPv6 server on the WAN, which can assign a WAN address, delegate a prefix, and provide DNS and other configuration to the DUT.
- Simulates IPv6 DNS servers at
ipv6WanDnsServerandipv6WanBackupDnsServer, an IPv6 remote host atipv6RemoteHost, and other IPv6 hosts and servers behind the WAN.
By default, CDRouter expects the DUT not to send Router Advertisements
on its WAN. If it does, set ipv6ExpectRAonWan to yes.
Native IPv6 WAN modes
DHCP
In DHCP mode, the DUT requests a global IPv6 WAN address (IA_NA) from
CDRouter’s DHCPv6 server. CDRouter assigns the address
ipv6WanIspAssignIp, and uses
ipv6WanIspNextIp as a new address in WAN renumbering
tests:
testvar ipv6WanMode DHCP
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspAssignIp 3001::2
testvar ipv6WanIspNextIp 3001::3
testvar ipv6WanIspPrefixLen 64
The lifetimes of the address are set by
dhcpv6IAPreferredLifetime and
dhcpv6IAValidLifetime. Prefix delegation is enabled by
default.
Autoconf
In autoconf mode, the DUT configures its own global IPv6 WAN address
using stateless address autoconfiguration (SLAAC). CDRouter’s Router
Advertisements include the WAN prefix, which is calculated from
ipv6WanIspIp and ipv6WanIspPrefixLen.
CDRouter learns the DUT’s WAN address when the DUT configures it.
testvar ipv6WanMode autoconf
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspPrefixLen 64
In this example, CDRouter advertises the prefix 3001::/64. Prefix
delegation is enabled by default, so the DUT can still use DHCPv6 to
request a prefix for its LAN.
Unnumbered
In unnumbered mode, neither CDRouter nor the DUT has a global IPv6
address on the WAN. The DUT gets all of its global IPv6 addresses from
a prefix delegated by CDRouter’s DHCPv6 server. See
DHCPv6 Prefix Delegation Testing with CDRouter.
Static
In static mode, the DUT’s global IPv6 WAN address is configured
manually. Set ipv6WanIspAssignIp to the DUT’s WAN
address, and ipv6WanIspIp and
ipv6WanIspPrefixLen to match the DUT’s WAN network:
testvar ipv6WanMode static
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspAssignIp 3001::2
testvar ipv6WanIspPrefixLen 64
DHCPv6 prefix delegation is disabled by default in static mode. If the
DUT uses DHCPv6 to request a prefix for its LAN, set
dhcpv6WanEnablePD to yes.
PPPoE
In PPPoE mode, the DUT establishes a PPPoE session with CDRouter, and
gets its global IPv6 WAN address using the method set by
ipv6PPPoEAddressMode: DHCP (default), autoconf,
static, or none (unnumbered). See
Testing IPv6 over PPPoE with CDRouter.
DHCPv6 prefix delegation
In all of the native IPv6 WAN modes, CDRouter’s DHCPv6 server can
delegate a prefix to the DUT for use on its LAN. Prefix delegation is
enabled by default in all of the native IPv6 WAN modes except static.
The delegated prefix is set by dhcpv6WanAssignPrefix
and dhcpv6WanAssignPrefixLen, and must not overlap with
the WAN network.
For more information, including configurations where the WAN prefix is part of the delegated prefix, see DHCPv6 Prefix Delegation Testing with CDRouter.
Expected LAN prefix
CDRouter compares the DUT’s actual LAN prefix and address with the values it expects. How CDRouter determines the expected values depends on whether the DUT uses prefix delegation:
| Configuration | Expected LAN prefix | ipv6LanIp value |
|---|---|---|
| Prefix delegation enabled | Calculated from the delegated prefix and ipv6LanSubnetId |
Interface ID only, such as ::1 or ::%eui64%. Any prefix is ignored. |
| Prefix delegation disabled | Taken from ipv6LanIp and ipv6LanPrefixLen |
The DUT’s full global LAN address, such as 2004::1 |
With prefix delegation, ipv6LanSubnetId is the subnet
ID, in hex, that the DUT uses for its LAN. For example, with a
delegated prefix of 3001:dddd::/48 and a subnet ID of 1, CDRouter
expects the DUT to use the prefix 3001:dddd:0:1::/64 on its LAN.
The %eui64% keyword tells CDRouter to calculate an EUI-64 interface ID
from the DUT’s LAN MAC address.
When prefix delegation is disabled, the DUT’s LAN prefix must be different from its WAN prefix. If both interfaces use the same IPv6 network, the DUT can’t route packets between them correctly.
For more information on the LAN configuration testvars, see the CDRouter IPv6 User Guide.
IPv6 passthrough
Some dual-stack DUTs route IPv4 traffic from the LAN, but bridge IPv6 traffic directly to the WAN without routing it. To test these DUTs, CDRouter needs separate configs for IPv4 routing and IPv6 bridging. For details and example configurations, see IPv4 routing with IPv6 passthrough.
Example configurations
The following examples show the IPv6 WAN and LAN testvars for some common native IPv6 configurations. They can be combined with any IPv4 WAN configuration.
In all of the examples, the DUT relays the IPv6 DNS servers learned on
the WAN to its LAN clients, and CDRouter uses its default IPv6 DNS
servers (3001:51a:cafe::2 and 3001:51a:cafe::3), remote host, and
other WAN-side addresses.
DHCPv6 with prefix delegation on the WAN, autoconf on the LAN
This is CDRouter’s default IPv6 configuration. The values below are
equivalent to the defaults, so setting supportsIPv6 to
yes is enough to use it.
The DUT uses DHCPv6 to get the WAN address 3001::2 and the delegated
prefix 3001:dddd::/48 in a single exchange. CDRouter uses the address
3001::3 and the prefix 3001:ddde::/48 in renumbering tests. The DUT
uses subnet ID 1, so it advertises the prefix 3001:dddd:0:1::/64 on
its LAN, and assigns itself an EUI-64 address from that prefix.
CDRouter’s LAN clients use autoconf (SLAAC) to configure their
addresses from the same prefix.
testvar supportsIPv6 yes
# -- IPv6 WAN configuration
testvar ipv6WanMode DHCP
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspAssignIp 3001::2
testvar ipv6WanIspNextIp 3001::3
testvar ipv6WanIspPrefixLen 64
# -- DHCPv6 prefix delegation
testvar dhcpv6WanEnablePD yes
testvar dhcpv6WanAssignPrefix 3001:dddd::
testvar dhcpv6WanAssignNextPrefix 3001:ddde::
testvar dhcpv6WanAssignPrefixLen 48
testvar dhcpv6PDLatency 30
# -- IPv6 LAN configuration
testvar ipv6LanMode autoconf
testvar ipv6LanIp ::%eui64%
testvar ipv6LanSubnetId 1
DHCPv6 without prefix delegation on the WAN, DHCPv6 on the LAN
The DUT uses DHCPv6 to get the WAN address 3001::2, and CDRouter uses
the address 3001::3 in WAN renumbering tests. Prefix delegation is
disabled, so the DUT’s LAN address, 2004::1/64, is configured
manually. CDRouter’s LAN clients get their addresses from the DUT’s
DHCPv6 server. The DUT’s DHCPv6 address pool is 2004::2 through
2004::1f, with 2004::3 and 2004::7 excluded.
testvar supportsIPv6 yes
# -- IPv6 WAN configuration
testvar ipv6WanMode DHCP
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspAssignIp 3001::2
testvar ipv6WanIspNextIp 3001::3
testvar ipv6WanIspPrefixLen 64
testvar dhcpv6WanEnablePD no
# -- IPv6 LAN configuration
testvar ipv6LanMode DHCP
testvar ipv6LanIp 2004::1
testvar ipv6LanPrefixLen 64
testvar ipv6DhcpClientStart ::2
testvar ipv6DhcpClientEnd ::1f
testvar ipv6DhcpClientExclude "::3 ::7"
The DHCPv6 pool testvars only contain the interface ID of each address. CDRouter adds the DUT’s LAN prefix automatically.
Autoconf with prefix delegation on the WAN, autoconf on the LAN
The DUT uses autoconf (SLAAC) to configure its WAN address from the
prefix 3001::/64, and uses DHCPv6 to request a prefix for its LAN.
CDRouter delegates the prefix 3001:dddd::/48. The DUT uses subnet ID
1, so it advertises the prefix 3001:dddd:0:1::/64 on its LAN, and
assigns itself an EUI-64 address from that prefix. CDRouter’s LAN
clients use autoconf (SLAAC) to configure EUI-64 addresses from the same
prefix.
testvar supportsIPv6 yes
# -- IPv6 WAN configuration
testvar ipv6WanMode autoconf
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspPrefixLen 64
# -- DHCPv6 prefix delegation
testvar dhcpv6WanEnablePD yes
testvar dhcpv6WanAssignPrefix 3001:dddd::
testvar dhcpv6WanAssignNextPrefix 3001:ddde::
testvar dhcpv6WanAssignPrefixLen 48
testvar dhcpv6PDLatency 30
# -- IPv6 LAN configuration
testvar ipv6LanMode autoconf
testvar ipv6LanIp ::%eui64%
testvar ipv6LanSubnetId 1
This configuration is useful for checking whether the DUT requests IPv6 DNS information when it uses DHCPv6 only for prefix delegation. Some devices don’t.
Autoconf without prefix delegation on the WAN, DHCPv6 on the LAN
The DUT uses autoconf (SLAAC) to configure its WAN address from the
prefix 3001::/64, which CDRouter advertises on the WAN. Prefix
delegation is disabled, so the DUT’s LAN address, 2004::1/64, is
configured manually. CDRouter’s LAN clients get their addresses from the DUT’s
DHCPv6 server.
testvar supportsIPv6 yes
# -- IPv6 WAN configuration
testvar ipv6WanMode autoconf
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspPrefixLen 64
testvar dhcpv6WanEnablePD no
# -- IPv6 LAN configuration
testvar ipv6LanMode DHCP
testvar ipv6LanIp 2004::1
testvar ipv6LanPrefixLen 64
testvar ipv6DhcpClientStart ::2
testvar ipv6DhcpClientEnd ::1f
testvar ipv6DhcpClientExclude "::3 ::7"
IPv6-only with DHCPv6 and prefix delegation
The DUT has no IPv4 service on its WAN. It uses DHCPv6 to get the WAN
address 3001::2 and the delegated prefix 3001:dddd::/48, and uses
subnet ID 1 on its LAN.
testvar supportsIPv6 yes
# -- IPv4 WAN configuration
testvar wanMode none
# -- IPv6 WAN configuration
testvar ipv6WanMode DHCP
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspAssignIp 3001::2
testvar ipv6WanIspPrefixLen 64
# -- DHCPv6 prefix delegation (enabled by default in DHCP mode)
testvar dhcpv6WanAssignPrefix 3001:dddd::
testvar dhcpv6WanAssignPrefixLen 48
# -- IPv6 LAN configuration
testvar ipv6LanMode autoconf
testvar ipv6LanIp ::%eui64%
testvar ipv6LanSubnetId 1
Static IPv6 on the WAN, autoconf on the LAN
The DUT has the static IPv6 WAN address 3001::2 on the network
3001::/64. It doesn’t use prefix delegation, so its LAN address,
2004::1/64, is configured manually. CDRouter’s LAN clients use
autoconf (SLAAC) to configure their addresses.
testvar supportsIPv6 yes
# -- IPv6 WAN configuration
testvar ipv6WanMode static
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspAssignIp 3001::2
testvar ipv6WanIspPrefixLen 64
# -- IPv6 LAN configuration
testvar ipv6LanMode autoconf
testvar ipv6LanIp 2004::1
testvar ipv6LanPrefixLen 64
Static IPv6 on the WAN, DHCPv6 on the LAN
This example uses the same WAN configuration as the previous example,
but CDRouter’s LAN clients get their addresses from the DUT’s DHCPv6
server. The DUT’s DHCPv6 address pool is 2004::2 through 2004::1f,
with 2004::12 excluded.
testvar supportsIPv6 yes
# -- IPv6 WAN configuration
testvar ipv6WanMode static
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspAssignIp 3001::2
testvar ipv6WanIspPrefixLen 64
# -- IPv6 LAN configuration
testvar ipv6LanMode DHCP
testvar ipv6LanIp 2004::1
testvar ipv6LanPrefixLen 64
testvar ipv6DhcpClientStart ::2
testvar ipv6DhcpClientEnd ::1f
testvar ipv6DhcpClientExclude ::12
Static IPv6 with prefix delegation on the WAN, autoconf on the LAN
The DUT has the static IPv6 WAN address 3001::2, and uses DHCPv6 to
request a prefix for its LAN. CDRouter delegates the prefix
3001:dddd::/48, and uses the prefix 3001:ddde::/48 in renumbering
tests. The DUT uses subnet ID 1, so it advertises the prefix
3001:dddd:0:1::/64 on its LAN, and assigns itself an EUI-64 address
from that prefix.
testvar supportsIPv6 yes
# -- IPv6 WAN configuration
testvar ipv6WanMode static
testvar ipv6WanIspIp 3001::1
testvar ipv6WanIspAssignIp 3001::2
testvar ipv6WanIspPrefixLen 64
# -- DHCPv6 prefix delegation
testvar dhcpv6WanEnablePD yes
testvar dhcpv6WanAssignPrefix 3001:dddd::
testvar dhcpv6WanAssignNextPrefix 3001:ddde::
testvar dhcpv6WanAssignPrefixLen 48
testvar dhcpv6PDLatency 30
# -- IPv6 LAN configuration
testvar ipv6LanMode autoconf
testvar ipv6LanIp ::%eui64%
testvar ipv6LanSubnetId 1
Native IPv6 test modules
The following test modules verify functionality that is specific to the native IPv6 WAN modes:
| Test module | Description |
|---|---|
| dhcpv6-c | DHCPv6 client tests on the WAN, for DHCP mode |
| dhcpv6-IAs-c | DHCPv6 client tests with both IA_NA and IA_PD |
| dhcpv6-pd | DHCPv6 prefix delegation tests |
| slaac-wan | SLAAC client tests on the WAN, for autoconf mode |
| pppoe-c-v6 | PPPoE client tests, for PPPoE mode |
| ndp-wan | Neighbor Discovery and Router Advertisement tests on the WAN |
CDRouter automatically skips tests that don’t apply to the configured IPv6 WAN mode.
Testing exercises
A DUT’s IPv6 behavior should be consistent across all of the IPv6 WAN modes it supports, and across all of its IPv4 WAN modes. Create a config for each combination of IPv4 WAN mode, IPv6 WAN mode, and IPv6 LAN mode that the DUT supports, and run the same tests with each one.
For example, a DUT that supports DHCPv6 with and without prefix delegation, static IPv6, and autoconf on the WAN, and both autoconf and DHCPv6 on the LAN, has eight baseline IPv6 configurations. Testing each one often reveals problems that only occur in certain configurations, such as missing routes or DNS information.