Interfaces and naming
Live configs live in /usr/local/etc/bng/. A name is bound to a NIC by MAC, because DPDK port ids reorder when NICs are added or removed and a MAC does not.
Naming by MAC
Pin the names for a stable box. Every start prints a port inventory and auto-names unpinned ports nic<last-3-octets>, so naming is not strictly required to boot — but a pinned name survives hardware changes.
ini
# /usr/local/etc/bng/interfaces.conf interface wan0 mac 02:00:00:00:00:01 # core/internet uplink interface access0 mac 02:00:00:00:00:02 # subscriber side # optional VLAN sub-interfaces on a parent: # interface vlan100 parent access0 vlan 100 # interface vlan10 parent access0 svlan 100 vlan 10
WAN address and default route
Egress is derived from the connected subnet, so there is no separate WAN or LAN concept in routing — the default gateway is simply the 0.0.0.0/0 route.
ini
# ip.conf ip wan0 203.0.113.6/30 # routing.conf — next-hop only route default 203.0.113.5
VLAN, QinQ and trunks
Sub-interfaces are created under the physical port that owns them. VLAN edits apply live on commit; a trunk is built on the next restart, because a bond must exist before its ports are queued.
cli
interface access0 add vlan v100 100 # single-tag 802.1Q interface access0 add vlan v10 100 10 # QinQ S/C-VLAN interface add trunk bond0 mode 8023ad interface ether1 add trunk bond0 interface ether2 add trunk bond0 commit ; save # then RESTART to build the bond