Skip to content

Conversation

@louisroyer
Copy link
Contributor

@louisroyer louisroyer commented Jul 17, 2025

This PR adds N2 handover procedure. You can trigger the handover using the nr-cli subcommand handover <UE-ID> <gNBTargetID> on the source gNB.

For example, to do a handover from gNB1 to gNB2:

gNB1$ nr-cli $(nr-cli --dump)                                                                                                                                                                                                                           
--------------------------------------------------------------------------------------------                                                                                                                                                                                     
$ ue-list                                                                                                                                                                                                                                                                        
- ue-id: 1                                                                                                                                                                                                                                                                       
  ran-ngap-id: 1                                                                                                                                                                                                                                                                 
  amf-ngap-id: 2                                                                                                                                                                                                                                                                 
--------------------------------------------------------------------------------------------                                                                                                                                                                                     
$ handover 1 2                                                                                                                                                                                                                                                                   
Requesting Handover procedure for UE[1] on NG-RAN-ID: 2                                                                                                                                                                                                                          
--------------------------------------------------------------------------------------------                                                                                                                                                                                     
$ ue-list                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                 
--------------------------------------------------------------------------------------------   
gNB2$ nr-cli $(nr-cli --dump)                                                                                                                                                                                                                           
--------------------------------------------------------------------------------------------
$ ue-list  
- ue-id: 2
  ran-ngap-id: 2
  amf-ngap-id: 2

We tested the N2 handover procedure using Free5GC version 4.0.1; we also found and fixed a bug in Free5GC's AMF. To test the pull request, make sure to apply this patch in your AMF first.

Data forwarding is not yet implemented, but could be added in a second time.

This project was initiated in 2023 by @mamadou-89 and was finalized by @Sid-Romero this year as part of their internships at IRIT, and I’d like to thank them again for their good work.

Co-authored-by: mamadou <mamadoudjibo22@gmail.com>
Co-authored-by: Sid-Romero <sidya.b18@gmail.com>
@aligungr
Copy link
Owner

aligungr commented Aug 6, 2025

Wow, that's a good one.

I appreciate your work @mamadou-89 @Sid-Romero @louisroyer

Would you like to provide some documentations and example usages, so that I can update the wiki page?

Also please confirm that you guys successfully tested all existing features again with and without the new handover feature. Unfortunately I am currently unable to perform the required tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants