>_nexthopreachable

Building an ISP Access Lab with PPPoE, DPI, and TR-069

Ali Bahadır Coşkun7 min read

The other day I saw a post about ISP technologies and in the post it was talking about stuff like DPI, ACS, TR-069, PPPoE, BNG, and CPE. I had a rough idea of what some of them were, but not a real understanding of what they all meant, so I built a lab.

This post walks through that lab: the topology, how to bring it up, and what you can actually observe once it is running.

The Topology

The lab has six main node types. Here is what each one does:

  • Upstream is fake internet. It runs FRR with BGP in AS 65000 and advertises a single loopback, 8.8.8.8/32. When a subscriber pings 8.8.8.8, they are not reaching Google, they are reaching this node.
  • Core is the ISP edge router, in AS 65001. It speaks eBGP toward upstream and OSPF toward the BNG. Its job is to learn routes from the BNG side and give the BNG a default route toward the internet.
  • BNG (Broadband Network Gateway) is the most important node. This is where subscriber sessions terminate. It runs accel-ppp for PPPoE and FRR for OSPF toward the core. If a subscriber is trying to get online, this is the box that makes it happen.
  • DPI sits inline between the BNG and the CPEs. It is a Linux bridge. Traffic passes through it, and ntopng watches flows using nDPI for protocol classification.
  • CPE-1 and CPE-2 are customer routers. They are Alpine Linux containers with a small Python CWMP client inside. On boot, they discover the BNG over PPPoE, establish a PPP session, get an address, set up NAT for their LAN side, and start calling home to the ACS.
  • Sub-1 and Sub-2 are fake subscriber devices behind each CPE. They generate traffic like DNS lookups, HTTP, TLS, pings, and iperf3 tests.
  • GenieACS is the Auto Configuration Server. It handles TR-069 (CWMP), which service providers use for remote CPE management.
  • MongoDB backs GenieACS, storing device state, tasks, and provisioning data.

Bringing the Lab Up

From the topology directory:

bash
cd /opt/containerlab/labs/isp-dpi-acs/topologyclab deploy -t isp-dpi-acs.clab.yml

Most containers come up quickly except the BNG. On first boot it builds accel-ppp from source, which can take around ten minutes.

Once everything is running, verify:

bash
docker ps

All lab containers should show as Up.

For the BNG specifically, confirm accel-pppd started correctly and the PPPoE module is loaded:

bash
docker logs clab-isp-dpi-acs-bng --tail 30

Once confirmed, the CPEs can discover the BNG, bring up their PPPoE sessions, and start sending traffic.

PPPoE and the BNG: The Subscriber Comes Online

PPPoE (Point-to-Point Protocol over Ethernet) lets an ISP create a subscriber session over an Ethernet network. The CPE sends discovery frames looking for an Access Concentrator, the BNG responds, they negotiate PPP, and the subscriber gets an IP address and default route.

In a real ISP network, the BNG handles subscriber-facing control like authentication, address assignment, policy, accounting, and forwarding traffic toward the core. In this lab, accel-ppp provides the PPPoE server role.

To check BNG state:

bash
ssh admin@172.31.255.3show-bng

The output has three useful sections:

  • Active subscriber sessions: both CPEs should appear.

  • OSPF neighbor state: confirms data-plane reachability to the rest of the lab.

  • Policy routing table: subscriber pool traffic should match a rule that forwards via table 200 toward the core.

From the CPE side:

bash
docker exec clab-isp-dpi-acs-cpe-1 ip addr show ppp0docker exec clab-isp-dpi-acs-cpe-1 ip route

The ppp0 interface should have a 100.64.0.x address. The default route should point to 100.64.0.1, the BNG side of the PPP session.

To verify end-to-end connectivity:

bash
docker exec clab-isp-dpi-acs-sub-1 ping -c 4 8.8.8.8

That ping goes from sub-1, through the CPE (where it is NATed), into the PPP session, across the DPI bridge, to the BNG, through OSPF to the core, and then via BGP to upstream.

DPI: What the ISP Can See

DPI (Deep Packet Inspection) serves a few different purposes in provider networks:

  • Visibility: understanding what traffic crosses the network and where bandwidth is going.
  • Policy: applying different treatment to traffic classes and feeding shaping systems.
  • Security and operations: spotting suspicious flows, DDoS patterns, and malware activity.

This lab uses ntopng with nDPI. nDPI classifies protocols from packet structure, ports, DNS names, TLS SNI (when visible), flow behavior, and other cleartext metadata.

Encrypted traffic can still be classified from metadata, but nDPI is not decrypting payload content.

The ntopng Flows view at http://localhost:20031 shows active connections, classifications, bytes transferred, and flow duration. In a running lab, you should see:

  • DNS flows from sub-1 and sub-2 doing lookups.
  • HTTP/TLS flows toward 8.8.8.8 on ports 80 and 443.
  • CWMP flows (TCP/7547) between CPEs and GenieACS.

ACS: Remote CPE Management with TR-069

TR-069 (CWMP) is how providers manage customer routers and modems remotely. The model is CPE-initiated: the device calls home on boot and periodically after that. The ACS reads device information and can push tasks back in-session.

ACS platforms are usually used for:

  • Zero-touch provisioning: onboarding new CPEs automatically with baseline WAN/LAN and voice settings.
  • Fleet-wide configuration control: pushing SSID, Wi-Fi, DNS, and service changes to large device populations.
  • Software and firmware lifecycle: scheduling supgrades, tracking versions, and rolling back when issues appear.
  • Operational troubleshooting: collecting diagnostics such as stats, line parameters, and logs without a truck roll.
  • Customer support automation: triggering remote reboot, resync actions directly from OSS/BSS workflows.

Common operations include GetParameterValues, SetParameterValues, Download, and Reboot. Since CPEs are often behind NAT, the model relies on the CPE reaching out. The ACS can also trigger immediate contact using a Connection Request.

GenieACS UI is available at http://localhost:20030. With the lab up, both CPEs should appear in the Devices list after their first Inform.

To push a parameter change through the API:

bash
curl -s -X POST \  "http://localhost:20057/devices/AC1AB2-ContainerCPE-CLAB%252DCPE%252D1/tasks?connection_request" \  -H "Content-Type: application/json" \  -d '{"name":"setParameterValues","parameterValues":[["Device.LANDevice.1.WLANConfiguration.1.SSID","DemoSSID","xsd:string"]]}' \  | python3 -m json.tool

This sends a SetParameterValues task for Device.LANDevice.1.WLANConfiguration.1.SSID and sets it to DemoSSID. The connection_request flag tells GenieACS to wake the CPE immediately.

To confirm the CPE applied it:

bash
docker exec clab-isp-dpi-acs-cpe-1 tail -30 /var/log/cwmp-client.log

The log should show the SetParameterValues RPC and the new SSID being applied. GenieACS should mark the task as completed.

Putting It Together

So in summary: a subscriber comes online behind the CPE. The CPE establishes PPPoE to the BNG and gets an address from the subscriber pool. Traffic crosses the DPI bridge where ntopng classifies flows. The BNG routes toward the core, and the core sends traffic upstream.

At the same time, the CPE calls home to GenieACS over CWMP, and GenieACS can push changes back to the device.

Subscriber access, routing, traffic visibility, and remote device management, all in one topology. This lab is a great way to see how these pieces fit together in a provider network, and to get hands-on experience with the technologies involved.

GitHub repo: building-an-isp-access-network