qsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/networking/gtpmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/networking/gtpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/networking/gtpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/networking/gtpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/networking/gtpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/sp_SP/networking/gtpmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh and Andreas Schultz h](hterm)}(hDocumentation byh]hDocumentation by}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubh definition)}(hhh]h paragraph)}(hKHarald Welte and Andreas Schultz h](hHarald Welte <}(hhhhhNhNubh reference)}(hlaforge@gnumonks.orgh]hlaforge@gnumonks.org}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:laforge@gnumonks.orguh1hhhubh> and Andreas Schultz <}(hhhhhNhNubh)}(haschultz@tpip.neth]haschultz@tpip.net}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:aschultz@tpip.netuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(h^In 'drivers/net/gtp.c' you are finding a kernel-level implementation of a GTP tunnel endpoint.h]hbIn ‘drivers/net/gtp.c’ you are finding a kernel-level implementation of a GTP tunnel endpoint.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(h What is GTPh]h What is GTP}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhKubh)}(hGTP is the Generic Tunnel Protocol, which is a 3GPP protocol used for tunneling User-IP payload between a mobile station (phone, modem) and the interconnection between an external packet data network (such as the internet).h]hGTP is the Generic Tunnel Protocol, which is a 3GPP protocol used for tunneling User-IP payload between a mobile station (phone, modem) and the interconnection between an external packet data network (such as the internet).}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjChhubh)}(hXHSo when you start a 'data connection' from your mobile phone, the phone will use the control plane to signal for the establishment of such a tunnel between that external data network and the phone. The tunnel endpoints thus reside on the phone and in the gateway. All intermediate nodes just transport the encapsulated packet.h]hXLSo when you start a ‘data connection’ from your mobile phone, the phone will use the control plane to signal for the establishment of such a tunnel between that external data network and the phone. The tunnel endpoints thus reside on the phone and in the gateway. All intermediate nodes just transport the encapsulated packet.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjChhubh)}(hThe phone itself does not implement GTP but uses some other technology-dependent protocol stack for transmitting the user IP payload, such as LLC/SNDCP/RLC/MAC.h]hThe phone itself does not implement GTP but uses some other technology-dependent protocol stack for transmitting the user IP payload, such as LLC/SNDCP/RLC/MAC.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjChhubh)}(hXOAt some network element inside the cellular operator infrastructure (SGSN in case of GPRS/EGPRS or classic UMTS, hNodeB in case of a 3G femtocell, eNodeB in case of 4G/LTE), the cellular protocol stacking is translated into GTP *without breaking the end-to-end tunnel*. So intermediate nodes just perform some specific relay function.h](hAt some network element inside the cellular operator infrastructure (SGSN in case of GPRS/EGPRS or classic UMTS, hNodeB in case of a 3G femtocell, eNodeB in case of 4G/LTE), the cellular protocol stacking is translated into GTP }(hj~hhhNhNubhemphasis)}(h(*without breaking the end-to-end tunnel*h]h&without breaking the end-to-end tunnel}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubhC. So intermediate nodes just perform some specific relay function.}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hjChhubh)}(hX;At some point the GTP packet ends up on the so-called GGSN (GSM/UMTS) or P-GW (LTE), which terminates the tunnel, decapsulates the packet and forwards it onto an external packet data network. This can be public internet, but can also be any private IP network (or even theoretically some non-IP network like X.25).h]hX;At some point the GTP packet ends up on the so-called GGSN (GSM/UMTS) or P-GW (LTE), which terminates the tunnel, decapsulates the packet and forwards it onto an external packet data network. This can be public internet, but can also be any private IP network (or even theoretically some non-IP network like X.25).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjChhubh)}(hYou can find the protocol specification in 3GPP TS 29.060, available publicly via the 3GPP website at http://www.3gpp.org/DynaReport/29060.htmh](hfYou can find the protocol specification in 3GPP TS 29.060, available publicly via the 3GPP website at }(hjhhhNhNubh)}(h(http://www.3gpp.org/DynaReport/29060.htmh]h(http://www.3gpp.org/DynaReport/29060.htm}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhK,hjChhubh)}(hA direct PDF link to v13.6.0 is provided for convenience below: http://www.etsi.org/deliver/etsi_ts/129000_129099/129060/13.06.00_60/ts_129060v130600p.pdfh](h@A direct PDF link to v13.6.0 is provided for convenience below: }(hjhhhNhNubh)}(hZhttp://www.etsi.org/deliver/etsi_ts/129000_129099/129060/13.06.00_60/ts_129060v130600p.pdfh]hZhttp://www.etsi.org/deliver/etsi_ts/129000_129099/129060/13.06.00_60/ts_129060v130600p.pdf}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhK/hjChhubeh}(h] what-is-gtpah ]h"] what is gtpah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hThe Linux GTP tunnelling moduleh]hThe Linux GTP tunnelling module}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK3ubh)}(hThe module implements the function of a tunnel endpoint, i.e. it is able to decapsulate tunneled IP packets in the uplink originated by the phone, and encapsulate raw IP packets received from the external packet network in downlink towards the phone.h]hThe module implements the function of a tunnel endpoint, i.e. it is able to decapsulate tunneled IP packets in the uplink originated by the phone, and encapsulate raw IP packets received from the external packet network in downlink towards the phone.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjhhubh)}(hIt *only* implements the so-called 'user plane', carrying the User-IP payload, called GTP-U. It does not implement the 'control plane', which is a signaling protocol used for establishment and teardown of GTP tunnels (GTP-C).h](hIt }(hjhhhNhNubj)}(h*only*h]honly}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh implements the so-called ‘user plane’, carrying the User-IP payload, called GTP-U. It does not implement the ‘control plane’, which is a signaling protocol used for establishment and teardown of GTP tunnels (GTP-C).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubh)}(hSo in order to have a working GGSN/P-GW setup, you will need a userspace program that implements the GTP-C protocol and which then uses the netlink interface provided by the GTP-U module in the kernel to configure the kernel module.h]hSo in order to have a working GGSN/P-GW setup, you will need a userspace program that implements the GTP-C protocol and which then uses the netlink interface provided by the GTP-U module in the kernel to configure the kernel module.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjhhubh)}(hThis split architecture follows the tunneling modules of other protocols, e.g. PPPoE or L2TP, where you also run a userspace daemon to handle the tunnel establishment, authentication etc. and only the data plane is accelerated inside the kernel.h]hThis split architecture follows the tunneling modules of other protocols, e.g. PPPoE or L2TP, where you also run a userspace daemon to handle the tunnel establishment, authentication etc. and only the data plane is accelerated inside the kernel.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjhhubh)}(hDon't be confused by terminology: The GTP User Plane goes through kernel accelerated path, while the GTP Control Plane goes to Userspace :)h]hDon’t be confused by terminology: The GTP User Plane goes through kernel accelerated path, while the GTP Control Plane goes to Userspace :)}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjhhubh)}(h^The official homepage of the module is at https://osmocom.org/projects/linux-kernel-gtp-u/wikih](h*The official homepage of the module is at }(hjYhhhNhNubh)}(h4https://osmocom.org/projects/linux-kernel-gtp-u/wikih]h4https://osmocom.org/projects/linux-kernel-gtp-u/wiki}(hjahhhNhNubah}(h]h ]h"]h$]h&]refurijcuh1hhjYubeh}(h]h ]h"]h$]h&]uh1hhhhKMhjhhubeh}(h]the-linux-gtp-tunnelling-moduleah ]h"]the linux gtp tunnelling moduleah$]h&]uh1hhhhhhhhK3ubh)}(hhh](h)}(h2Userspace Programs with Linux Kernel GTP-U supporth]h2Userspace Programs with Linux Kernel GTP-U support}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hhhhhKQubh)}(hAt the time of this writing, there are at least two Free Software implementations that implement GTP-C and can use the netlink interface to make use of the Linux kernel GTP-U support:h]hAt the time of this writing, there are at least two Free Software implementations that implement GTP-C and can use the netlink interface to make use of the Linux kernel GTP-U support:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShj~hhubh bullet_list)}(hhh](h list_item)}(hXOpenGGSN (classic 2G/3G GGSN in C): https://osmocom.org/projects/openggsn/wiki/OpenGGSN h]h)}(hWOpenGGSN (classic 2G/3G GGSN in C): https://osmocom.org/projects/openggsn/wiki/OpenGGSNh](h$OpenGGSN (classic 2G/3G GGSN in C): }(hjhhhNhNubh)}(h3https://osmocom.org/projects/openggsn/wiki/OpenGGSNh]h3https://osmocom.org/projects/openggsn/wiki/OpenGGSN}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hAergw (GGSN + P-GW in Erlang): https://github.com/travelping/ergw h]h)}(h@ergw (GGSN + P-GW in Erlang): https://github.com/travelping/ergwh](hergw (GGSN + P-GW in Erlang): }(hjhhhNhNubh)}(h"https://github.com/travelping/ergwh]h"https://github.com/travelping/ergw}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKZhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhKWhj~hhubeh}(h]2userspace-programs-with-linux-kernel-gtp-u-supportah ]h"]2userspace programs with linux kernel gtp-u supportah$]h&]uh1hhhhhhhhKQubh)}(hhh](h)}(h*Userspace Library / Command Line Utilitiesh]h*Userspace Library / Command Line Utilities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK^ubh)}(hThere is a userspace library called 'libgtpnl' which is based on libmnl and which implements a C-language API towards the netlink interface provided by the Kernel GTP module:h]hThere is a userspace library called ‘libgtpnl’ which is based on libmnl and which implements a C-language API towards the netlink interface provided by the Kernel GTP module:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjhhubh)}(h http://git.osmocom.org/libgtpnl/h]h)}(hj#h]h http://git.osmocom.org/libgtpnl/}(hj%hhhNhNubah}(h]h ]h"]h$]h&]refurij#uh1hhj!ubah}(h]h ]h"]h$]h&]uh1hhhhKdhjhhubeh}(h](userspace-library-command-line-utilitiesah ]h"]*userspace library / command line utilitiesah$]h&]uh1hhhhhhhhK^ubh)}(hhh](h)}(hProtocol Versionsh]hProtocol Versions}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhhhhhKgubh)}(hThere are two different versions of GTP-U: v0 [GSM TS 09.60] and v1 [3GPP TS 29.281]. Both are implemented in the Kernel GTP module. Version 0 is a legacy version, and deprecated from recent 3GPP specifications.h]hThere are two different versions of GTP-U: v0 [GSM TS 09.60] and v1 [3GPP TS 29.281]. Both are implemented in the Kernel GTP module. Version 0 is a legacy version, and deprecated from recent 3GPP specifications.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjAhhubh)}(hgGTP-U uses UDP for transporting PDUs. The receiving UDP port is 2151 for GTPv1-U and 3386 for GTPv0-U.h]hgGTP-U uses UDP for transporting PDUs. The receiving UDP port is 2151 for GTPv1-U and 3386 for GTPv0-U.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjAhhubh)}(hThere are three versions of GTP-C: v0, v1, and v2. As the kernel doesn't implement GTP-C, we don't have to worry about this. It's the responsibility of the control plane implementation in userspace to implement that.h]hThere are three versions of GTP-C: v0, v1, and v2. As the kernel doesn’t implement GTP-C, we don’t have to worry about this. It’s the responsibility of the control plane implementation in userspace to implement that.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjAhhubeh}(h]protocol-versionsah ]h"]protocol versionsah$]h&]uh1hhhhhhhhKgubh)}(hhh](h)}(hIPv6h]hIPv6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKwubh)}(hThe 3GPP specifications indicate either IPv4 or IPv6 can be used both on the inner (user) IP layer, or on the outer (transport) layer.h]hThe 3GPP specifications indicate either IPv4 or IPv6 can be used both on the inner (user) IP layer, or on the outer (transport) layer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjhhubh)}(hUnfortunately, the Kernel module currently supports IPv6 neither for the User IP payload, nor for the outer IP layer. Patches or other Contributions to fix this are most welcome!h]hUnfortunately, the Kernel module currently supports IPv6 neither for the User IP payload, nor for the outer IP layer. Patches or other Contributions to fix this are most welcome!}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjhhubeh}(h]ipv6ah ]h"]ipv6ah$]h&]uh1hhhhhhhhKwubh)}(hhh](h)}(h Mailing Listh]h Mailing List}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXyIf you have questions regarding how to use the Kernel GTP module from your own software, or want to contribute to the code, please use the osmocom-net-grps mailing list for related discussion. The list can be reached at osmocom-net-gprs@lists.osmocom.org and the mailman interface for managing your subscription is at https://lists.osmocom.org/mailman/listinfo/osmocom-net-gprsh](hIf you have questions regarding how to use the Kernel GTP module from your own software, or want to contribute to the code, please use the osmocom-net-grps mailing list for related discussion. The list can be reached at }(hjhhhNhNubh)}(h"osmocom-net-gprs@lists.osmocom.orgh]h"osmocom-net-gprs@lists.osmocom.org}(hjhhhNhNubah}(h]h ]h"]h$]h&]refuri)mailto:osmocom-net-gprs@lists.osmocom.orguh1hhjubh@ and the mailman interface for managing your subscription is at }(hjhhhNhNubh)}(h;https://lists.osmocom.org/mailman/listinfo/osmocom-net-gprsh]h;https://lists.osmocom.org/mailman/listinfo/osmocom-net-gprs}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] mailing-listah ]h"] mailing listah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Issue Trackerh]h Issue Tracker}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThe Osmocom project maintains an issue tracker for the Kernel GTP-U module at https://osmocom.org/projects/linux-kernel-gtp-u/issuesh](hNThe Osmocom project maintains an issue tracker for the Kernel GTP-U module at }(hjhhhNhNubh)}(h6https://osmocom.org/projects/linux-kernel-gtp-u/issuesh]h6https://osmocom.org/projects/linux-kernel-gtp-u/issues}(hjhhhNhNubah}(h]h ]h"]h$]h&]refurijuh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h] issue-trackerah ]h"] issue trackerah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hHistory / Acknowledgementsh]hHistory / Acknowledgements}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hhhhhKubh)}(hThe Module was originally created in 2012 by Harald Welte, but never completed. Pablo came in to finish the mess Harald left behind. But doe to a lack of user interest, it never got merged.h]hThe Module was originally created in 2012 by Harald Welte, but never completed. Pablo came in to finish the mess Harald left behind. But doe to a lack of user interest, it never got merged.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj9hhubh)}(hIn 2015, Andreas Schultz came to the rescue and fixed lots more bugs, extended it with new features and finally pushed all of us to get it mainline, where it was merged in 4.7.0.h]hIn 2015, Andreas Schultz came to the rescue and fixed lots more bugs, extended it with new features and finally pushed all of us to get it mainline, where it was merged in 4.7.0.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj9hhubeh}(h]history-acknowledgementsah ]h"]history / acknowledgementsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hArchitectural Detailsh]hArchitectural Details}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhhhhhKubh)}(hhh](h)}(h,Local GTP-U entity and tunnel identificationh]h,Local GTP-U entity and tunnel identification}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hgGTP-U uses UDP for transporting PDU's. The receiving UDP port is 2152 for GTPv1-U and 3386 for GTPv0-U.h]hiGTP-U uses UDP for transporting PDU’s. The receiving UDP port is 2152 for GTPv1-U and 3386 for GTPv0-U.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThere is only one GTP-U entity (and therefore SGSN/GGSN/S-GW/PDN-GW instance) per IP address. Tunnel Endpoint Identifier (TEID) are unique per GTP-U entity.h]hThere is only one GTP-U entity (and therefore SGSN/GGSN/S-GW/PDN-GW instance) per IP address. Tunnel Endpoint Identifier (TEID) are unique per GTP-U entity.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hA specific tunnel is only defined by the destination entity. Since the destination port is constant, only the destination IP and TEID define a tunnel. The source IP and Port have no meaning for the tunnel.h]hA specific tunnel is only defined by the destination entity. Since the destination port is constant, only the destination IP and TEID define a tunnel. The source IP and Port have no meaning for the tunnel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h Therefore:h]h Therefore:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh block_quote)}(hXR* when sending, the remote entity is defined by the remote IP and the tunnel endpoint id. The source IP and port have no meaning and can be changed at any time. * when receiving the local entity is defined by the local destination IP and the tunnel endpoint id. The source IP and port have no meaning and can change at any time. h]j)}(hhh](j)}(hwhen sending, the remote entity is defined by the remote IP and the tunnel endpoint id. The source IP and port have no meaning and can be changed at any time. h]h)}(hwhen sending, the remote entity is defined by the remote IP and the tunnel endpoint id. The source IP and port have no meaning and can be changed at any time.h]hwhen sending, the remote entity is defined by the remote IP and the tunnel endpoint id. The source IP and port have no meaning and can be changed at any time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hwhen receiving the local entity is defined by the local destination IP and the tunnel endpoint id. The source IP and port have no meaning and can change at any time. h]h)}(hwhen receiving the local entity is defined by the local destination IP and the tunnel endpoint id. The source IP and port have no meaning and can change at any time.h]hwhen receiving the local entity is defined by the local destination IP and the tunnel endpoint id. The source IP and port have no meaning and can change at any time.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubh)}(h0[3GPP TS 29.281] Section 4.3.0 defines this so::h]h/[3GPP TS 29.281] Section 4.3.0 defines this so:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh literal_block)}(hXThe TEID in the GTP-U header is used to de-multiplex traffic incoming from remote tunnel endpoints so that it is delivered to the User plane entities in a way that allows multiplexing of different users, different packet protocols and different QoS levels. Therefore no two remote GTP-U endpoints shall send traffic to a GTP-U protocol entity using the same TEID value except for data forwarding as part of mobility procedures.h]hXThe TEID in the GTP-U header is used to de-multiplex traffic incoming from remote tunnel endpoints so that it is delivered to the User plane entities in a way that allows multiplexing of different users, different packet protocols and different QoS levels. Therefore no two remote GTP-U endpoints shall send traffic to a GTP-U protocol entity using the same TEID value except for data forwarding as part of mobility procedures.}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(hX#The definition above only defines that two remote GTP-U endpoints *should not* send to the same TEID, it *does not* forbid or exclude such a scenario. In fact, the mentioned mobility procedures make it necessary that the GTP-U entity accepts traffic for TEIDs from multiple or unknown peers.h](hBThe definition above only defines that two remote GTP-U endpoints }(hj+hhhNhNubj)}(h *should not*h]h should not}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh send to the same TEID, it }(hj+hhhNhNubj)}(h *does not*h]hdoes not}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh forbid or exclude such a scenario. In fact, the mentioned mobility procedures make it necessary that the GTP-U entity accepts traffic for TEIDs from multiple or unknown peers.}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhTherefore, the receiving side identifies tunnels exclusively based on TEIDs, not based on the source IP!h]hhTherefore, the receiving side identifies tunnels exclusively based on TEIDs, not based on the source IP!}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h],local-gtp-u-entity-and-tunnel-identificationah ]h"],local gtp-u entity and tunnel identificationah$]h&]uh1hhjnhhhhhKubeh}(h]architectural-detailsah ]h"]architectural detailsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hAPN vs. Network Deviceh]hAPN vs. Network Device}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hhhhhKubh)}(hJThe GTP-U driver creates a Linux network device for each Gi/SGi interface.h]hJThe GTP-U driver creates a Linux network device for each Gi/SGi interface.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubh)}(h[3GPP TS 29.281] calls the Gi/SGi reference point an interface. This may lead to the impression that the GGSN/P-GW can have only one such interface.h]h[3GPP TS 29.281] calls the Gi/SGi reference point an interface. This may lead to the impression that the GGSN/P-GW can have only one such interface.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubh)}(hCorrect is that the Gi/SGi reference point defines the interworking between +the 3GPP packet domain (PDN) based on GTP-U tunnel and IP based networks.h]hCorrect is that the Gi/SGi reference point defines the interworking between +the 3GPP packet domain (PDN) based on GTP-U tunnel and IP based networks.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubh)}(hzThere is no provision in any of the 3GPP documents that limits the number of Gi/SGi interfaces implemented by a GGSN/P-GW.h]hzThere is no provision in any of the 3GPP documents that limits the number of Gi/SGi interfaces implemented by a GGSN/P-GW.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubh)}(h[3GPP TS 29.061] Section 11.3 makes it clear that the selection of a specific Gi/SGi interfaces is made through the Access Point Name (APN)::h]h[3GPP TS 29.061] Section 11.3 makes it clear that the selection of a specific Gi/SGi interfaces is made through the Access Point Name (APN):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubj)}(hX2. each private network manages its own addressing. In general this will result in different private networks having overlapping address ranges. A logically separate connection (e.g. an IP in IP tunnel or layer 2 virtual circuit) is used between the GGSN/P-GW and each private network. In this case the IP address alone is not necessarily unique. The pair of values, Access Point Name (APN) and IPv4 address and/or IPv6 prefixes, is unique.h]hX2. each private network manages its own addressing. In general this will result in different private networks having overlapping address ranges. A logically separate connection (e.g. an IP in IP tunnel or layer 2 virtual circuit) is used between the GGSN/P-GW and each private network. In this case the IP address alone is not necessarily unique. The pair of values, Access Point Name (APN) and IPv4 address and/or IPv6 prefixes, is unique.}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhj{hhubh)}(hIn order to support the overlapping address range use case, each APN is mapped to a separate Gi/SGi interface (network device).h]hIn order to support the overlapping address range use case, each APN is mapped to a separate Gi/SGi interface (network device).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubhnote)}(hThe Access Point Name is purely a control plane (GTP-C) concept. At the GTP-U level, only Tunnel Endpoint Identifiers are present in GTP-U packets and network devices are knownh]h)}(hThe Access Point Name is purely a control plane (GTP-C) concept. At the GTP-U level, only Tunnel Endpoint Identifiers are present in GTP-U packets and network devices are knownh]hThe Access Point Name is purely a control plane (GTP-C) concept. At the GTP-U level, only Tunnel Endpoint Identifiers are present in GTP-U packets and network devices are known}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj{hhhhhNubh)}(h=Therefore for a given UE the mapping in IP to PDN network is:h]h=Therefore for a given UE the mapping in IP to PDN network is:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubj)}(h1* network device + MS IP -> Peer IP + Peer TEID, h]j)}(hhh]j)}(h/network device + MS IP -> Peer IP + Peer TEID, h]h)}(h.network device + MS IP -> Peer IP + Peer TEID,h]h.network device + MS IP -> Peer IP + Peer TEID,}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhj{hhubh)}(hand from PDN to IP network:h]hand from PDN to IP network:}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubj)}(h+* local GTP-U IP + TEID -> network device h]j)}(hhh]j)}(h)local GTP-U IP + TEID -> network device h]h)}(h(local GTP-U IP + TEID -> network deviceh]h(local GTP-U IP + TEID -> network device}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjVubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]jjuh1jhhhKhjOubah}(h]h ]h"]h$]h&]uh1jhhhKhj{hhubh)}(hFurthermore, before a received T-PDU is injected into the network device the MS IP is checked against the IP recorded in PDP context.h]hFurthermore, before a received T-PDU is injected into the network device the MS IP is checked against the IP recorded in PDP context.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj{hhubeh}(h]apn-vs-network-deviceah ]h"]apn vs. network deviceah$]h&]uh1hhhhhhhhKubeh}(h]%the-linux-kernel-gtp-tunneling-moduleah ]h"]%the linux kernel gtp tunneling moduleah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjj{jxjjj>j;jj~jjjjj6j3jkjhjxjujpjmjju nametypes}(jjj{jj>jjjj6jkjxjpjuh}(jhjjCjxjjj~j;jj~jAjjjjj3jjhj9jujnjmjjj{u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.