Skip to content

Interfaces and naming

VLAN and QinQ sub-interfaces and trunks are created under the physical port they belong to — the port you run add on is the parent for a VLAN, or the member for a trunk. That mirrors MikroTik, Huawei and Cisco: you add sub-objects to an interface. Local IP addresses are a separate top-level command set.

Naming by MAC

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. Every start prints a port inventory and auto-names unpinned ports, 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

VLAN and QinQ sub-interfaces

Sub-interfaces are created under the physical port that owns them. A single tag is 802.1Q; two tags are QinQ 802.1ad, with the outer S-VLAN first and the inner C-VLAN second. VLAN edits stage into the candidate and apply live on commit.

cli
interface <port> add vlan <name> <svlan>           # single-tag 802.1Q
interface <port> add vlan <name> <svlan> <cvlan>   # QinQ 802.1ad
interface <port> del vlan <name>

interface access0 add vlan v100 100
interface access0 add vlan v10 100 10
commit ; save

Port attributes

Description, MTU and admin state. shutdown and no shutdown apply live. identify blinks the port LED for a set duration, which is how you find the right cage in a rack without counting from the end.

cli
interface <port> description <text>
interface <port> mtu <68..9600>
interface <port> shutdown | no shutdown       # admin down / up, live
interface identify <name> duration <s>        # blink the LED
interface identify stop <name>

Local IP addressing

An interface may carry multiple addresses — one primary plus secondaries. The first non-secondary address on an interface is its primary: the source for self-originated traffic and the box's WAN ARP and ICMP identity. Removing the primary promotes the next remaining address on that interface. These are L3 host addresses, not routed subnets, and they apply live on commit with no restart.

cli
ip address add <if> <ip/prefix>
ip address add <if> <ip/prefix> secondary
ip address remove <if> <ip/prefix>

ip address add wan0 203.0.113.6/30
commit ; save
show ip address [<if>]        # role: primary / secondary
show ipv6 address [<if>]

The show interface family

Five views. show interface vlan stats reports each sub-interface's dedicated counters — the fast path attributes a subscriber's packets to the VLAN they arrived on, so that is real per-VLAN traffic rather than a share of the parent port. Link, speed and MTU are the parent physical port's, since a VLAN shares the wire.

cli
show interface                # physical DPDK ports only
show interfaces               # everything in one table:
                              #   name type pci parent vlan mac port state speed desc
show interface <name>         # full detail page for one port
show interface stats          # live per-port NIC counters
show vlan                     # also: show interface vlan
show vlan stats               # per-VLAN rx/tx, its OWN traffic
show interface bonding

Reading the RSS rows

The per-port detail page reports three RSS rows that explain how upstream traffic is distributed across workers. RSS Supported is the hash types the NIC advertises; RSS Active is what is actually programmed on the port; PPPoE RSS is whether the inner-IP-over-PPPoE rte_flow rule is installed. This matters because plain RSS cannot see inside PPPoE ethertype 0x8864 — without inner-IP steering every upstream PPPoE packet lands on one queue and therefore one worker. Rule installed is not a promise of spreading: the Intel 82599 and X520 accept the rule but do not steer on it, because the silicon cannot parse past the PPPoE header, so upstream stays on worker 0. Confirm the real spread with show health under load.

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