1
0
mirror of https://github.com/xdp-project/BNG-router.git synced 2024-05-06 15:54:53 +00:00
Yoel Caspersen a9003fa266 Reformatting option 82 circuit ID to include interface name (including
VLAN tags) in ASCII format.

Because VLAN tags are converted to ASCII with use of modulo,
interface name is generated from right to left, starting with inner
VLAN and prepended with dash characters to ensure a final length of
IF_NAMESIZE bytes (16), e.g.:

----ens6f0.83.20

We avoid null bytes in circuit ID to ensure compatibility with DHCP
servers that interpret null as string terminator.
2021-10-18 09:20:16 +02:00
2021-08-25 12:16:06 +02:00
2021-10-11 17:05:13 +02:00
2021-10-10 16:15:39 +02:00

BNG - Linux router project

This git-repo (goal is to) contain tools and designs for a Broadband Network Gateway (BNG) router based on Linux.

We assume a setup like this:

                      +--------------------------+
                      |           BNG            |
                      |                          |
                      |                          |
               <------+eth1                eth0  +-----> Upstream internet
                      |                          |
Customer       <------+eth2                      |
interfaces            |                          |
                      |...                       |
                      |                          |
               <------+ethX                      |
                      |                          |
                      +--------------------------+

Where the BNG box is a middlebox between one or more customer-facing interfaces, and an upstream connection. The customer interfaces use double-tagged VLANs where the outer VLAN tag determines the Point of Presence that the customer is connected to, and the inner VLAN tag is unique per customer.

This setup should be transparent to the customer equipment, which means the BNG needs to add and remove VLAN tags for the traffic as needed, and do NAT'ing for IPv4 traffic. From the customer PoV it should appear like they are on their own layer-2 segment with the BNG being the only other host. It also needs to relay DHCP traffic to an upstream central DHCP server.

Necessary features:

  • DHCP relay for v4 and v6
  • Route customer traffic (IPv4 and IPv6)

Nice to have:

  • NAT'ing of traffic (for IPv4 RFC6598 clients)
  • Traffic shaping

The idea is to use regular Linux stack functionality as much as possible (e.g., VLAN interfaces), but accelerate functions with XDP and TC-BPF where appropriate, for either functionality or performance reasons.

Description
No description provided
Readme 226 KiB
Languages
C 91.9%
C++ 6.1%
Makefile 2%