aligungr / UERANSIM

Open source 5G UE and RAN (gNodeB) implementation.
GNU General Public License v3.0
758 stars 316 forks source link

[Question] Does UERANSIM support different networks for N1/N2 and N3 #218

Open fimal opened 3 years ago

fimal commented 3 years ago

Hey, Thanks a lot for sharing this project!

I tried to test splitted solution, where UERANSIM installed on different VM than 5GC. In my case, I'm using free5gc in K8S and I'm using diffrent network interfaces to connect to AMF and UPF. Configuration of UERANSIM only supports to configure one host for N1 and N3 interfaces afaik, therefore, in my case, the same inteface which was used to connect to AMF for signaling part, trying to open GTPU to UPF on N3 interface and fail. Is it any option to define to UERANSIM to use other ip address for GTPuIF ? Is it may be in your planning/roadmap? Thanks in advance

aligungr commented 3 years ago

@fimal Indeed gNB doesn't have a configuration for N3 interface. UPF IP address is delivered by AMF inside of "PDU Session Resource Setup Request Transfer" message.

Therefore UERANSIM can use different IP addresses for N2 and N3 interfaces, but only if AMF gives that different IP address to gNB. I think it can be configured at core network side. But no additional action is required at UERANSIM side.

fimal commented 3 years ago

Hey, Thanks for fast response. Unfortunetly, this is not happen like you stated. UERANSIM is continueing to use N1 interface IP also for GTPU trafic to UPF. My N1 net to AMF is 172.16.10.x and N3 to UPF is 192.168.10.x. I'm attaching diagramm and capture for better understanding. thanks in advance. Eventhough UERANSIM recieving in "PDU Session Resource Setup Request Transfer" message UPF GTPU address from 192.168.10.x net, UERANSIM continue to use 172.16.10.x net for GTPU and not local interface on 192.168.10.x net.

routing table in UERANSIM: UERANSIM: GTPUif:192.168.10.32 ; SCTPif:172.16.10.32 UPF: GTPUif:192.168.10.20 ; AMF SCTPif:172.16.10.11

xxx@UERANSIM:~/UERANSIM$ ip route get 192.168.10.20 192.168.10.20 dev ens192 src 192.168.10.32 uid 1000 cache xxx@UERANSIM:~/UERANSIM$ ip -d route unicast default via 10.195.5.1 dev ens160 proto static scope global unicast 10.195.0.0/16 dev ens160 proto kernel scope link src 10.195.5.186 unicast 60.60.0.0/28 dev ens192 proto kernel scope link src 60.60.0.6 unicast 172.16.10.0/24 dev ens192 proto kernel scope link src 172.16.10.32 unicast 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown unicast 192.168.10.0/24 dev ens192 proto kernel scope link src 192.168.10.32

wrong_gtpu_if.zip

aligungr commented 3 years ago

It looks like I misunderstand your question, sorry.

UPF remote IP is obtained from AMF, but gNB's own IP address is always taken from the config file (gnb.yaml->host) which is the same for N2 and N3.

This feature is now in roadmap. Planning to provide a configuration for this purpose in the next release of UERANSIM.

fimal commented 3 years ago

Thanks a lot!

aligungr commented 3 years ago

See v2.1.1

fimal commented 3 years ago

Hey, It is very impressive! Thanks a lot, I just confirmed, for my setup it works as expected.