Hi,

I’m using OpenBSD as a router with a Greek ISP called “Cosmote” that is routes 
traffic through MAP-E[^1]. The main reason I use OpenBSD as a router is the 
“batteries-included” design. Everything I need can be found on the base system. 
Unfortunately, MAP-E CE is not supported natively by OpenBSD. Looking that 
current state, to get full MAP-E support in there are three things that need to 
get done:

1. PF MAP-E source-port NAT: there is a FreeBSD derived working patch sent to 
the tech mailing in 2021 with the respective source code available on 
GitHub[^3] under the OpenBSD compatible ISC License.
2. DHCPv6 Softwire46 / MAP-E provisioning: Current dhcp6leased (dhcp6leased.h) 
handles standard options, but not options codes 89-96 required for this 
operation.
3. Lease-to-interface orchestration: Something needs to react when the 
delegated prefix or MAP rule changes, extract data to populate the `gif0` 
interface

I have a working implementation right now, using a patch submitted to the 
“tech" mailing list in 2021[^2]. I’m using static data extracted from the 
router via tcpdump pcap  for (2) and for (3) I’m using a perl-based script. I’m 
testing the setup right now, the MTU had to be modified twice to properly load 
some websites.

Is anyone working on this by chance?

Kind regards,

PA

[^1]: MAP-E is an IPv4-over-IPv6 transition mechanism defined in RFC 7597. It 
provides stateless, algorithmic mapping between IPv6 prefixes and IPv4 
address/port information. In shared-IPv4 deployments, customers are assigned 
distinct port sets, identified by a PSID, allowing multiple CEs to share the 
same IPv4 address. Because the CE or BR can derive the correct MAP IPv6 
endpoint from the IPv4 address and port using mapping rules, the BR does not 
need to maintain per-flow port-binding state, which improves scalability. MAP-E 
can also support direct CE-to-CE forwarding in mesh mode when Forwarding 
Mapping Rules are configured.

[^2]: "pf NAT source port translation of MAP-E Customer Edge (RFC 7597)”,   
Toru Mano, 202, link: https://marc.info/?l=openbsd-tech&m=163198247009258&w=2

[^3]: https://github.com/toru-mano/openbsd-pf-map-e-ce

Reply via email to