^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) =====================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) The Linux kernel GTP tunneling module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) =====================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) Documentation by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) Harald Welte <laforge@gnumonks.org> and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) Andreas Schultz <aschultz@tpip.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) In 'drivers/net/gtp.c' you are finding a kernel-level implementation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) of a GTP tunnel endpoint.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) What is GTP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) GTP is the Generic Tunnel Protocol, which is a 3GPP protocol used for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) tunneling User-IP payload between a mobile station (phone, modem)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) and the interconnection between an external packet data network (such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) as the internet).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) So when you start a 'data connection' from your mobile phone, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) phone will use the control plane to signal for the establishment of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) such a tunnel between that external data network and the phone. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) tunnel endpoints thus reside on the phone and in the gateway. All
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) intermediate nodes just transport the encapsulated packet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) The phone itself does not implement GTP but uses some other
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) technology-dependent protocol stack for transmitting the user IP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) payload, such as LLC/SNDCP/RLC/MAC.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) At some network element inside the cellular operator infrastructure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) (SGSN in case of GPRS/EGPRS or classic UMTS, hNodeB in case of a 3G
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) femtocell, eNodeB in case of 4G/LTE), the cellular protocol stacking
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) is translated into GTP *without breaking the end-to-end tunnel*. So
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) intermediate nodes just perform some specific relay function.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) At some point the GTP packet ends up on the so-called GGSN (GSM/UMTS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) or P-GW (LTE), which terminates the tunnel, decapsulates the packet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) and forwards it onto an external packet data network. This can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) public internet, but can also be any private IP network (or even
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) theoretically some non-IP network like X.25).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) You can find the protocol specification in 3GPP TS 29.060, available
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) publicly via the 3GPP website at http://www.3gpp.org/DynaReport/29060.htm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) A direct PDF link to v13.6.0 is provided for convenience below:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) http://www.etsi.org/deliver/etsi_ts/129000_129099/129060/13.06.00_60/ts_129060v130600p.pdf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) The Linux GTP tunnelling module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) ===============================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) The module implements the function of a tunnel endpoint, i.e. it is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) able to decapsulate tunneled IP packets in the uplink originated by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) the phone, and encapsulate raw IP packets received from the external
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) packet network in downlink towards the phone.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) It *only* implements the so-called 'user plane', carrying the User-IP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) payload, called GTP-U. It does not implement the 'control plane',
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) which is a signaling protocol used for establishment and teardown of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) GTP tunnels (GTP-C).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) So in order to have a working GGSN/P-GW setup, you will need a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) userspace program that implements the GTP-C protocol and which then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) uses the netlink interface provided by the GTP-U module in the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) to configure the kernel module.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) This split architecture follows the tunneling modules of other
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) protocols, e.g. PPPoE or L2TP, where you also run a userspace daemon
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) to handle the tunnel establishment, authentication etc. and only the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) data plane is accelerated inside the kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) Don't be confused by terminology: The GTP User Plane goes through
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) kernel accelerated path, while the GTP Control Plane goes to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) Userspace :)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) The official homepage of the module is at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) https://osmocom.org/projects/linux-kernel-gtp-u/wiki
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) Userspace Programs with Linux Kernel GTP-U support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) ==================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) At the time of this writing, there are at least two Free Software
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) implementations that implement GTP-C and can use the netlink interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) to make use of the Linux kernel GTP-U support:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) * OpenGGSN (classic 2G/3G GGSN in C):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) https://osmocom.org/projects/openggsn/wiki/OpenGGSN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) * ergw (GGSN + P-GW in Erlang):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) https://github.com/travelping/ergw
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) Userspace Library / Command Line Utilities
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) ==========================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) There is a userspace library called 'libgtpnl' which is based on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) libmnl and which implements a C-language API towards the netlink
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) interface provided by the Kernel GTP module:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) http://git.osmocom.org/libgtpnl/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) Protocol Versions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) =================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) There are two different versions of GTP-U: v0 [GSM TS 09.60] and v1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) [3GPP TS 29.281]. Both are implemented in the Kernel GTP module.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) Version 0 is a legacy version, and deprecated from recent 3GPP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) specifications.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) GTP-U uses UDP for transporting PDUs. The receiving UDP port is 2151
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) for GTPv1-U and 3386 for GTPv0-U.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) There are three versions of GTP-C: v0, v1, and v2. As the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) doesn't implement GTP-C, we don't have to worry about this. It's the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) responsibility of the control plane implementation in userspace to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) implement that.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) IPv6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) ====
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) The 3GPP specifications indicate either IPv4 or IPv6 can be used both
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) on the inner (user) IP layer, or on the outer (transport) layer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) Unfortunately, the Kernel module currently supports IPv6 neither for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) the User IP payload, nor for the outer IP layer. Patches or other
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) Contributions to fix this are most welcome!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) Mailing List
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) If you have questions regarding how to use the Kernel GTP module from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) your own software, or want to contribute to the code, please use the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) osmocom-net-grps mailing list for related discussion. The list can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) reached at osmocom-net-gprs@lists.osmocom.org and the mailman
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) interface for managing your subscription is at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) https://lists.osmocom.org/mailman/listinfo/osmocom-net-gprs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) Issue Tracker
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) =============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) The Osmocom project maintains an issue tracker for the Kernel GTP-U
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) module at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) https://osmocom.org/projects/linux-kernel-gtp-u/issues
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) History / Acknowledgements
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) ==========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) The Module was originally created in 2012 by Harald Welte, but never
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) completed. Pablo came in to finish the mess Harald left behind. But
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) doe to a lack of user interest, it never got merged.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) In 2015, Andreas Schultz came to the rescue and fixed lots more bugs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) extended it with new features and finally pushed all of us to get it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) mainline, where it was merged in 4.7.0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) Architectural Details
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) =====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) Local GTP-U entity and tunnel identification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) --------------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) GTP-U uses UDP for transporting PDU's. The receiving UDP port is 2152
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) for GTPv1-U and 3386 for GTPv0-U.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) There is only one GTP-U entity (and therefor SGSN/GGSN/S-GW/PDN-GW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) instance) per IP address. Tunnel Endpoint Identifier (TEID) are unique
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) per GTP-U entity.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) A specific tunnel is only defined by the destination entity. Since the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) destination port is constant, only the destination IP and TEID define
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) a tunnel. The source IP and Port have no meaning for the tunnel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) Therefore:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) * when sending, the remote entity is defined by the remote IP and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) the tunnel endpoint id. The source IP and port have no meaning and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) can be changed at any time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) * when receiving the local entity is defined by the local
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) destination IP and the tunnel endpoint id. The source IP and port
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) have no meaning and can change at any time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) [3GPP TS 29.281] Section 4.3.0 defines this so::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) The TEID in the GTP-U header is used to de-multiplex traffic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) incoming from remote tunnel endpoints so that it is delivered to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) User plane entities in a way that allows multiplexing of different
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) users, different packet protocols and different QoS levels.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) Therefore no two remote GTP-U endpoints shall send traffic to a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) GTP-U protocol entity using the same TEID value except
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) for data forwarding as part of mobility procedures.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) The definition above only defines that two remote GTP-U endpoints
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) *should not* send to the same TEID, it *does not* forbid or exclude
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) such a scenario. In fact, the mentioned mobility procedures make it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) necessary that the GTP-U entity accepts traffic for TEIDs from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) multiple or unknown peers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) Therefore, the receiving side identifies tunnels exclusively based on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) TEIDs, not based on the source IP!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) APN vs. Network Device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) ======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) The GTP-U driver creates a Linux network device for each Gi/SGi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) [3GPP TS 29.281] calls the Gi/SGi reference point an interface. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) may lead to the impression that the GGSN/P-GW can have only one such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) Correct is that the Gi/SGi reference point defines the interworking
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) between +the 3GPP packet domain (PDN) based on GTP-U tunnel and IP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) based networks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) There is no provision in any of the 3GPP documents that limits the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) number of Gi/SGi interfaces implemented by a GGSN/P-GW.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) [3GPP TS 29.061] Section 11.3 makes it clear that the selection of a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) specific Gi/SGi interfaces is made through the Access Point Name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) (APN)::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 2. each private network manages its own addressing. In general this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) will result in different private networks having overlapping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) address ranges. A logically separate connection (e.g. an IP in IP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) tunnel or layer 2 virtual circuit) is used between the GGSN/P-GW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) and each private network.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) In this case the IP address alone is not necessarily unique. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) pair of values, Access Point Name (APN) and IPv4 address and/or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) IPv6 prefixes, is unique.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) In order to support the overlapping address range use case, each APN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) is mapped to a separate Gi/SGi interface (network device).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) .. note::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) The Access Point Name is purely a control plane (GTP-C) concept.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) At the GTP-U level, only Tunnel Endpoint Identifiers are present in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) GTP-U packets and network devices are known
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) Therefore for a given UE the mapping in IP to PDN network is:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) * network device + MS IP -> Peer IP + Peer TEID,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) and from PDN to IP network:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) * local GTP-U IP + TEID -> network device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) Furthermore, before a received T-PDU is injected into the network
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) device the MS IP is checked against the IP recorded in PDP context.