Project

General

Profile

Bug #4154

Duplicated PDP context entries

Added by keith about 1 month ago. Updated 17 days ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
openggsn
Target version:
-
Start date:
08/16/2019
Due date:
% Done:

90%

Spec Reference:

Description

Attached file is the result of

show pdp-context ggsn ggsn0

in the vty.

Many duplicate entries can be observed. IMSIs have been changed to XXX, except the last three digits

vty.txt vty.txt 586 KB vty output: show pdp-context ggsn ggsn0 keith, 08/16/2019 02:28 PM
ggsn-pdp-EUA.txt ggsn-pdp-EUA.txt 3.97 KB keith, 09/02/2019 10:57 AM

Related issues

Related to OsmoGGSN (former OpenGGSN) - Bug #4161: Implement pdp idle timerNew08/20/2019

Related to OsmoGGSN (former OpenGGSN) - Bug #4165: osmo-ggsn: implement echo request against osmo-sgsnResolved08/21/2019

History

#1 Updated by keith about 1 month ago

  • File deleted (vty_anon)

#2 Updated by keith about 1 month ago

  • File vty.txt vty.txt added
  • Category set to openggsn
  • Assignee set to pespin

#3 Updated by pespin 30 days ago

  • Status changed from New to In Progress
Some ideas:
  • Do we have a timer to clean stalled pdp ctx in osmo-ggsn?
  • Is recovery procedure in osmo-ggsn working fine when osmo-sgsn crashes? (and is osmo-sgsn sending an increased counter after restarting from a crash?)
  • IP addresses are duplicated: it means ippool side was freed while pdp ctx was kept alive?

keith, Can you share your osmo-ggsn config?

I submitted following patch which would be great to use when trying to reproduce the issue:
https://gerrit.osmocom.org/c/osmo-ggsn/+/15248 ggsn_vty.c: Fix wrong use of in46a_from_eua, print IPv6 euas

#4 Updated by pespin 30 days ago

BTW, in IPv4v6 APNs it is expected that PDP ctx appear repeated once if they have both an IPv4 and IPv6 address:

/* show all (active) PDP contexts within an APN */
static void apn_show_pdp_contexts(struct vty *vty, struct apn_ctx *apn)
{
    ippool_show_pdp_contexts(vty, apn->v4.pool);
    ippool_show_pdp_contexts(vty, apn->v6.pool);
}

#5 Updated by keith 30 days ago

ggsn ggsn0
 gtp state-dir /tmp
 gtp bind-ip 10.23.0.20
 apn internet
  gtpu-mode tun
  tun-device tun4
  type-support v4
  ip prefix dynamic 172.22.0.0/16
  ip dns 0 172.22.0.1
  ip dns 1 67.207.67.2
  ip ifconfig 172.22.0.1/16
  no shutdown
 apn inet6
  gtpu-mode tun
  tun-device tun6
  type-support v6
  ipv6 prefix dynamic 2001:780:44:2000:0:0:0:0/56
  ipv6 dns 0 2001:4860:4860::8888
  ipv6 dns 1 2001:4860:4860::8844
  ipv6 ifconfig 2001:780:44:2000:0:0:0:0/56
  shutdown
 apn inet46
  gtpu-mode tun
  tun-device tun46
  type-support v4v6
  ip prefix dynamic 176.16.46.0/24
  ip dns 0 192.168.100.1
  ip dns 1 8.8.8.8
  ip ifconfig 176.16.46.0/24
  ipv6 prefix dynamic 2001:780:44:2100:0:0:0:0/56
  ipv6 dns 0 2001:4860:4860::8888
  ipv6 dns 1 2001:4860:4860::8844
  ipv6 ifconfig 2001:780:44:2100:0:0:0:0/56
  shutdown
 default-apn internet
 no shutdown ggsn

#6 Updated by pespin 30 days ago

Duplication explained above (v4v6 APNs) should be fixed by:
https://gerrit.osmocom.org/c/osmo-ggsn/+/15253 ggsn_vty.c: Avoid printing duplicates for pdp context with v4v6 EUAs

So in your case (after looking at your config file) it seems all duplication happen on "internet", which is an IPv4-only APN.

Can you make sure in your operations when osmo-sgsn or osmo-ggsn crashes you don't remove the gsn_restart file and can you make sure that number increases after a crash?

#7 Updated by pespin 30 days ago

I submitted some more commits to have more information in VTY "show pdp-context" related commands.

Regarding timers to drop inactive pdp contexts, there seems to be implementations supporting that (cisco, juniper) but I cannot find any information in specs:
https://www.cisco.com/c/en/us/td/docs/ios/12_2/12_2y/12_2yy/ggsn31/31cfg/ggsn31_c/ggsncfg.html
https://www.juniper.net/documentation/en_US/junos-mobility11.2/topics/reference/configuration-statement/idle-timeout-edit-unified-edge-gateways-ggsn-pgw-apn-services-apn.html

#8 Updated by pespin 30 days ago

  • Related to Bug #4161: Implement pdp idle timer added

#9 Updated by pespin 29 days ago

After watching the logs live in the setup, I have a potential fix for it:
https://gerrit.osmocom.org/c/osmo-ggsn/+/15259 libgtp: announce pdp ctx deletion upon CreatePdpCtx being rejected

And ttcn3 related case:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15262

Waiting until keith can give it a try and make sure the issue is fixed.

#10 Updated by pespin 29 days ago

  • Status changed from In Progress to Feedback

#11 Updated by pespin 29 days ago

  • Related to Bug #4165: osmo-ggsn: implement echo request against osmo-sgsn added

#12 Updated by pespin 23 days ago

Once osmo-ggsn.git Id2c84165dc59dff495106758146a701ca488834f is merged (https://gerrit.osmocom.org/c/osmo-ggsn/+/15267), it's time for keith to give a try again and see hoe it behaves.

#13 Updated by keith 22 days ago

ggsn branch pespin/echo is running on the test machine now.
libgtp, sgsn are nightly.

#14 Updated by pespin 22 days ago

I guess libgtp in the host running the pespin/echo ggsn is also from pespin/echo? you'll need that one too.

#15 Updated by pespin 17 days ago

  • Assignee changed from pespin to keith
  • % Done changed from 0 to 90

Assigning to keith, please provide feedback on current status (with related osmo-ggsn/osmo-sgsn versions).

#16 Updated by keith 17 days ago

I will compile from the merged patches and run master now. Just before restarting the GGSN I thought I would capture this current output (attached), as it would seems to confirm that we are now also recycling the IP pool correctly.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)