Inserting GTP packets to GTP tunnel using libgtpnl

Viewed 278

I have a question about establishing a stable internet connection (IuPS_PS) between MS and our developed network core system using our home nodeB (HNB).

In our core system, we can see the the internet packets which are sent from MS to HNB and from HNB to the core system. I attached a screenshot of the wireshark log on the interface between HNB and core.

enter image description here

As you can see in this picture, the user query is server.hnb. Source IP (MS IP) is 10.250.0.114 and destination IPs are 172.60.3.154 (core IP) and 8.8.8.8 which we are set as DNS address in Activate PDP Context Accept (Activate PDP Context Accept is a message which is sent from core to HNB and from HNB to MS which contains some internet parameters such as DNS IPs, bit-rates, ... ). The protocol is GTP-DNS and the stacked layers are DNS / UDP / IP / GTP / UDP / IP. I attached the stacked layers in the following images:

Destination IP is 172.60.3.154 enter image description here

Destination IP is 8.8.8.8 enter image description here

Also, we know that to handle GTP packets, a GTP tunnel is required to listen to UDP port 2152. To do that, we use libgtpnl (osmocome project) and to establish a GTP tunnel, at first, we have to create a GTP interface using the following command of libgtpnl:

gtp-link add gtp1 --sgsn

where gtp1 is interface name. After executing the above command, we use netstat to display network connections and here is the result:

enter image description here

and every thing is OK. Finally, we add GTP tunnel using the following command of libgtpnl:

gtp-tunnel add gtp1 v1 100 1 10.250.0.114 172.60.3.154

where v1 is GTP version, 100 is the gTP-TEI field in RAB-Assignment Request (GTP tunnel configurations which is sent from core to HNB) and 1 is the similar filed obtained from RAB-Assignment Response (GTP tunnel configurations which is sent from HNB to core). Also, 10.250.0.114 is the MS IP and 172.60.3.154 is the core IP.

After receiving some packets from MS to core and using netstat, we see that Recv-Q (bytes in UDP port 2152 which are ready to read) is increased to a value more than 0, but the added GTP tunnel is not read the GTP packets and the gtp1 interface which we already added is empty in wireshark. What is the problem that GTP packets are not inserted in my GTP tunnel (gtp1)?

1 Answers

You want to handle GTP-U packets so your test machine is GGSN rather than SGSN, thus your git-link command is not correct, the parameter "--sgsn" must be removed.

The commands of libgtpnl on SGSN and GGSN are as similar as below:

SGSN:

gtp-link add gtp1 --sgsn
gtp-tunnel add gtp1 v1 100 200 1.1.1.1 2.2.2.10

GGSN:

gtp-link add gtp1
gtp-tunnel add gtp1 v1 200 100 1.1.1.1 2.2.2.2

2.2.2.2 is IP address of SGSN node

2.2.2.10 is IP address of GGSN node

1.1.1.1 is IP address of user/terminal

Related