qacafe - ip test solutions
Knowledge Base > A DHCP/DHCPv6 relay setup

A DHCP/DHCPv6 relay setup

The CDRouter Cookbook

In some cases it may be necessary to include an additional router in the test setup. CDRouter supports this type of scenario when the DUT's WAN connection mode is static or DHCP only.

In the example test setup shown below, an additional router is used to route between an ATM network and an Ethernet network. In this case the DUT is a DSL CPE that is connecting to an ATM-based DSLAM. The router eliminates the need for installing a separate ATM interface in the CDRouter host system. Note that the ATM/Ethernet router must be configured as a DHCP relay agent in this setup.

Test Setup

CDRouter Configuration

To configure CDRouter for DHCP relay, three additional testvars, wanIspGateway, wanIspAssignGateway, and IPv4hopCount must be included in the CDRouter configuration file. A sample CDRouter configuration based on the test setup above is provided here:

  # -- Sample CDRouter DHCP relay configuration

  testvar wanMode DHCP

  testvar wanIspIp 10.0.0.1
  testvar wanIspGateway 10.0.0.2
  testvar wanIspMask 255.255.255.0

  testvar wanIspAssignIp 4.0.0.2
  testvar wanIspAssignGateway 4.0.0.1
  testvar wanNatIp 4.0.0.2

  testvar wanIspNextIp 4.0.0.10

  testvar IPv4HopCount 2

IPv6 Configuration

Similar testvars exist for IPv6 configurations:

  # -- Sample CDRouter DHCP relay configuration

  testvar ipv6WanMode DHCP

  testvar ipv6WanIspIp 3001::1
  testvar ipv6WanIspGateway 3001::2
  testvar ipv6WanIspPrefixLen 64

  testvar ipv6WanIspAssignIp bbbb::10

  testvar ipv6WanIspNextIp bbbb::11

  testvar IPv6HopCount 2

For IPv6 configurations the relay must send router advertisements on the downstream interface so that the DUT can obtain a default route. In addition, the relay must be configured with a static route so that packets received on the upstream interface that are destined for the DUT's LAN network, bbbb::/64 in this example, are forwarded to the downstream interface connected to the DUT's WAN.

Requirements

  • CDRouter or CDRouter-Multiport
  • Two dedicated Ethernet network interfaces
  • One DSL router
  • One ATM-based DSLAM
  • One router with an ATM and Ethernet interface

Benefits

  • Allows more complex network topologies to be tested with CDRouter
  • Can be used to eliminate some hardware requirements, such as an ATM interface when an ATM-based DSLAM is used

Additional Information

Please see Chapter 5 of the CDRouter User's Guide for more information.

Related articles that may also be helpful: