A lightweight, Alpine-based DHCP client container specifically designed for testing ISP-style networking in containerlab.
- This can be used with ripnet/clab-kea-dhcp as a DHCP server.
- This client is optimized to test IPv4, IPv6 WAN (IA_NA), and IPv6 Prefix Delegation (IA_PD) simultaneously.
- Prefix Delegation verification: Requests a
/56(or any size) and automatically carves it into two /64 subnets assigned todummy0anddummy1. - Management isolation: Automatically removes default routes from
eth0(the docker interface) to ensure all traffic is routed via the data link (eth1)
Add the following node to your containerlab yaml
nodes:
client1:
kind: linux
image: ghcr.io/ripnet/clab-dhcp-client:latestConnect it to your router:
links:
- endpoints: ["router:eth1", "client1:eth1"]Once the lab is deployed, you can verify that the client successfully received its assignments by running:
- Verify that
eth1has both an IPv4 address and a Global IPv6 address.
docker exec -it clab-repo-client1 ip addr show eth1- Check Prefix Delegation (The LAN test) This client is configured to take the first two subnets from the ISP's delegated prefix and assign them to virtual interfaces.
docker exec -it clab-repo-client1 ip -6 addr show dummy0
docker exec -it clab-repo-client1 ip -6 addr show dummy1If dummy0 and dummy1 show addresses like 2001:db8:cafe::1/64 and 2001:db8:cafe:1::1/64, your PD setup is working perfectly!
- Check Routing
Verify that the default gateway was learned via Router Advertisements (RA) from your relay/router:
docker exec -it clab-repo-client1 ip -6 route showTo test the DHCP server's state machine without restarting the containerlab lab:
docker exec -it clab-repo-client1 dhcpcd -k eth1docker exec -it clab-repo-client1 dhcpcd -n eth1