VLAN Demux Configuration
Configure dynamic VLAN interface creation from subscriber packets.
Overview
The demux section configures the VLAN demultiplexer daemon (abng-demux), which:
- Captures PPPoE PADI and DHCP Discover packets on the subscriber trunk
- Dynamically creates QinQ VLAN sub-interfaces
- Cleans up idle interfaces after timeout
- Applies safety limits to prevent resource exhaustion
Configuration Options
enabled
Enable or disable VLAN demux (optional).
demux:
enabled: true
Type: Boolean
Required: No
Default: false
Valid values: true, false
CLI:
abng# set demux enabled true
profiles
List of demux profiles (required when enabled).
Each profile defines:
- Trunk interface to monitor
- VLAN ranges to create
- Services to support (PPPoE, DHCP)
- Safety limits
demux:
profiles:
- name: "residential"
trunk_interface: "eth1"
outer_vlans: [111, 112]
stag_range: "100-999"
ctag_range: "1-4094"
stag_protocol: "802.1ad"
services: ["pppoe", "dhcp"]
idle_timeout: 3600
max_interfaces: 50000
creation_rate_limit: 100
require_packets: 2
require_window: 5
Profile Options
name
Profile name (required).
profiles:
- name: "residential"
Type: String
Required: Yes
Constraints: 1-64 characters, alphanumeric and underscores
trunk_interface
Subscriber trunk interface (required).
profiles:
- trunk_interface: "eth1"
Type: String (interface name)
Required: Yes
Constraints: Must match interfaces.subscriber_trunk
outer_vlans
Outer VLAN IDs to match (required).
profiles:
- outer_vlans: [111, 112, 113]
Type: List of integers
Required: Yes
Constraints: VLAN IDs 1-4094
Purpose: Matches the outer VLAN tag (S-Tag) in QinQ frames.
stag_range
S-Tag (Service Tag) range for dynamic interfaces (required).
profiles:
- stag_range: "100-999"
Type: String (range format)
Required: Yes
Format: "start-end" (e.g., "100-999")
Constraints: VLAN IDs 1-4094
Purpose: Defines the range of S-Tags to allocate for dynamic VLAN creation.
ctag_range
C-Tag (Customer Tag) range for dynamic interfaces (required).
profiles:
- ctag_range: "1-4094"
Type: String (range format)
Required: Yes
Format: "start-end" (e.g., "1-4094")
Constraints: VLAN IDs 1-4094
Purpose: Defines the range of C-Tags to allocate for dynamic VLAN creation.
stag_protocol
S-Tag protocol type (optional).
profiles:
- stag_protocol: "802.1ad"
Type: String
Required: No
Default: "802.1q"
Valid values: "802.1q", "802.1ad"
| Protocol | Description |
|---|---|
802.1q | Standard VLAN (C-Tag) |
802.1ad | Service VLAN (S-Tag) |
services
Services to support on this profile (required).
profiles:
- services: ["pppoe", "dhcp"]
Type: List of strings
Required: Yes
Valid values: "pppoe", "dhcp"
Purpose: Specifies which subscriber types this profile supports.
idle_timeout
Timeout for idle interfaces in seconds (optional).
profiles:
- idle_timeout: 3600
Type: Integer
Required: No
Default: 3600
Constraints: Positive integer (seconds)
Purpose: Remove VLAN interface if no sessions and no traffic for this duration.
max_interfaces
Maximum number of dynamic VLAN interfaces (optional).
profiles:
- max_interfaces: 50000
Type: Integer
Required: No
Default: 50000
Constraints: Positive integer
Purpose: Hard limit to prevent resource exhaustion.
creation_rate_limit
Maximum interfaces created per second (optional).
profiles:
- creation_rate_limit: 100
Type: Integer
Required: No
Default: 100
Constraints: Positive integer
Purpose: Rate-limit interface creation to prevent DoS.
require_packets
Minimum matching packets before creating interface (optional).
profiles:
- require_packets: 2
Type: Integer
Required: No
Default: 1
Constraints: Positive integer
Purpose: Prevent spurious interface creation from single corrupt frames.
require_window
Time window for require_packets in seconds (optional).
profiles:
- require_window: 5
Type: Integer
Required: No
Default: 5
Constraints: Positive integer (seconds)
Purpose: Matching packets must arrive within this window.
Example Configurations
Single Profile (Residential)
demux:
enabled: true
profiles:
- name: "residential"
trunk_interface: "eth1"
outer_vlans: [111]
stag_range: "100-999"
ctag_range: "1-4094"
stag_protocol: "802.1ad"
services: ["pppoe", "dhcp"]
idle_timeout: 3600
max_interfaces: 50000
creation_rate_limit: 100
require_packets: 2
require_window: 5
Multiple Profiles
demux:
enabled: true
profiles:
- name: "residential"
trunk_interface: "eth1"
outer_vlans: [111]
stag_range: "100-999"
ctag_range: "1-4094"
services: ["pppoe", "dhcp"]
idle_timeout: 3600
max_interfaces: 50000
creation_rate_limit: 100
- name: "business"
trunk_interface: "eth1"
outer_vlans: [112]
stag_range: "1000-1999"
ctag_range: "1-4094"
services: ["pppoe"]
idle_timeout: 7200
max_interfaces: 10000
creation_rate_limit: 50
Configuration via CLI
Enable Demux
abng> configure
abng# set demux enabled true
abng# commit
Add Profile
abng# set demux profiles[0] name "residential"
abng# set demux profiles[0] trunk_interface "eth1"
abng# set demux profiles[0] outer_vlans [111]
abng# set demux profiles[0] stag_range "100-999"
abng# set demux profiles[0] ctag_range "1-4094"
abng# set demux profiles[0] services ["pppoe", "dhcp"]
abng# commit
Modify Profile
abng# set demux profiles[0] idle_timeout 7200
abng# set demux profiles[0] max_interfaces 100000
abng# commit
Verification
View Demux Configuration
abng> show configuration | match "^demux:"
demux:
enabled: true
profiles:
- name: residential
trunk_interface: eth1
outer_vlans: [111]
stag_range: 100-999
ctag_range: 1-4094
services: [pppoe, dhcp]
View Dynamic VLAN Interfaces
abng> show vlans
┌──────────────────────┬──────────┬──────────────┬──────────┐
│ Interface │ State │ Sessions │ Idle │
├──────────────────────┼──────────┼──────────────┼──────────┤
│ eth1.111.500.100 │ UP │ 1 │ 0s │
│ eth1.111.500.101 │ UP │ 1 │ 0s │
│ eth1.111.500.102 │ UP │ 0 │ 245s │
└──────────────────────┴──────────┴──────────────┴──────────┘
Check Demux Logs
sudo journalctl -u abng-demux -f
Validation Rules
| Field | Validation |
|---|---|
enabled | Boolean |
profiles[].name | 1-64 characters, alphanumeric and underscores |
profiles[].trunk_interface | Must exist on system |
profiles[].outer_vlans | List of VLAN IDs 1-4094 |
profiles[].stag_range | Format "start-end", VLAN IDs 1-4094 |
profiles[].ctag_range | Format "start-end", VLAN IDs 1-4094 |
profiles[].stag_protocol | One of: 802.1q, 802.1ad |
profiles[].services | List containing "pppoe" and/or "dhcp" |
profiles[].idle_timeout | Positive integer (seconds) |
profiles[].max_interfaces | Positive integer |
profiles[].creation_rate_limit | Positive integer |
profiles[].require_packets | Positive integer |
profiles[].require_window | Positive integer (seconds) |
Best Practices
- Outer VLANs — Use different outer VLANs for different subscriber types
- VLAN Ranges — Allocate sufficient ranges for expected subscriber count
- Idle Timeout — Balance between resource cleanup and session stability
- Rate Limiting — Adjust based on expected subscriber growth rate
- Multiple Profiles — Use for different subscriber classes (residential, business)
- Monitoring — Monitor VLAN interface count and cleanup frequency
Troubleshooting
No VLAN Interfaces Created
- Check demux is enabled:
show configuration | match demux - Check trunk interface is up:
ip link show eth1 - Check for matching packets:
tcpdump -i eth1 -e 'ether[12:2] == 0x8100' - Check demux logs:
journalctl -u abng-demux -f
VLAN Interfaces Not Cleaned Up
- Check idle timeout:
show configuration | match idle_timeout - Check for active sessions:
show subscribers - Check interface traffic:
ethtool -S eth1.111.500.100
Too Many VLAN Interfaces
- Check max_interfaces limit:
show configuration | match max_interfaces - Increase limit if needed:
set demux profiles[0] max_interfaces 100000 - Check for stale sessions:
show subscribers
Next Steps
- PPPoE Configuration — PPPoE server settings
- DHCP Configuration — DHCP/IPoE server settings
- Configuration Overview — All configuration sections