Page MenuHomeVyOS Platform

VPP: NAT44 does not translate traffic of PPPoE server sessions (pppoe_sessionN is not an inside interface)
Blocked, HighPublicBUG

Description

Summary
▎ With the PPPoE server on a VPP interface and NAT44 configured with that interface as inside, no subscriber traffic is translated. Subscribers get an IP and can reach the BNG, but have no internet. show nat44 sessions stays empty.
▎
▎ Version
▎ 2026.10.16-0024-rolling (VPP 25.10.0-58~vyos). The same happens on 1.5.0 (VPP 25.10.0-48).
▎
▎ Config (relevant part)
▎ set vpp settings interface eth0
▎ set vpp settings interface eth2
▎ set vpp nat nat44 interface inside 'eth0'
▎ set vpp nat nat44 interface outside 'eth2'
▎ set vpp nat nat44 address-pool translation interface 'eth2'
▎ set service pppoe-server interface eth0
▎ set service pppoe-server gateway-address '100.127.0.0'
▎ set service pppoe-server client-ip-pool Con-Pool range '100.64.0.0/21'
▎ set service pppoe-server authentication mode 'radius'
▎
▎ Steps to reproduce
▎ 1. Configure as above, connect a PPPoE client (MikroTik CPE in my lab).
▎ 2. From the client: ping 1.1.1.1 -> no reply.
▎ 3. sudo vppctl show nat44 interfaces -> eth0 in, eth2 out.
▎ 4. sudo vppctl show nat44 sessions -> no sessions. show errors counts nat44-ed-out2in-slowpath: no translation.
▎
▎ Why (as far as I can tell)
▎ Subscriber packets arrive on eth0 PPPoE-encapsulated. After pppoe-input decapsulation they continue with the RX sw_if_index of the session interface (pppoe_sessionN), not eth0. The NAT44 in2out feature is enabled only on eth0, so it never sees these packets. Each session interface is created dynamically by accel-ppp, so it cannot be listed as inside in the config.
▎
▎ Workaround (works, but not persistent)
▎ sudo vppctl set interface nat44 out eth2 del
▎ sudo vppctl set interface nat44 out eth2 output-feature
▎ With this, subscribers have internet (tested up to 2,000 sessions, ~1.3 Gbit/s). The setting is lost on every VPP restart and on every vpp commit, so I re-apply it from a commit post-hook and the boot script (script attached).
▎
▎ I know output-feature was removed in T7264 because it translates everything that leaves the outside interface. For a BNG that is usually what you want (all subscribers behind CGNAT), but not when some subscribers have public IPs. So I am not asking to bring it back unconditionally.
▎
▎ Expected
▎ A supported way to NAT PPPoE subscribers, for example one of:
▎ 1. When the PPPoE server interface is a NAT44 inside interface, mark every pppoe_sessionN as inside when the session is created (and remove it before the session is deleted).
▎ 2. An opt-in option, e.g. set vpp nat nat44 interface outside eth2 output-feature, documented with the T7264 trade-off.
▎ 3. Possibility to exclude source prefixes (public subscriber ranges) from translation when output-feature is used.
▎
▎ Related observation
▎ With the output-feature workaround, I saw one VPP worker crash on PPPoE session deletion (CoA + Disconnect of one user, traffic running): SIGSEGV fib_path_list_get_resolving_interface <- nat_pre_in2out_output <- nat44_ed_in2out_slowpath. I don't have a clean reproduction yet and will open a separate task if I get one.

Details

Version
2026.10.16-0024-rolling (VPP 25.10.0-58~vyos). The same happens on 1.5.0 (VPP 25.10.0-48).
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

saadinnocent909 changed the task status from Open to Blocked.
saadinnocent909 triaged this task as High priority.
saadinnocent909 created this object in space S1 VyOS Public.
Viacheslav changed the subtype of this task from "Task" to "Bug".Oct 22 2026, 4:08 PM
This comment was removed by rherold.

@saadinnocent909 if NAT44 together with PPPoE crashes again on a build with the current fixes, this is what I need, in this order:

  1. The crash message in the journal. VPP logs the signal when it crashes, and your earlier report of SIGSEGV in policer_input_node_fn_hsw came from there. journalctl -u vpp -b -o short-precise --no-pager | grep -iE "signal|sigsegv|sigbus|backtrace" -A 30. For accel-pppd: journalctl -u accel-ppp@pppoe -b -o short-precise --no-pager | grep -iE "abrt|segv|abort".
  2. A backtrace from the core file. On a current rolling image the cores go to /var/core (named core-<program>-<pid>-<time>), and the core size limit is already unlimited for vpp and accel-ppp@pppoe (I checked with systemctl show <service> -p LimitCORE). Look at ls -lh /var/core and df -h /var/core first, a VPP core can be large. Then, as root: gdb -batch -ex "bt 30" -ex "thread apply all bt 8" /usr/bin/vpp /var/core/<core file> > /tmp/vpp-backtrace.txt. For accel-pppd use /usr/sbin/accel-pppd as the program. Please post the text and not the core itself, a core holds the memory of the process, including subscriber data.
  3. The versions: show version and sudo vppctl show version.
  4. The relevant configuration without secrets: show configuration commands | match "vpp|nat|pppoe-server", and whether the NAT44 output-feature workaround is set.
  5. What happened right before the crash: how many sessions were up, whether sessions were being created or ended, and whether there was traffic. sudo vppctl show nat44 summary and sudo vppctl show nat44 interfaces before the test show the NAT state.

I have not analysed this crash yet. With a backtrace of a build that has the fix from accel-ppp-ng #44, I can tell whether it is the same problem as in T9502 or a different one in the NAT44 output feature.

Reproduced here, and some data on the output-feature workaround, including the crash scenario from the description.

Setup: VyOS rolling arm64 (2026.11, VPP 25.10 with the VyOS patches; the NICs are Marvell OCTEON 10 ports driven by the VPP dev_octeon plugin in a local build, the NAT path is the same as with DPDK), accel-ppp-ng current with PR #42 (which includes #44), FreeRADIUS, BNG Blaster with NAT-aware streams (upstream first, downstream to the translated address and port), 100 pps per session each way.

As configured today (nat44 interface inside eth12, outside eth13, address pool on the eth13 subnet), 100 PPPoE sessions: show nat44 sessions stays empty, the upstream leaves eth13 untranslated, and the downstream is dropped by nat44-ed-out2in-slowpath with no translation (433,848 packets in 45 s, the same number as the drops of eth13). So this matches the description: the in2out feature on eth12 never sees the packets, because after pppoe-input they come in on the pppoe_sessionN interface.

With the workaround (set interface nat44 out eth13 output-feature instead of the inside/outside pair): 100 sessions, 200/200 flows both ways, no loss, no drops on eth13, NAT sessions as expected (i2o 100.64.4.75:10000 -> 10.0.0.102:10000).

Crash scenario from the description: three cycles of 1,000 sessions with NAT traffic and reconnect, 50 Disconnects and 50 CoA rate changes under traffic in each cycle, then all 1,000 sessions ending at the same time under traffic. 2,000/2,000 flows in every cycle, the same VPP process all the time (no SIGSEGV/SIGBUS in the journal, nothing in /var/core). So I could not reproduce the nat_pre_in2out_output crash with PR #42/#44 in place. One thing to know: the NAT sessions of a PPPoE session that ended stay until their timeout (about 1,000 left after each cycle), as NAT44-ED keys them by inside address, not by interface; an address reassigned to another subscriber within the timeout reuses them.

Proposal: I would like to send a vyos-1x PR that makes output-feature an explicit opt-in on an outside interface, documented with the T7264 trade-off (everything leaving that interface is translated, so it fits a BNG doing full CGNAT). Since nat44 interface outside is a multi leaf today, there are three ways to spell it, and I would follow whichever you prefer:

  1. set vpp nat nat44 interface outside eth2 output-feature: outside becomes a tag node, with a migration script for existing configs.
  2. set vpp nat nat44 interface outside-output-feature eth2: a second multi leaf, no migration.
  3. set vpp nat nat44 output-feature: all outside interfaces use output-feature.

Excluding public subscriber prefixes (option 3 of the description) would be a separate step; I can look at it after this one if wanted. Which spelling would you accept?

@najieb_haswell thanks, that is a thorough reproduction and it answers my open question: with PR #42 (which includes #44) the nat_pre_in2out_output crash is gone in your three cycles, so the earlier crash was most likely the accel-pppd/policer problem of T9502 and not the NAT44 output feature.

I am a contributor, not a maintainer, so the spelling is not mine to accept. My opinion, in this order:

  1. set vpp nat nat44 interface outside eth2 output-feature, with a migration. It is the cleanest model: the choice is made per outside interface, which matters as soon as there is more than one, and the T7264 trade-off sits at the one interface it applies to. If the maintainers do not want a migration for this, take 3.
  2. set vpp nat nat44 output-feature is the smallest change and needs no migration, but it is all or nothing for the outside interfaces.
  3. I would not add outside-output-feature: the same interface would be in two lists and the two would have to exclude each other.

Whichever you pick, the help text and the documentation should say that everything leaving that interface is translated, as you wrote, and that subscribers with public addresses cannot be excluded yet.

There is also a way that avoids that trade-off. The root cause is that pppoe_sessionN is not an inside interface. If accel-ppp marked a session interface as inside when it is created (when the PPPoE server interface is a NAT44 inside interface) and removed it before the interface is deleted, the normal inside/outside pair would work and public subscribers would stay untranslated. That is a change in the accel-ppp VPP hook and not in vyos-1x, and it needs the NAT44 API calls and the list of inside interfaces in the hook. I have not tried it. I can test it in my lab (one PPPoE client, VPP 25.10) if you think it is worth having next to the opt-in, since the two do not exclude each other: the opt-in is the quick step for a BNG that does full CGNAT, the automatic inside marking would be the proper fix.

On the NAT sessions that stay after the PPPoE session ended: agreed that this is expected with NAT44-ED, and it should be mentioned in the documentation of the option, with the reassigned address as the case to know about.

@rherold I tried the accel-ppp side you described, on the two machines I have, and it works.

What it does. In the vyos_vpp session hook, right after pppoe_sessionN is created: if the PPPoE server interface (looked up by name, or its parent for a VLAN) is a NAT44 inside interface, the session interface is made inside too (nat44_interface_add_del_feature, NAT_IS_INSIDE). The mark is removed in the terminate hook, after the final counter sample and before the interface is deleted. Whether a server interface is inside is cached for 10 s, so the NAT44 interface list is not dumped on every login, and a NAT44 change applies to sessions that start after that. There is no vyos-1x change: the existing set vpp nat nat44 interface inside eth0 / outside eth2 pair is all it needs.

Results. accel-ppp-ng with PR #42 plus this change, nat44 interface inside on the PPPoE interface and outside on the uplink from the VyOS CLI, address pool on the uplink subnet, BNG Blaster with NAT-aware streams at 100 pps each way per session. Same tests on VyOS rolling arm64 (Marvell OCTEON 10, VPP dev_octeon plugin) and VyOS rolling 2026.11.16 x86 (E810, its VPP 25.10.0-63 package):

arm64x86
100 sessions without the change100/200 flows (the upstream arrives untranslated, the downstream to the NAT address is dropped)100/200 flows
100 sessions with the change200/200 flows, 100 session interfaces inside, 0 left after the sessions endedthe same
1,000 sessions2,000/2,000 flows, 1,000 inside, 0 leftthe same
10 rounds of 200 hard terminations with reconnect, 1,000 sessionsinside list equal to the live sessions after every round, 0 left at the end, no VPP restart, no warningthe same
making a session interface inside or not (API call)about 0.6 msabout 0.4 ms

One thing found on the way. I first took the server interface from pppoe_session_dump, and that does not work: send_pppoe_session_details() in src/plugins/pppoe/pppoe_api.c sets _vl_msg_id without pem->msg_id_base (master, stable/2510 and stable/2602). The Python API gets no reply at all, and in VAPI the reply still reached the callback (apparently matched by its context) but was not byte-swapped as a pppoe_session_details: encap_if_index came out as 0x01000000 instead of 1. Hence the lookup by name. The fix in VPP is one line.

What it does not do. All sessions of an inside server interface become inside, so subscribers with public addresses on the same PPPoE interface are translated as well. Leaving them out would need a decision per session (for example from a RADIUS attribute), which this change does not have. The NAT sessions of an ended PPPoE session stay until their timeout, as with output-feature.

What I have not measured. Every marked session adds an entry to the NAT44 interface list, and the check of the server interface dumps that list (once per 10 s per server interface): about 110 ms (arm64) and 180 ms (x86) with 1,000 entries through the Python API, growing with the number of sessions. I have not run it with 64k sessions yet. If that turns out too slow, vyos-1x could tell accel-ppp explicitly that a PPPoE interface is NAT44 inside (an option on the interface= line of the generated config) instead of accel-ppp finding out.

Which way would the maintainers prefer: the automatic detection as above, or an explicit option written by vyos-1x? The output-feature opt-in from my previous comment would still be the quick step for a BNG that does full CGNAT.