osmo-epdg: The osmocom ePDG for VoWiFi
======================================
:author:	Pau Espin Pedrol <pespin@sysmocom.de>
:copyright:	2024 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> (License: CC-BY-SA)
:backend:	slidy
:max-width:	54em

== Introduction

[role="incremental"]
* Open source VoLTE already supported: open5gs, kamailio
* Missing for VoWifi support: ePDG (+ AAA)
* link:https://nlnet.nl/project/Osmocom-ePDG/[NLnet Foundation grant] to implement open source EPDG.
* link:https://osmocom.org/projects/osmo-epdg/wiki[osmo-epdg] is implemented


== Architecture: Control plane

include::osmo_epdg_architecture_control_plane.adoc[]

== Architecture: User plane

include::osmo_epdg_architecture_user_plane.adoc[]

== UE

* TODO-lynxis: talk about all the steps which were done at the phone side
* Requirements for phone, tweaks, DNS, etc.

== Strongswan

* TODO-lynxis: Talk about strongswan, ipsec, IKEv2, specific configs which were needed

== Erlang domain: osmo-epdg

.Control Plane

[role="incremental"]
* Available in link:https://gitea.osmocom.org/erlang/osmo-epdg[osmo-epdg.git]
* Implements EPDG and AAA in same process
* _CEAI_: link:https://gerrit.osmocom.org/erlang/osmo_gsup[osmo_gsup.git] (IPA in link:https://gerrit.osmocom.org/erlang/osmo_ss7[osmo-ss7.git])
* _S6b_, SWx: Diameter implemented through link:https://github.com/carlosedp/rebar3_diameter_compiler.git[rebar3_diameter_compiler]
* _SWm_: Implemented internally through erlang messages
* _S2b_: GTPv2C implemented with link:https://github.com/osmocom/gtplib[gtplib.git] own fork from travelping (forward encoded PCO)

.User Plane (GTPv1U)

[role="incremental"]
* osmo-epdg manages gtp kernel module tun device:
[role="incremental"]
** link:https://github.com/osmocom/gtp_u_kmod[gtp_u_kmod.git] (link:https://github.com/osmocom/gen_netlink[gen_netlink.git], link:https://github.com/osmocom/gen_socket[gen_socket.git]) forks from travelping (unmaintained?)
** Tundev created (netlink) at startup following config file
** PDP Contexts set up in tundev (netlink) during subscriber session attach
** Decapsulated ipsec traffic is routed to the tundev, encapsulated in GTPv1-U and forwarded to UPF

== Erlang domain: osmo-epdg .cfg file

include::osmo_epdg_sample_cfg_file.adoc[]

== open5gs

* Some specific patches for S2b were merged open5gs upstream:
** APCO IE (DNS, P-CSCF addr) handling link:https://github.com/open5gs/open5gs/commit/4aaac999f7bc337bcaed2789ccc6269c256564d2[(1)].
** Gy bugs in S2b: link:https://github.com/open5gs/open5gs/commit/32de75b1a50ffbd324b60f93103dbe2853a45bc5[(1)].

* TODO-lynxis: Maybe talk about the required specific open5gs configs?

== IMS

* TODO-lynxis: Talk about kamailio, specific configs which were needed

== Ansible setup

* TODO: Talk about ansible-prototype and the manual tests we did
* Tell how to test with SWu-EMulator

== TTCN-3: EPDG_Tests

include::ttcn3_component_diagram.adoc[]

* Extra script to set up iface + routing for userplane in docker-playground setup
* 15 tests so far

== Future work

* Implement SWm Diameter interface over the wire
* Split AAA out of osmo-epdg into its own process
* Implement GTPUv1 inner IPv6 support
* Implement GTPUv1 outter IPv6 support
* Implement GTPCv2 IPv6 support
* Get changes to erlang repositories gtplib, gtp_u_kmod, gen_netlink, gen_socket merged upstream (travelping)

== Know more

* link:https://nlnet.nl/project/Osmocom-ePDG/[NlNet Project]
* link:https://osmocom.org/projects/osmo-epdg/wiki[osmo-epdg redmine osmocom project]
* link:https://gitea.osmocom.org/ims-volte-vowifi/ansible-prototype[Deploy with Ansible]
* link:https://github.com/fasferraz/SWu-IKEv2[SWu-IKEv2]