Files
infix/test/case/dhcp/client_routes
Ejub Sabic 473cda35bb fix: flaky dhcp option 121 test
This commit increases attempts on checks in this particular test from default 10 to 60.
This has been introduced to match worst case scenario where after 3 retries(5s) each dhcp waits 30 seconds before next 3 retries.
Commits yields to much more stable test behaviour.

Resolves: #1515

Signed-off-by: Ejub Sabic <ejub1946@outlook.com>
2026-06-16 08:39:40 +02:00
..
2026-04-24 14:29:58 +02:00
2026-06-16 08:39:40 +02:00

=== DHCP Option 121 vs Option 3

ifdef::topdoc[:imagesdir: {topdoc}../../test/case/dhcp/client_routes]

==== Description

Verify that DHCP option 121 (classless static routes) is used over the
older option 3 (default gateway) in the DHCP client, when both are sent
by the server, see RFC3442.  Use the routing RIB in the operational
datastore to verify.

Installing routes from a DHCP server should not affect already existing
(static) routes.  To verify this, a static canary route (20.0.0.0/24 via
192.168.0.2) is installed before starting the DHCP client.  As a twist,
this canary route has a next-hop (192.168.0.2) which is not reachable
until a DHCP lease has been acquired.

The DHCP server is set up to hand out both a default router (option 3)
via 192.168.0.1 and a default route (option 121) via 192.168.0.254.

==== Topology

image::topology.svg[DHCP Option 121 vs Option 3 topology, align=center, scaledwidth=75%]

==== Sequence

. Setting up canary route, 20.0.0.0/24 via 192.168.0.2
. Enabling DHCP client, allow option 3 and 121
. Verify client has route 10.0.0.0/24 via 192.168.0.254 (option 121)
. Verify client has default route via 192.168.0.254 (not use option 3)
. Verify client still has canary route to 20.0.0.0/24 via 192.168.0.2