Skip to main content

Configuration Mode Commands

Complete reference for all commands in configuration mode (abng#).

set

Add or modify configuration values.

Syntax

set <path> <value>

Path Format

Configuration paths use dot notation or space-separated keys:

# Dot notation
set system.hostname "AthenaBNG-01"

# Space-separated
set system hostname "AthenaBNG-01"

# Array indices
set radius servers[0] host "10.255.0.10"
set radius servers[0] secret "my-secret"

# Nested arrays
set demux profiles[0] name "residential"
set demux profiles[0] outer_vlans [111, 112]

Examples

System Configuration

abng# set system hostname "AthenaBNG-01"
abng# set system router_id "10.255.0.1"
abng# set system timezone "Australia/Brisbane"
abng# set system log_level "debug"

Interface Configuration

abng# set interfaces management "eth0"
abng# set interfaces subscriber_trunk "eth1"
abng# set interfaces upstream "eth2"
abng# set interfaces cgnat_handoff "eth3"

PPPoE Configuration

abng# set pppoe enabled true
abng# set pppoe ac_name "AthenaBNG"
abng# set pppoe mtu 1492
abng# set pppoe mru 1492
abng# set pppoe lcp_echo_interval 30
abng# set pppoe lcp_echo_failure 3

DHCP Configuration

abng# set dhcp enabled true
abng# set dhcp lease_time 3600
abng# set dhcp allocation_mode "radius"
abng# set dhcp unnumbered true
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"]

RADIUS Configuration

abng# set radius servers[0] host "10.255.0.10"
abng# set radius servers[0] port 1812
abng# set radius servers[0] secret "my-secret"
abng# set radius nas_identifier "AthenaBNG"
abng# set radius nas_ip_address "10.255.0.1"
abng# set radius coa_enabled true
abng# set radius coa_port 3799

QoS Configuration

abng# set qos enabled true
abng# set qos default_down "100mbit"
abng# set qos default_up "40mbit"
abng# set qos default_overhead_profile "pppoe_ethernet"
abng# set qos overhead_profiles pppoe_ethernet overhead 34
abng# set qos overhead_profiles pppoe_ethernet mpu 64

VLAN Demux Configuration

abng# set demux enabled true
abng# set demux profiles[0] name "residential"
abng# set demux profiles[0] trunk_interface "eth1"
abng# set demux profiles[0] outer_vlans [111, 112]
abng# set demux profiles[0] stag_range "100-999"
abng# set demux profiles[0] ctag_range "1-4094"
abng# set demux profiles[0] stag_protocol "802.1ad"
abng# set demux profiles[0] services ["pppoe", "dhcp"]
abng# set demux profiles[0] idle_timeout 3600
abng# set demux profiles[0] max_interfaces 50000
abng# set demux profiles[0] creation_rate_limit 100

BGP Configuration

abng# set routing bgp enabled true
abng# set routing bgp asn 64512
abng# set routing bgp neighbors[0] address "10.255.0.254"
abng# set routing bgp neighbors[0] remote_as 64500
abng# set routing bgp announce_subscriber_routes true

CGNAT Configuration

abng# set cgnat enabled true
abng# set cgnat vrf_name "cgnat"
abng# set cgnat vrf_table 100
abng# set cgnat handoff_interface "eth3"
abng# set cgnat handoff_gateway "10.99.0.1"
abng# set cgnat source_range "100.64.0.0/10"
abng# set cgnat fwmark "0x64"

REST API Configuration

abng# set api enabled true
abng# set api listen "0.0.0.0"
abng# set api port 8443
abng# set api tls_cert "/opt/athena-bng/etc/cert.pem"
abng# set api tls_key "/opt/athena-bng/etc/key.pem"

delete

Remove configuration values.

Syntax

delete <path>

Examples

# Delete a single value
abng# delete pppoe ac_name

# Delete an entire section
abng# delete pppoe

# Delete array element
abng# delete radius servers[0]

# Delete nested value
abng# delete qos overhead_profiles pppoe_ethernet

show

Display the candidate configuration.

Syntax

show
show | compare

Variants

CommandDescription
showDisplay candidate configuration as YAML
show | compareShow diff between running and candidate

Output — Candidate Config

abng# show
system:
hostname: AthenaBNG-01
router_id: 10.255.0.1
timezone: Australia/Brisbane

interfaces:
management: eth0
subscriber_trunk: eth1
upstream: eth2

pppoe:
enabled: true
ac_name: AthenaBNG
mtu: 1492
...

Output — Diff View

abng# show | compare
+ system:
+ hostname: AthenaBNG-01
+ router_id: 10.255.0.1
+ pppoe:
+ enabled: true
+ ac_name: AthenaBNG
- pppoe:
- enabled: false

commit

Apply candidate configuration to running configuration.

Syntax

commit
commit confirmed <minutes>

Variants

CommandDescription
commitApply candidate to running config
commit confirmed <minutes>Apply with auto-rollback if not confirmed

Examples

Simple Commit

abng# set pppoe enabled true
abng# commit
Configuration committed successfully.

Commit with Auto-Rollback

abng# set pppoe enabled true
abng# commit confirmed 10
Configuration committed successfully.
Waiting for confirmation... (9:59 remaining)
abng# confirm
Configuration confirmed.

If not confirmed within 10 minutes, the configuration automatically rolls back:

Auto-rollback in 1 minute...
Rolling back to previous configuration.

Behavior

When you commit:

  1. Validation — Candidate config is validated against schema
  2. Rendering — Service configs are rendered from Jinja2 templates
  3. Archiving — Running config is archived with timestamp
  4. Replacement — Running config is atomically replaced
  5. Notification — Services are notified of changes
  6. Reload — Services reload their configuration

rollback

Revert to a previous archived configuration.

Syntax

rollback <n>

Where <n> is the number of revisions to go back (default: 1).

Examples

# Rollback to previous config
abng# rollback
Rolled back to revision 1.

# Rollback 5 revisions
abng# rollback 5
Rolled back to revision 5.

# View available rollback points
abng# show | compare

Rollback Points

Configurations are archived with timestamps:

/opt/athena-bng/etc/config-archive/
├── running-config-2024-03-13T10:30:00Z.yaml
├── running-config-2024-03-13T10:25:00Z.yaml
├── running-config-2024-03-13T10:20:00Z.yaml
└── ...

discard

Discard all candidate configuration changes.

Syntax

discard

Example

abng# set pppoe enabled true
abng# set pppoe ac_name "NewName"
abng# discard
Candidate configuration discarded.

abng# show
(shows running config, not the changes you made)

exit

Return to operational mode.

Syntax

exit

Example

abng# exit
abng>

Configuration Workflow

Typical Workflow

# 1. Enter configuration mode
abng> configure

# 2. Make changes
abng# set pppoe enabled true
abng# set pppoe ac_name "AthenaBNG"
abng# set pppoe mtu 1492

# 3. Review changes
abng# show | compare

# 4. Commit
abng# commit

# 5. Exit
abng# exit
abng>

Safe Workflow with Confirmation

# 1. Enter configuration mode
abng> configure

# 2. Make changes
abng# set demux enabled true
abng# set demux profiles[0] name "residential"

# 3. Review changes
abng# show | compare

# 4. Commit with auto-rollback
abng# commit confirmed 5

# 5. Test the changes
abng> show subscribers

# 6. Return to config mode and confirm
abng> configure
abng# confirm
Configuration confirmed.

# 7. Exit
abng# exit

Rollback Workflow

# 1. Something went wrong
abng> show subscribers
(no sessions appearing)

# 2. Enter configuration mode
abng> configure

# 3. Rollback to previous config
abng# rollback
Rolled back to revision 1.

# 4. Exit and verify
abng# exit
abng> show subscribers
(sessions reappear)

Configuration Validation

The CLI performs client-side validation before sending to abngd:

# Invalid IP address
abng# set system router_id "not-an-ip"
Validation error: invalid IP address: "not-an-ip"

# Invalid VLAN ID
abng# set demux profiles[0] outer_vlans [5000]
Validation error: VLAN ID must be 1-4094

# Missing required field
abng# commit
Validation error: system.router_id is required

Next Steps