Skip to content

Configuration examples

Copy-pasteable sequences for the six most common jobs, each ending in commit — and save where the change should survive a reboot. Run them from system-view. Addresses are documentation ranges; substitute your own.

A PPPoE service

PPPoE on two access interfaces with CHAP preferred, dead-peer keepalives, IPv6 enabled and a RADIUS-less IPv6 fallback pool.

cli
system-view
ppp interface add access0 access1
ppp mru 1492
ppp auth-protocol chap,pap
ppp lcp-echo interval 30 failure 3
ppp ipv6 enable
ppp ipv6 pool default
commit
save

An IPoE service

IPoE/DHCP with MAC-based RADIUS identity on one access interface, a fallback pool and subscriber DNS.

cli
system-view
dhcp mode ipoe
dhcp interface add access2
dhcp auth mac
dhcp auth-password <mac-auth-password>
dhcp mac-format colon
dhcp lease-time 3600
dhcp pool default
quit
ip dns 203.0.113.53 198.51.100.53
commit
save

A framed-IP pool

Define a pool and its gateway, then commit. A new pool is allocatable immediately on commit; only reshaping an in-use pool waits for a restart.

cli
system-view
pool default range 100.64.10.10 100.64.10.250 gateway 100.64.10.1 prefix 24
quit
commit
save

CGNAT

Enable CGNAT with a deterministic public pool, a policy that translates the private range, and the default fragment-cache mode. The public pool loads on the next restart; the policy rule can reference it once it is live.

cli
system-view
nat enable
nat conntrack-max 2097152
nat udp-mapping endpoint-independent
nat pool add pub1 203.0.113.10-203.0.113.20 ports 1024-65535 block 512 deterministic
nat policy add nat-rule 100.64.0.0/10 pool pub1
cgnat fragments mode cache
commit
save

A QoS plan

A queue profile, a 100M residential subscriber profile, and an assignment binding it to a pool prefix. References resolve against the running config, so commit the profiles before the assignment.

cli
system-view
qos queue-profile add res-fq fq_codel qsize 4096 target 5ms interval 100ms ecn on
qos subscriber-profile add res-100 rate-down 100M rate-up 100M queue-profile res-fq
commit
qos assign add 100.64.10.0/24 subscriber-profile res-100
commit
save

A firewall rule

Enable the stateful firewall with uRPF anti-spoof, permit established traffic, and drop new inbound Telnet. Everything applies live on commit.

cli
system-view
firewall enable
firewall urpf strict
firewall filter add accept state established
firewall filter add drop proto tcp dport 23 state new
commit
save