Skip to content

iface dhcp

Thomas Mangin edited this page May 17, 2026 · 2 revisions

Pre-Alpha. This page describes behavior that may change.

DHCP client for managed interfaces. Supports DHCPv4 (RFC 2131, full DORA) and DHCPv6 (SARR, IA_NA, IA_PD) concurrently on the same unit.

Category

Infrastructure.

Configuration

Enabled per unit inside the per-family containers under ipv4 and ipv6.

interface {
    ethernet uplink {
        mac-address 00:1a:2b:3c:4d:5e;
        unit main {
            ipv4 {
                dhcp {
                    enabled true;
                    client-id "ze-uplink";
                    hostname "my-router";
                }
            }
            ipv6 {
                dhcpv6 {
                    enabled true;
                    pd { length 56; }
                }
            }
        }
    }
}

Behaviour

For DHCPv4, the plugin runs the full DORA (Discover, Offer, Request, Ack) exchange, installs the leased address directly via netlink, and tracks the lease through its renewal and expiry lifecycle. For DHCPv6, it runs the SARR (Solicit, Advertise, Request, Reply) exchange with IA_NA (identity association for non-temporary addresses) and IA_PD (prefix delegation).

Bus events are published for every lease lifecycle change: interface/dhcp/lease-acquired, interface/dhcp/lease-renewed, interface/dhcp/lease-expired. Each event carries the name, unit, address, prefix length, router, DNS servers, and lease time.

Concurrent v4 and v6 on the same unit is supported. DHCPv6 Renew is not quite correct: the client re-solicits instead of doing a proper Renew. This is a known issue.

Interactions

  • Uses iface-netlink (the backend) for address installation.
  • The BGP reactor subscribes to lease events and starts or stops listeners when addresses change.

Source

main/internal/plugins/ifacedhcp/

Home

About

First Steps

Configuration

Operation

Interfaces

Plugins

Plugin Development

Chaos Testing

Blueprints

Development

Reference

Clone this wiki locally