DHCP/IPoE
Built-in DHCP server for IPoE subscribers — no external DHCP server required.
Overview
AthenaBNG includes abng-dhcpd, a purpose-built DHCP server for broadband subscriber management. Unlike general-purpose DHCP servers, abng-dhcpd is designed specifically for BNG use cases:
- Works on dynamically-created VLAN interfaces with no IP address
- RADIUS authentication per subscriber (MAC-based)
- Unnumbered /32 addressing for broadband access
- Full RADIUS accounting with real interface traffic counters
- Integrated with the BNG session lifecycle
Why a Built-in DHCP Server?
Traditional DHCP servers (ISC Kea, dnsmasq) require an IP address on the interface they listen on. In a dynamic VLAN environment where interfaces are created on-demand by the demux daemon, there's no IP address until RADIUS tells us what to assign.
abng-dhcpd solves this by using AF_PACKET sockets — the same technology used by the VLAN demux daemon — to capture DHCP frames directly from the wire, with no IP required on the interface.
How It Works
- Subscriber sends DHCP Discover on their VLAN interface
- abng-dhcpd captures the frame via AF_PACKET relay
- Option 82 injected — Circuit ID = interface name, Remote ID = BNG hostname
- RADIUS Access-Request sent with subscriber MAC as username
- RADIUS returns Framed-IP-Address, rates, and session parameters
- DHCP Offer sent back to subscriber with assigned IP
- Subscriber sends Request, server sends ACK
- Session created — QoS applied, accounting started, abngd notified
RADIUS-Driven IP Assignment
IP addresses come from your RADIUS server, not from a local pool. This gives you full control over IP assignment policy in one place:
- Assign static IPs per subscriber
- Assign from pools based on subscriber class
- Different subnets for different service tiers
- Easy integration with your existing provisioning system
Accounting
abng-dhcpd implements full RFC 2866 RADIUS accounting:
| Event | Acct-Status-Type | When |
|---|---|---|
| Session confirmed | Start | DHCP ACK sent |
| Periodic update | Interim-Update | Every 5 minutes (configurable) |
| Subscriber releases | Stop (User-Request) | DHCP Release received |
| Lease expires | Stop (Session-Timeout) | Lease timer expires |
| BNG shutdown | Stop (NAS-Reboot) | Graceful shutdown |
Traffic counters are read from the Linux kernel's interface statistics — real bytes and packets, not estimates.
Configuration
dhcp:
enabled: true
lease_time: 3600
allocation_mode: "radius"
unnumbered: true
pools:
- network: "10.100.0.0/23"
gateway: "10.100.0.1"
dns_servers:
- "1.1.1.1"
- "8.8.8.8"