Skip to main content

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"

ModeDescription
radiusIP assigned by RADIUS (Framed-IP-Address)
poolIP 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:

  1. DHCP session is established
  2. RADIUS returns rate attributes
  3. 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

FieldValidation
enabledBoolean
lease_timePositive integer (seconds)
allocation_modeOne of: radius, pool
unnumberedBoolean
pools[].networkValid CIDR notation
pools[].gatewayValid IPv4 address
pools[].dns_serversList of valid IPv4 addresses

Best Practices

  1. Allocation Mode — Use "radius" for subscriber-specific IPs
  2. Lease Time — Use 3600s (1 hour) for standard DHCP
  3. Unnumbered — Use /32 addresses for IPoE (no subnet)
  4. Pools — Define separate pools for different subscriber classes
  5. RADIUS — Always configure RADIUS for authentication
  6. QoS — Enable QoS for per-subscriber rate limiting
  7. DNS — Configure DNS servers in pools or via RADIUS

Troubleshooting

No DHCP Sessions Appearing

  1. Check DHCP is enabled: show configuration | match dhcp
  2. Check VLAN demux is enabled: show configuration | match demux
  3. Check VLAN interfaces are created: show vlans
  4. Check RADIUS is reachable: radtest testuser testpass <radius-ip> 1812 <secret>
  5. Check abng-dhcpd logs: journalctl -u abng-dhcpd -f

Sessions Not Getting IP

  1. Check allocation mode: show configuration | match allocation_mode
  2. Check pools are configured (if pool mode): show configuration | match pools
  3. Check RADIUS returns Framed-IP-Address (if radius mode)
  4. Check abng-dhcpd logs: journalctl -u abng-dhcpd -f

IP Pool Exhaustion

  1. Check pool size: show configuration | match pools
  2. Check active sessions: show subscribers dhcp | count
  3. Expand pool or reduce lease time
  4. Check for stale leases: journalctl -u abng-dhcpd | grep "lease expired"

Next Steps