open5gs / open5gs

Open5GS is a C-language Open Source implementation for 5G Core and EPC, i.e. the core network of LTE/NR network (Release-17)
https://open5gs.org
GNU Affero General Public License v3.0
1.84k stars 761 forks source link

ngap failure on N2 with UERANSIM gNB #905

Closed francescomenichella closed 3 years ago

francescomenichella commented 3 years ago

I tried to setup a gNB with UERANSIM. UERANSIM and open5GS both on a VM with Ubuntu. ./build/tests/app/app works well and all the 5G and 4G NEs are up and running. No changes in pre-defined IP addresses and mcc/mnc set in each config file as 001/01

_"In UERANSIM, AMF address is set accordingly with open5GS AMF settings: linkIp: 127.0.0.1 # gNB's local IP address for Radio Link Simulation (Usually> ngapIp: 127.0.0.5 # gNB's local IP address for N2 Interface (Usually same wit> gtpIp: 127.0.0.7 # gNB's local IP address for N3 Interface (Usually same wit>

List of AMF address information

amfConfigs:

with build/nr-gnb -c config/open5gs-gnb.yaml

I see: "[2021-04-01 14:36:33.095] [sctp] [info] Trying to establish SCTP connection... (127.0.0.5:38412) [2021-04-01 14:36:33.099] [sctp] [info] SCTP connection established (127.0.0.5:38412) [2021-04-01 14:36:33.099] [sctp] [debug] SCTP association setup ascId[46] [2021-04-01 14:36:33.099] [ngap] [debug] Sending NG Setup Request [2021-04-01 14:36:33.100] [ngap] [error] NG Setup procedure is failed. Cause: misc/unknown-PLMN "

Is it a consisten error cause? Even if I use mcc/mnc 901/70 I see always the same error.

nickvsnetworking commented 3 years ago

Can you please share your AMF config? Cause: misc/unknown-PLMN is almost always due to the wrong PLMN being configured in the AMF. (Keep in mind you need to restart the AMF after changing this value).

francescomenichella commented 3 years ago

hi Nick, here you are the last one. I tried with also with 901 and 70 (changing them accordingly also in gNb config...

[...] amf: sbi:

Sabbir89 commented 3 years ago

Hi, A quick note: Please be sure that you have to make all the config files same (amf, gnb, and ue). Most importantly, if you see the S_NSSAI field you might see there is 'sd' field enabled in gnb config file of UERANSIM. Please comment that or add this into 'AMF' file.

BR, Sabbir

francescomenichella commented 3 years ago

thank you. Previously I added sd also in AMF but always with 001/01 and failed I tried to coming back on original config and I put again 901/70 (it should work also with 001/01), After this I commented sd and ngap now is set up. Probably in adding sd I made some sintax error.

thank you!