Project

General

Profile

Actions

Bug #4154

closed

Duplicated PDP context entries

Added by keith over 4 years ago. Updated over 2 years ago.

Status:
Closed
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


Files

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 timerNewpespin08/20/2019

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

Actions
Actions #1

Updated by keith over 4 years ago

  • File deleted (vty_anon)
Actions #2

Updated by keith over 4 years ago

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

Updated by pespin over 4 years 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

Actions #4

Updated by pespin over 4 years 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);
}

Actions #5

Updated by keith over 4 years 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

Actions #6

Updated by pespin over 4 years 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?

Actions #7

Updated by pespin over 4 years 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

Actions #8

Updated by pespin over 4 years ago

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

Updated by pespin over 4 years 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.

Actions #10

Updated by pespin over 4 years ago

  • Status changed from In Progress to Feedback
Actions #11

Updated by pespin over 4 years ago

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

Updated by pespin over 4 years 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.

Actions #13

Updated by keith over 4 years ago

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

Actions #14

Updated by pespin over 4 years ago

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

Actions #15

Updated by pespin over 4 years 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).

Actions #16

Updated by keith over 4 years 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.

Actions #17

Updated by keith over 2 years ago

  • Status changed from Feedback to Closed
  • Assignee deleted (keith)

Closing, too old.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)