neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-upf/+/30831 )
Change subject: tunend: choose local GTP addr by Network Instance IEs
......................................................................
tunend: choose local GTP addr by Network Instance IEs
Implement handling of the Network Instance IEs from PFCP for tunend,
like already done for tunmap.
In 'tunend' cfg, allow indicating a local GTP address for both 'dev
create' and 'dev use'. Select a GTP device by the local address the
Network Instance IE in PFCP PDR indicates.
Related: SYS#6192
Change-Id: I376c09bfc1844df1e61d2efac17561fac614858b
---
M include/osmocom/upf/upf_gtp.h
M src/osmo-upf/up_gtp_action.c
M src/osmo-upf/upf_gtp.c
M src/osmo-upf/upf_vty.c
M tests/upf.vty
5 files changed, 64 insertions(+), 27 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/31/30831/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30831
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I376c09bfc1844df1e61d2efac17561fac614858b
Gerrit-Change-Number: 30831
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-upf/+/30832 )
Change subject: manual: use 'tunend' and 'tunmap'
......................................................................
manual: use 'tunend' and 'tunmap'
Change-Id: I09a2fa28465945c98b58b4093c7d5de65e184645
---
M doc/manuals/chapters/overview.adoc
M doc/manuals/chapters/running.adoc
2 files changed, 13 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/32/30832/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30832
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I09a2fa28465945c98b58b4093c7d5de65e184645
Gerrit-Change-Number: 30832
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-upf/+/30836 )
Change subject: manual: some tweaks in overview
......................................................................
manual: some tweaks in overview
Related: SYS#6192
Change-Id: I5a672d24eb12bd29d8684117b2658ad4cd89d682
---
M doc/manuals/chapters/overview.adoc
1 file changed, 13 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/36/30836/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30836
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I5a672d24eb12bd29d8684117b2658ad4cd89d682
Gerrit-Change-Number: 30836
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/30832 )
Change subject: manual: use 'tunend' and 'tunmap'
......................................................................
manual: use 'tunend' and 'tunmap'
Change-Id: I09a2fa28465945c98b58b4093c7d5de65e184645
---
M doc/manuals/chapters/overview.adoc
M doc/manuals/chapters/running.adoc
2 files changed, 13 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/32/30832/1
diff --git a/doc/manuals/chapters/overview.adoc b/doc/manuals/chapters/overview.adoc
index 9cd7751..a6dc345 100644
--- a/doc/manuals/chapters/overview.adoc
+++ b/doc/manuals/chapters/overview.adoc
@@ -79,14 +79,14 @@
OsmoUPF does not support the complete PFCP feature set. It detects exactly two
use cases that will provide service of actual GTP tunnels:
-* GTP tunnel encapsulation/decapsulation:
+* `tunend`: GTP tunnel encapsulation/decapsulation:
- One Packet Detection Rule (PDR) accepts a GTP tunnel from the Access side
with an Outer Header Removal.
- This PDR uses a Forwarding Action Rule (FAR) for plain IP towards Core.
- Another PDR accepts plain IP on a specific IP address from Core.
- The second PDR uses a FAR towards Access with Outer Header Creation for GTP.
-* GTP tunnel forwarding:
+* `tunmap`: GTP tunnel forwarding:
- One Packet Detection Rule (PDR) accepts a GTP tunnel from the Access side
with an Outer Header Removal.
- This PDR uses a Forwarding Action Rule (FAR) towards Core with an Outer
diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc
index 0459541..ab7ab18 100644
--- a/doc/manuals/chapters/running.adoc
+++ b/doc/manuals/chapters/running.adoc
@@ -55,7 +55,7 @@
naming of individual tunnel rulesets does not collide:
----
-nft
+tunmap
table-name osmo-upf-2
----
@@ -103,10 +103,10 @@
forwarding proxy, without encapsulation/decapsulation of GTP payloads.
[[gtp_module]]
-===== Configure Linux Kernel GTP Module
+===== Configure Linux Kernel GTP Module for `tunend`
-The Linux kernel GTP module is used for GTP encapsulation/decapsulation from/to
-"the internet".
+The Linux kernel GTP module is used for the `tunend` use case, i.e. GTP
+encapsulation/decapsulation from/to "the internet".
To use the GTP kernel module, OsmoUPF requires a GTP device, which is a
dedicated network device provided by the Linux kernel, serving as GTP tunnel
@@ -120,7 +120,7 @@
`apn23` on startup, which is also destroyed on program exit:
----
-gtp
+tunend
dev create apn23
----
@@ -131,7 +131,7 @@
called `apn42`:
----
-gtp
+tunend
dev use apn42
----
@@ -153,7 +153,7 @@
little sense to configure more than one GTP device.
[[nftables]]
-===== Configure Linux netfilter
+===== Configure Linux netfilter for `tunmap`
The Linux kernel netfilter module is used for GTP tunnel proxying, also known as
tunnel forwarding or tunnel mapping.
@@ -165,6 +165,9 @@
can be configured in `osmo-upf.cfg` like this:
----
-nft
+tunmap
table-name my-table-name
----
+
+When running more than one osmo-upf process on a system, pick distinct table
+names to avoid name collisions in the nftables reulesets.
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30832
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I09a2fa28465945c98b58b4093c7d5de65e184645
Gerrit-Change-Number: 30832
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/30833 )
Change subject: manual: explain new netinst cfg
......................................................................
manual: explain new netinst cfg
Change-Id: I1d636b8a6ae7628b4369734a45e60f2eaf437dce
---
A doc/manuals/chapters/netinst.adoc
M doc/manuals/osmoupf-usermanual.adoc
2 files changed, 58 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/33/30833/1
diff --git a/doc/manuals/chapters/netinst.adoc b/doc/manuals/chapters/netinst.adoc
new file mode 100644
index 0000000..3add2bb
--- /dev/null
+++ b/doc/manuals/chapters/netinst.adoc
@@ -0,0 +1,56 @@
+== Local GTP Addresses / Network Instance
+
+PFCP features optional Network Instance IEs, in which the CPF may tell the UPF which local network interface to use for
+a PDR and/or a FAR.
+
+NOTE:: osmo-upf only evaluates the Network Instances configured in PDRs. Since osmo-upf always pairs a PDR+FAR with
+another PDR+FAR in reverse direction, each side's PDR is sufficient.
+
+Network Instance IEs affect both the tunend and the tunmap use cases, as well as which local IP address is returned
+in the PFCP response
+
+1. Look up Network Instance name in the osmo-upf.cfg `netinst` section, to obtain a local IP address.
+2. Depending on use case:
+ - tunend: create the tunnel on a GTP device matching the local IP address, see <<gtp_module>>.
+ - tunmap: use the local IP address in the netfilter ruleset, see <<nftables>>.
+3. Usually, return the chosen local IP address in the F-TEID IE of the Created PDR IE in the PFCP response.
+
+Network Instance configuration consists of {name, IP address} pairs.
+
+NOTE:: As soon as a `netinst` configuration is nonempty, receiving an undefined Network Instance name results in a PFCP
+Reject response, and a log message on cateogry `session`, level `NOTICE`. To make the PFCP return success, add the
+failing name to the `netinst` config.
+
+=== netinst for tunend
+
+The following configuration sets up two GTP devices for tunend, expecting Network Instance names `access1` or `access2`:
+
+----
+tunend
+ dev create apn1 10.0.0.1
+ dev create apn2 10.0.0.2
+netinst
+ add access1 10.0.0.1
+ add access2 10.0.0.2
+----
+
+For example, if a Create PDR IE indicates Network Instance = `access1`, a GTP tunnel is set up in GTP kernel device
+`apn1`. For `access2`, use `apn2`.
+
+=== netinst for tunmap
+
+For the tunmap use case, it is sufficient to configure `netinst` entries, without any addition to the `tunmap` section.
+The following example configures various interfaces for tunmap, to match Network Instance names received in PFCP:
+
+----
+tunmap
+ table-name osmo-upf
+netinst
+ add access1 10.0.0.1
+ add access2 10.0.0.2
+ add core1 9.0.0.1
+ add core2 9.0.0.2
+----
+
+For example, a Create PDR indicating a Network Instance of `core1` will result in an nftables rule that receives packets
+on local address `9.0.0.1`.
diff --git a/doc/manuals/osmoupf-usermanual.adoc b/doc/manuals/osmoupf-usermanual.adoc
index 0e0e7b7..49e3e23 100644
--- a/doc/manuals/osmoupf-usermanual.adoc
+++ b/doc/manuals/osmoupf-usermanual.adoc
@@ -11,6 +11,8 @@
include::{srcdir}/chapters/running.adoc[]
+include::{srcdir}/chapters/netinst.adoc[]
+
include::./common/chapters/vty.adoc[]
include::./common/chapters/logging.adoc[]
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30833
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I1d636b8a6ae7628b4369734a45e60f2eaf437dce
Gerrit-Change-Number: 30833
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/30834 )
Change subject: manual: tweak 'running' for new netinst feature
......................................................................
manual: tweak 'running' for new netinst feature
Change-Id: Iaa7af53aae72099283bb29ef0fc0eba03ae2f27d
---
M doc/manuals/chapters/running.adoc
1 file changed, 15 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/34/30834/1
diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc
index ab7ab18..0f56521 100644
--- a/doc/manuals/chapters/running.adoc
+++ b/doc/manuals/chapters/running.adoc
@@ -117,11 +117,12 @@
range that matches the UE IP addresses that are configured in GTP-C / PFCP.
The following configuration placed in `osmo-upf.cfg` creates a GTP device called
-`apn23` on startup, which is also destroyed on program exit:
+`apn23` on startup of osmo-upf, which is destroyed on program exit. It listens
+for GTP on local IP address `1.2.3.4`:
----
tunend
- dev create apn23
+ dev create apn23 1.2.3.4
----
TODO:: `osmo-upf` is not yet able to configure this network device's IP address
@@ -132,7 +133,7 @@
----
tunend
- dev use apn42
+ dev use apn42 2.3.4.5
----
GTP kernel devices can be managed manually using the `gtp-link` program
@@ -146,11 +147,17 @@
$ osmo-upf -c osmo-upf.cfg
----
-NOTE:: It is possible to configure multiple GTP devices in `osmo-upf.cfg`, but
-`osmo-upf` currently _only uses the first GTP device_ found in the
-configuration. In the future, different devices may be used based on the Network
-Instance IE passed in the PFCP Session messages (PDR/FAR). Until then, it makes
-little sense to configure more than one GTP device.
+It is possible to configure multiple GTP devices in `osmo-upf.cfg`. Depending on
+the Network Instance name, osmo-upf creates tunnel endpoints on the GTP device
+with a matching IP address:
+
+- The Network Instance IE in the PDR on the Access side determines the local IP
+ address to use, see <<netinst>>.
+- This local IP address in turn determines the GTP device to use.
+
+It is possible for a GTP device to listen on ANY -- just omit the IP address in
+the `dev` config. In this case, all Network Instance names will be served by
+this GTP device. When using ANY, there should be exactly one GTP dev configured.
[[nftables]]
===== Configure Linux netfilter for `tunmap`
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30834
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Iaa7af53aae72099283bb29ef0fc0eba03ae2f27d
Gerrit-Change-Number: 30834
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange