In some cases it may be necessary to include an additional router in the test setup. Common examples include DSL or DOCSIS testing environments where a DSLAM or CMTS device (respectively) is required to forward traffic from the DUT to CDRouter’s WAN interface. If the intermediate device is performing IP/IPv6 routing at Layer-3, CDRouter must be properly configured to use this device as a gateway to route traffic back to the DUT.
If the DUT relies on DHCP or DHCPv6 to obtain its IP address, the intermediate router will need to be configured as a DHCP Relay Agent with CDRouter’s WAN address wanIspIp and/or ipv6WanIspIp in order to forward DHCP requests to between the DUT and CDRouter. CDRouter automatically supports DHCP/DHCPv6 requests from Relay Agents and will perform the proper message formatting when assigning addresses to the DUT.
In the example test setup shown below, an additional router is used to route between CDRouter’s WAN interface and the DUT, which are on different IP subnets.
To configure CDRouter to work with this setup, additional testvars must be included in the CDRouter configuration file. The wanIspGateway testvar is paired with wanIspIp and wanIspMask to identify the subnet for CDRouter’s WAN interface. wanIspAssignGateway, wanIspAssignIp and wanIspAssignMask correspond to the DUT’s interface. The IPv4HopCount should be set to 2 in this case.
If the DUT is using DHCP to obtain its IP address from CDRouter, the intermediate router must be configured as a DHCP relay to forward the DUT’s DHCP requests to CDRouter’s wanIspIp address.
The intermediate router should also be conifigured to use CDRouter’s WAN interface as its default route so that LAN traffic forwarded by the DUT to CDRouter’s simulated servers (DNS, NTP, TR-069 ACS, Remote Host, etc.) will be routed correctly. Alternatively, the intermediate router can be configured with static routes for these simulated servers, using wanIspIp as the next-hop for each destination.
A sample CDRouter configuration based on the test setup above is provided here:
# -- Sample CDRouter IPv4 routed configuration testvar wanMode DHCP testvar wanIspIp 184.108.40.206 testvar wanIspGateway 220.127.116.11 testvar wanIspMask 255.255.255.0 testvar wanIspAssignIp 18.104.22.168 testvar wanIspAssignGateway 22.214.171.124 testvar wanIspAssignMask 255.255.0.0 testvar IPv4HopCount 2
Similar testvars exist for IPv6 configurations:
For IPv6 configurations the intermediate router must send router advertisements on the downstream interface so that the DUT can obtain a default route.
In addition, the relay must be able to route traffic from CDRouter’s simulated servers to the DUT’s LAN subnet. The DUT’s LAN prefix may be statically conifgured or dynamically delegated by CDRouter’s DHCPv6 server.
# -- Sample CDRouter IPv6 routed configuration testvar ipv6WanMode DHCP testvar ipv6WanIspIp 3001::1 testvar ipv6WanIspGateway 3001::2 testvar ipv6WanIspPrefixLen 64 testvar ipv6WanIspAssignIp 3101::2 testvar IPv6HopCount 2 # (optional) testvar dhcpv6WanEnablePD yes testvar dhcpv6WanAssignPrefix 3001:dddd:: testvar dhcpv6WanAssignPrefixLen 48