Files
infix/test/case/infix_dhcp/server_host
Joachim Wiberg 340330b75b confd: refactor dhcp client/server modeling of client-id
Instead of encoding hex data in regular strings, using an 'id:' prefix,
or guessing based on pattern in C code, we have decided for a breaking
change in the DHCP client model.

This commit introduces string and hex values for client-id in the models
for both DHCP client and server.  The *breaking* part of the changes are
strictly related to how a user pass binary data as colon-separated hex
digits.  The dedicated leaf node `client-id` is now reserved for string
values and the generic `list option` can be used to input user defined
string or hex values.  Even non-conformant client-id options can now be
encoded.  All described in detail in infix-dhcp-client.yang

The server model has been updated to be able to send generic options in
hex format, and the static host lease matcher for client-id now require
a 'str' or 'hex' modifier.

Note: dnsmasq is RFC compliant and will not match non-conforming option
      61 (client-id) even though the client can send such payload.

To increase test coverage, the server_host test has been updated to
check both string and hex client-id.  Matching on hostname is already
covered by other test(s).

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-01-31 13:56:40 +01:00
..

=== DHCP Server Static Host
==== Description
Verify DHCP server can hand out static host leases based on client-id,
both hexadecimal and a very long string, ensuring no pool address is
handed out instead.

==== Topology
ifdef::topdoc[]
image::{topdoc}../../test/case/infix_dhcp/server_host/topology.svg[DHCP Server Static Host topology]
endif::topdoc[]
ifndef::topdoc[]
ifdef::testgroup[]
image::server_host/topology.svg[DHCP Server Static Host topology]
endif::testgroup[]
ifndef::testgroup[]
image::topology.svg[DHCP Server Static Host topology]
endif::testgroup[]
endif::topdoc[]
==== Test sequence
. Set up topology and attach to client and server DUTs
. Configure DHCP client and server DUTs
. Verify DHCP client1 static lease
. Verify client1 hostname has *not* changed
. Verify DHCP client1 has default route via option 121
. Verify DHCP client2 static lease
. Verify client2 hostname has changed
. Verify DHCP client2 has default gateway


<<<