Skip to main content

SNMP Configuration

Configure SNMP agent for network monitoring integration.

Overview

The snmp section configures the SNMP agent for:

  • Integration with NOC monitoring systems
  • Custom ATHENA-BNG-MIB for BNG-specific metrics
  • AgentX subagent registration with net-snmp
  • Session, QoS, CGNAT, and demux metrics

Configuration Options

enabled

Enable or disable SNMP agent (optional).

snmp:
enabled: true

Type: Boolean
Required: No
Default: false
Valid values: true, false

CLI:

abng# set snmp enabled true

community

SNMP community string (optional).

snmp:
community: "public"

Type: String
Required: No
Default: "public"
Constraints: Non-empty string

Purpose: Community string for SNMPv2c read access.

Security: Change from default in production.

CLI:

abng# set snmp community "my-community"

location

SNMP system location (optional).

snmp:
location: "Brisbane, Australia"

Type: String
Required: No
Default: Empty
Constraints: 1-255 characters

Purpose: System location for SNMP sysLocation OID.

CLI:

abng# set snmp location "Brisbane, Australia"

contact

SNMP system contact (optional).

snmp:
contact: "noc@example.com"

Type: String
Required: No
Default: Empty
Constraints: 1-255 characters

Purpose: System contact for SNMP sysContact OID.

CLI:

abng# set snmp contact "noc@example.com"

Example Configurations

Minimal SNMP Configuration

snmp:
enabled: true

Uses defaults:

  • Community: "public"
  • Location: Empty
  • Contact: Empty

Full SNMP Configuration

snmp:
enabled: true
community: "my-community"
location: "Brisbane, Australia"
contact: "noc@example.com"

Configuration via CLI

Enable SNMP

abng> configure
abng# set snmp enabled true
abng# commit

Set Community String

abng# set snmp community "my-community"
abng# commit

Set Location and Contact

abng# set snmp location "Brisbane, Australia"
abng# set snmp contact "noc@example.com"
abng# commit

Verification

View SNMP Configuration

abng> show configuration | match "^snmp:"
snmp:
enabled: true
community: my-community
location: Brisbane, Australia
contact: noc@example.com

Query SNMP Agent

snmpwalk -v2c -c my-community localhost 1.3.6.1.4.1.65245

Check SNMP Logs

sudo journalctl -u snmpd -f

ATHENA-BNG-MIB

Custom MIB under enterprise OID 1.3.6.1.4.1.65245 — 28 metrics across 6 groups.

System (.1)

OIDNameDescription
.1.1abngVersionSoftware version
.1.2abngUptimeSystem uptime (seconds)
.1.3abngHostnameSystem hostname
.1.4abngConfigCommitsConfig commits since start

Subscribers (.2)

OIDNameDescription
.2.1abngSessionsActiveTotal active sessions
.2.2abngSessionsPppoePPPoE sessions
.2.3abngSessionsDhcpDHCP sessions
.2.4abngSessionsAuthenticatingSessions awaiting RADIUS
.2.5abngSessionsTerminatedCumulative terminated
.2.6abngTotalBytesInAggregate bytes in
.2.7abngTotalBytesOutAggregate bytes out
.2.8abngTotalPacketsInAggregate packets in
.2.9abngTotalPacketsOutAggregate packets out
.2.10abngProvisionedBandwidthDownSum downstream rates (bps)
.2.11abngProvisionedBandwidthUpSum upstream rates (bps)

QoS (.3)

OIDNameDescription
.3.1abngQosSessionsActiveSessions with CAKE applied
.3.2abngQosIfbDevicesActive IFB devices
.3.3abngQosPendingSessionsSessions without QoS

CGNAT (.4)

OIDNameDescription
.4.1abngCgnatSessionsActiveCGNAT sessions (100.64.0.0/10)
.4.2abngCgnatPublicSessionsPublic IPv4 sessions

Demux (.5)

OIDNameDescription
.5.1abngDemuxDynamicVlansDynamic VLAN interfaces
.5.2abngDemuxUniqueAccessInterfacesUnique access interfaces with sessions

Services (.6) — Health Checks

TruthValue: 1 = up, 2 = down.

OIDNameDescription
.6.1abngServiceAbngdabngd orchestrator
.6.2abngServiceDemuxabng-demux daemon
.6.3abngServiceAccelPppaccel-ppp (TCP 2001)
.6.4abngServiceQosabng-qos daemon
.6.5abngServiceDhcpdabng-dhcpd daemon
.6.6abngServiceApiREST API (TCP 8443)

See MIB Reference for full details.

Example SNMP Queries

Get System Information

snmpget -v2c -c my-community localhost \
1.3.6.1.4.1.65245.1.1.0 \
1.3.6.1.4.1.65245.1.2.0 \
1.3.6.1.4.1.65245.1.3.0

Get Session Counts

snmpget -v2c -c my-community localhost \
1.3.6.1.4.1.65245.2.1.0 \
1.3.6.1.4.1.65245.2.2.0 \
1.3.6.1.4.1.65245.2.3.0

Check Service Health

snmpwalk -v2c -c my-community localhost 1.3.6.1.4.1.65245.6

Walk All Metrics

snmpwalk -v2c -c my-community localhost 1.3.6.1.4.1.65245

Integration with Monitoring Systems

Nagios/Icinga

# Alert on session count
check_snmp -H localhost -C my-community -o 1.3.6.1.4.1.65245.2.1.0 -w 4000 -c 5000

# Alert when abngd is down
check_snmp -H localhost -C my-community -o 1.3.6.1.4.1.65245.6.1.0 -c 1:1

Zabbix

Add SNMP items:

  • Sessions: OID 1.3.6.1.4.1.65245.2.1.0
  • Traffic In: OID 1.3.6.1.4.1.65245.2.6.0
  • Service Health: OID 1.3.6.1.4.1.65245.6.1.0

Prometheus

Use SNMP exporter to convert SNMP to Prometheus metrics:

# snmp_exporter config
athenabng:
version: 2
max_repetitions: 25
timeout: 10s
retries: 3
auth:
community: my-community

Validation Rules

FieldValidation
enabledBoolean
communityNon-empty string
location1-255 characters
contact1-255 characters

Best Practices

  1. Community String — Change from default "public" in production
  2. Firewall — Restrict SNMP access to trusted networks
  3. Monitoring — Monitor session count and QoS coverage
  4. Alerts — Set thresholds for session count and resource usage
  5. Documentation — Document custom MIB OIDs
  6. Security — Use SNMPv3 if available (requires net-snmp upgrade)

Troubleshooting

SNMP Agent Not Responding

  1. Check SNMP is enabled: show configuration | match snmp
  2. Check service is running: sudo systemctl status snmpd
  3. Check port is listening: sudo netstat -tlnp | grep 161
  4. Check firewall allows UDP 161
  5. Check SNMP logs: journalctl -u snmpd -f

MIB Not Found

Error: Unknown Object Identifier (1.3.6.1.4.1.65245)

Solution: Install ATHENA-BNG-MIB:

cp /opt/athena-bng/snmp/ATHENA-BNG-MIB.txt /usr/share/snmp/mibs/

Community String Rejected

Error: Timeout: No Response from localhost

Solution: Check community string matches configuration:

snmpget -v2c -c my-community localhost 1.3.6.1.2.1.1.1.0

Next Steps