Reallocation of released IP address for UE

Hello,

I was wondering if it is possible to reuse IP address which was released from UE again.

My UE was first assigned to 60.60.0.1 but after I disconnect and reconnect, it started to use 60.60.0.2.
I was expecting same IP being used.

Are there any config to behave like that ?
If not, will the used IP become useable after certain minute or so?

I’m using free5gc v3.0.6.
I would appreciate it if you could let me know.

Hello,

When I tried it again after adjusting the size of the IP pool and so on, IP reusing seems working as I expected.

However, I found that IP release was sometimes failed.
IP address which wasn’t released wouldn’t return to the pool even after the UE begin to use new one.

When this happens, following error log is seen in AMF logs.

[ERRO][AMF][GMM][AMF_UE_NGAP_ID:1] state mismatch: receieve gmm message[message type 0x45] at Deregistered state

Is there any way to release the IP address, and make it reusable?
I tried to find the cause of this error from message type, but I couldn’t find it.

I appreciate for your help.

If there are dynamic ip left in the ip pool, it will be .1, .2, .3 in order, and when it is used up, it will allocate the smallest of the released ip.
For example, there are only 60.60.0.1 and 60.60.0.2 in the ip pool. If 60.60.0.1 is released, the next time will be allocated 60.60.0.2 when it is connected , if 60.60.0.2 is released, and it will be allocated 60.60.0.1 when it is connected again.

Please give the entire log and pcap so that we can debug more easily , thanks.

Hello @allen00991,

Thank you for your response.
I understood that the IP addresses will be reused.

However, I found that the IP address release sometimes fails.
Here is part of my SMF logs.

2022-03-11T06:47:49Z [INFO][SMF][PduSess] UE[imsi-208930000000001] PDUSessionID[1] Release IP[60.60.0.5]
2022-03-11T06:47:49Z [DEBU][SMF][CTX] [{60.60.0.6 - 60.60.0.14}->{60.60.0.1 - 60.60.0.5}]
2022-03-11T06:48:03Z [DEBU][SMF][CTX] check start UEIPPool(60.60.0.0/28)
2022-03-11T06:48:03Z [INFO][SMF][CTX] Allocated UE IP address: 60.60.0.6
2022-03-11T06:48:09Z [INFO][SMF][PduSess] UE[imsi-208930000000001] PDUSessionID[1] Release IP[60.60.0.6]
2022-03-11T06:48:09Z [DEBU][SMF][CTX] [{60.60.0.7 - 60.60.0.14}->{60.60.0.1 - 60.60.0.6}]
2022-03-11T06:48:30Z [DEBU][SMF][CTX] check start UEIPPool(60.60.0.0/28)
2022-03-11T06:48:30Z [INFO][SMF][CTX] Allocated UE IP address: 60.60.0.7
2022-03-11T06:49:02Z [DEBU][SMF][CTX] check start UEIPPool(60.60.0.0/28)
2022-03-11T06:49:02Z [INFO][SMF][CTX] Allocated UE IP address: 60.60.0.8
2022-03-11T06:49:06Z [INFO][SMF][PduSess] UE[imsi-208930000000001] PDUSessionID[1] Release IP[60.60.0.8]
2022-03-11T06:49:06Z [DEBU][SMF][CTX] [{60.60.0.9 - 60.60.0.14}->{60.60.0.1 - 60.60.0.6}->{60.60.0.8 - 60.60.0.8}]

From 60.60.0.1 to 60.60.0.6, IP address release was succeeded as I expected.
But 60.60.0.7 seems not released and it didn’t return to the IP Pool.
I guessed so since the pool information is diveded .

2022-03-11T06:49:06Z [DEBU][SMF][CTX] [{60.60.0.9 - 60.60.0.14}->{60.60.0.1 - 60.60.0.6}->{60.60.0.8 - 60.60.0.8}]

At the same timing, AMF shows error log like below.

2022-03-11T06:48:50Z [ERRO][AMF][GMM][AMF_UE_NGAP_ID:15] state mismatch: receieve gmm message[message type 0x45] at Deregistered state

Is there any way to release the IP address, and make it reusable?
I would appreciate if you have any information.