DHCP/IPoE Configuration
Configure DHCP subscriber termination for IPoE sessions.
Overview
The dhcp section configures the DHCP/IPoE server (abng-dhcpd), which:
- Terminates DHCP sessions from IPoE subscribers
- Authenticates via RADIUS using MAC address
- Assigns IP addresses from RADIUS or pools
- Injects Option 82 Circuit ID for subscriber identification
Configuration Options
enabled
Enable or disable DHCP/IPoE (optional).
dhcp:
enabled: true
Type: Boolean
Required: No
Default: false
Valid values: true, false
CLI:
abng# set dhcp enabled true
Note: Requires radius.servers to be configured.
lease_time
DHCP lease time in seconds (optional).
dhcp:
lease_time: 3600
Type: Integer
Required: No
Default: 3600
Constraints: Positive integer (seconds)
Purpose: How long the subscriber can use the assigned IP.
CLI:
abng# set dhcp lease_time 3600
allocation_mode
IP address allocation mode (optional).
dhcp:
allocation_mode: "radius"
Type: String
Required: No
Default: "radius"
Valid values: "radius", "pool"
| Mode | Description |
|---|---|
radius | IP assigned by RADIUS (Framed-IP-Address) |
pool | IP assigned from configured pools |
CLI:
abng# set dhcp allocation_mode "radius"
unnumbered
Use unnumbered IPoE (optional).
dhcp:
unnumbered: true
Type: Boolean
Required: No
Default: true
Valid values: true, false
Purpose: Assign /32 addresses instead of /24 subnets.
CLI:
abng# set dhcp unnumbered true
pools
IP address pools for allocation (optional, required if allocation_mode is "pool").
dhcp:
pools:
- network: "10.100.0.0/23"
gateway: "10.100.0.1"
dns_servers:
- "1.1.1.1"
- "8.8.8.8"
Pool Options
network
Network CIDR for the pool (required).
pools:
- network: "10.100.0.0/23"
Type: CIDR notation
Required: Yes
Constraints: Valid IPv4 CIDR (e.g., "10.100.0.0/23")
gateway
Gateway IP for the pool (required).
pools:
- gateway: "10.100.0.1"
Type: IPv4 address
Required: Yes
Constraints: Valid IPv4 address within the network
dns_servers
DNS servers for the pool (optional).
pools:
- dns_servers:
- "1.1.1.1"
- "8.8.8.8"
Type: List of IPv4 addresses
Required: No
Default: Empty
Example Configurations
RADIUS-Based Allocation
dhcp:
enabled: true
lease_time: 3600
allocation_mode: "radius"
unnumbered: true
IP addresses come from RADIUS Framed-IP-Address attribute.
Pool-Based Allocation
dhcp:
enabled: true
lease_time: 3600
allocation_mode: "pool"
unnumbered: true
pools:
- network: "10.100.0.0/23"
gateway: "10.100.0.1"
dns_servers:
- "1.1.1.1"
- "8.8.8.8"
IP addresses allocated from configured pools.
Multiple Pools
dhcp:
enabled: true
lease_time: 3600
allocation_mode: "pool"
pools:
- network: "10.100.0.0/23"
gateway: "10.100.0.1"
dns_servers: ["1.1.1.1", "8.8.8.8"]
- network: "10.101.0.0/23"
gateway: "10.101.0.1"
dns_servers: ["8.8.8.8", "1.1.1.1"]
Configuration via CLI
Enable DHCP
abng> configure
abng# set dhcp enabled true
abng# commit
Set Lease Time
abng# set dhcp lease_time 7200
abng# commit
Set Allocation Mode
abng# set dhcp allocation_mode "radius"
abng# commit
Add IP Pool
abng# set dhcp pools[0] network "10.100.0.0/23"
abng# set dhcp pools[0] gateway "10.100.0.1"
abng# set dhcp pools[0] dns_servers ["1.1.1.1", "8.8.8.8"]
abng# commit
Verification
View DHCP Configuration
abng> show configuration | match "^dhcp:"
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]
View DHCP Sessions
abng> show subscribers dhcp
┌────┬───────┬──────────┬───────────────┬────────────┬──────────┐
│ ID │ Type │ Username │ IP Address │ Interface │ Speed D/U│
├────┼───────┼─────── ───┼───────────────┼────────────┼──────────┤
│ 5 │ DHCP │ - │ 203.0.113.20 │ eth1.111.5 │ 50M/20M │
│ 6 │ DHCP │ - │ 203.0.113.21 │ eth1.111.6 │ 100M/40M │
└────┴───────┴──────────┴───────────────┴────────────┴──────────┘
Check abng-dhcpd Logs
sudo journalctl -u abng-dhcpd -f
Integration with RADIUS
DHCP requires RADIUS for authentication:
dhcp:
enabled: true
allocation_mode: "radius"
radius:
servers:
- host: "10.255.0.10"
secret: "your-secret"
nas_identifier: "AthenaBNG"
nas_ip_address: "10.255.0.1"
RADIUS attributes used:
- User-Name — MAC address (e.g., "aa:bb:cc:dd:ee:ff")
- Calling-Station-Id — MAC address
- NAS-Port-Id — Circuit ID (interface name)
- Framed-IP-Address — Assigned IP address
- Framed-IP-Netmask — Subnet mask (/32 for unnumbered)
- Session-Timeout — Session timeout in seconds
Integration with QoS
DHCP sessions can have per-subscriber QoS rules:
qos:
enabled: true
default_down: "50mbit"
default_up: "20mbit"
default_overhead_profile: "ipoe_ethernet"
QoS is applied when:
- DHCP session is established
- RADIUS returns rate attributes
- abng-qos creates CAKE qdisc on subscriber interface
Option 82 Circuit ID
Option 82 is automatically injected with:
- Circuit ID — Subscriber VLAN interface name (e.g., "eth1.111.500.100")
- Remote ID — BNG hostname
This allows upstream RADIUS servers to identify the subscriber's access line.
Validation Rules
| Field | Validation |
|---|---|
enabled | Boolean |
lease_time | Positive integer (seconds) |
allocation_mode | One of: radius, pool |
unnumbered | Boolean |
pools[].network | Valid CIDR notation |
pools[].gateway | Valid IPv4 address |
pools[].dns_servers | List of valid IPv4 addresses |
Best Practices
- Allocation Mode — Use "radius" for subscriber-specific IPs
- Lease Time — Use 3600s (1 hour) for standard DHCP
- Unnumbered — Use /32 addresses for IPoE (no subnet)
- Pools — Define separate pools for different subscriber classes
- RADIUS — Always configure RADIUS for authentication
- QoS — Enable QoS for per-subscriber rate limiting
- DNS — Configure DNS servers in pools or via RADIUS
Troubleshooting
No DHCP Sessions Appearing
- Check DHCP is enabled:
show configuration | match dhcp - Check VLAN demux is enabled:
show configuration | match demux - Check VLAN interfaces are created:
show vlans - Check RADIUS is reachable:
radtest testuser testpass <radius-ip> 1812 <secret> - Check abng-dhcpd logs:
journalctl -u abng-dhcpd -f
Sessions Not Getting IP
- Check allocation mode:
show configuration | match allocation_mode - Check pools are configured (if pool mode):
show configuration | match pools - Check RADIUS returns Framed-IP-Address (if radius mode)
- Check abng-dhcpd logs:
journalctl -u abng-dhcpd -f
IP Pool Exhaustion
- Check pool size:
show configuration | match pools - Check active sessions:
show subscribers dhcp | count - Expand pool or reduce lease time
- Check for stale leases:
journalctl -u abng-dhcpd | grep "lease expired"
Next Steps
- RADIUS Configuration — RADIUS servers and AAA
- QoS Configuration — CAKE traffic shaping
- Configuration Overview — All configuration sections