Product
Search Results

Running CDRouter Static Route Tests

Some CPE devices can be configured with static routes to direct traffic for specific destinations through an alternative network path. CDRouter allows you to verify that any static routes that have been configured on the DUT are working properly.

Static routes are typically configured manually or through some out-of-band mechanism, and they persist across reboots of the DUT. You will only be able to run these tests if your DUT supports these type of routes.

LAN-side static routes can be used in a “home networking” scenario where there are one or more routers connected to the LAN side of the CPE device providing access to other subnetworks.

WAN-side static routes can be used by a CPE with multiple WAN links to direct traffic for different destinations through the appropriate next-hop router. These routers may be reachable via different physical interfaces, or the DUT may be configured with multiple VLANs on the same physical interface.

In all static route tests, CDRouter simulates the next-hop router and remote network destinations, so no other equipment or connections are required. Once you have added the static routes to your DUT, you must update your CDRouter config file with the details of each route.

Configuration

CDRouter supports testing of both LAN and WAN static routes over IPv4 and IPv6. The testvar settings for each type of route are found in their respective section of the config file, and multiple instances of each type may be configured.

LAN Static Routes

LAN-side static routes are configured using a pair of testvars to indicate the remote network destination and next-hop address for that route. Each pair is identified with a unique instance number.

Requirements

  • LAN Network (staticRouteLanNetwork, staticIpv6RouteLanNetwork)
    Each instance of these testvars specifies a remote destination network on the LAN side of the DUT. The remote network must not overlap with the DUT’s own LAN IPv4 subnet or IPv6 prefix.

  • LAN Next-Hop (staticRouteLanNextHop, staticIpv6RouteLanNextHop)
    Each instance of these testvars specifies the address to which the DUT should forward packets for the associated destination network. The next-hop address must fall within the DUT’s own LAN IPv4 subnet or IPv6 prefix.

IPv4

SECTION "Base Configuration" {
    SECTION "LAN" {
        SECTION "LAN Static Routes" {
            testvar staticRouteLanNetwork1           1.0.0.0/255.255.255.0
            testvar staticRouteLanNextHop1           192.168.1.18
    
            testvar staticRouteLanNetwork2           1.0.0.0/255.255.255.0
            testvar staticRouteLanNextHop2           192.168.1.18
        }
    }
}

IPv6

SECTION "CDRouter IPv6 Expansion" {
    SECTION "IPv6 LAN" {
        SECTION "LAN IPv6 Static Routes" {
            testvar staticIpv6RouteLanNetwork1       1001::/64
            testvar staticIpv6RouteLanNextHop1       3001:dddd::1a

            testvar staticIpv6RouteLanNetwork2       1002::/64
            testvar staticIpv6RouteLanNextHop2       3002:dddd::1a
        }
    }
}

WAN Static Routes

WAN-side static routes are also configured with a pair of testvars to indicate the remote network destination and next-hop address for that route on the WAN side of the DUT. Just as with LAN static routes, each pair is identified with a unique instance number.

Since the DUT’s WAN address is dynamic, your device may also support an alternative type of static route that specifies the physical interface or VLAN as the next-hop instead of an static IP address. In this case, you can set the WAN Next-Hop testvar to the name of the CDRouter WAN interface (ie. “wan”, “wan2”, etc.) that matches the DUT’s static route.

Requirements

  • WAN Network (staticRouteWanNetwork, staticIpv6RouteWanNetwork)
    Each instance of these testvars specifies a remote WAN destination network. The remote network must be unique within the CDRouter config file. Specifically,

    • The remote network must not overlap with the DUT’s own WAN IPv4 subnet or IPv6 prefix.

    • The remote network must not overlap any addresses belonging to CDRouter’s existing servers, such as wanDnsServer , ipv6RemoteHost , or the “Free Network Range” defined in the config file.

  • WAN Next-Hop (staticRouteWanNextHop, staticIpv6RouteWanNextHop)
    Each instance of these testvars specifies the next-hop address or CDRouter interface to which the DUT should forward packets for the associated destination network.

    • If an address is specified it must fall within the DUT’s own WAN IPv4 subnet or IPv6 prefix.

IPv4

SECTION "Base Configuration" {
    SECTION "WAN" {
        SECTION "WAN Static Routes" {
            testvar staticRouteWanNetwork1           7.1.1.0/255.255.255.0
            testvar staticRouteWanNextHop1           202.254.1.7

            testvar staticRouteWanNetwork2           8.1.1.0/255.255.255.0
            testvar staticRouteWanNextHop2           wan2
        }
    }
}

IPv6

SECTION "CDRouter IPv6 Expansion" {
    SECTION "IPv6 WAN" {
        SECTION "WAN IPv6 Static Routes" {
            testvar staticIpv6RouteWanNetwork1       3077::/64
            testvar staticIpv6RouteWanNextHop1       3001::7

            testvar staticIpv6RouteWanNetwork2       3022::/64
            testvar staticIpv6RouteWanNextHop2       wan2
        }
    }
}

Running Tests

The static route tests can be found in the static.tcl module for IPv4, and static-v6.tcl for IPv6.

When each test is run, CDRouter will dynamically create a new node on the LAN or WAN link, respectively, for each configured static route entry to act as the next-hop for its associated destination network. It will then verify that the DUT forwards traffic sent to each destination through the appropriate next-hop.