Skip to content

CLI and transactions

A two-view command line launched with bng-cli. You start in an operational user view for show, ping and traceroute, and enter system-view to configure. Edits stage into a candidate and apply atomically on commit, with rollback, save and load completing the transaction model.

Views

The prompt always says where you are: angle brackets for user view, square brackets for system-view. Related configuration is grouped into keyword views (nat, firewall, radius, ppp, dhcp, routing) and object views keyed by name (interface, pool). Every command can also be typed in full from the config root, and any unambiguous keyword prefix is accepted.

cli
<Netvyn-BNG> system-view
[Netvyn-BNG] nat
[Netvyn-BNG-nat] enable      # same as: nat enable
[Netvyn-BNG-nat] quit
[Netvyn-BNG] return

Transaction verbs

commit validates the candidate and applies it to running; save writes running to startup so it survives a reboot; rollback discards the candidate; load reads startup back into the candidate. A committed-but-unsaved change is live but lost on reboot, and the CLI prompts about both halves on exit.

cli
show pending      # uncommitted candidate changes
show running      # applied configuration
show candidate    # running with the candidate overlay

commit confirmed 10
confirm           # keep it; doing nothing auto-reverts

commit confirmed

This is the safety net for risky changes. If a change cuts off your own management access, doing nothing restores the previous running configuration when the timer expires; if the change is good, confirm makes it permanent. Use it for routing, default-gateway and firewall-enable changes as a matter of habit.

Apply timing

Most configuration takes effect at commit, and many high-value knobs apply live without dropping sessions: NAT policy, firewall enable and uRPF, pool add and remove, addresses, ppp and dhcp interface lists, QoS profiles and assignments, ARP tuning and routes. A smaller set takes effect on restart: firewall filter rules, mss-clamp, radius settings, nat pool and ipv6 pool. A nat policy rule cannot reference a nat pool until that pool is live.