It seems the N3IWF can’t connect to UPF, here are some relevant logs:
I am using NWu-Non3GPP-5GC to attempt to connect to the N3IWF. The current network setup is:
192.168.33.6
: NWu emulator / UERANSIM UE
192.168.33.5
: free5GC (N3IWF enabled) / UERANSIM gNB
I have tested and successfully established a connection from UERANSIM UE (192.168.33.6
) to UERANSIM gNB (192.168.33.5
) to free5GC (192.168.33.5
). However, when attempting to connect to the N3IWF (192.168.33.5
) using the NWu emulator (192.168.33.6
), N3IWF throws an error trying to connect to the UPF.
Since the error does not occur when the gNB connects to the UPF, I assume the UPF is configured properly. Additionally, since the NWu emulator reaches state 7/7, I assume it is also not configured incorrectly. Therefore, I suspect a mistake in config/n3iwfcfg.yaml
. However, I am not sure where.
config/n3iwfcfg.yaml
:
info:
version: 1.0.5
description: N3IWF initial local configuration
configuration:
N3IWFInformation:
...
# --- N2 Interfaces ---
AMFSCTPAddresses: # the IP list of N2 interfaces (SCTP) on AMF when using NGAP
- IP:
- 192.168.33.5
Port: 38412
NASTCPPort: 20000 # TCP port which the NAS listens on
# --- Nwu Interfaces ---
IKEBindAddress: 192.168.33.5 # Nwu interface IP address (IKE) on this N3IWF
IPSecTunnelAddress: 11.0.0.1 # Tunnel IP address of XFRM interface on this N3IWF
UEIPAddressRange: 11.0.0.0/24 # IP address pool allocated to UE in IPSec tunnel
XFRMInterfaceName: xfrmi # Prefix of XFRM interface name created by N3IWF
XFRMInterfaceID: 1 # XFRM interface if_id for IPSec routing (Any value except to 0, default value is 7 if not defined)
# --- N3 Interfaces ---
GTPBindAddress: 192.168.33.5 # IP address of N3 interface (GTP) on this N3IWF
FQDN: n3iwf.free5gc.org # FQDN of this N3IWF
# --- Security ---
...
logger: # log output setting
enable: true # true or false
level: debug # how detailed to output, value: trace, debug, info, warn, error, fatal, panic
reportCaller: false # enable the caller report or not, value: true or false
I assumed the error is because of GTPBindAddress
; however, I don’t understand what to change it to - the N3 interface connects to the UPF which should be accessible at 192.168.33.5
(I’ve also tried leaving it as 127.0.0.1
which should also work, but I get the same error).
Additionally, I have confirmed that the UPF is in fact accessible at the port mentioned, through sudo netstat -nlp | grep 2152
:
udp 0 0 192.168.33.5:2152 0.0.0.0:* 76032/./bin/upf
If it helps, here is the command I used to run the NWu emulator: (I have confirmed that the arguments match the working free5gc-ue.yaml
file)
sudo python3 nwu_emulator.py -s 192.168.33.6 -d 192.168.33.5 -a internet -I 208930000000003 -M 208 -N 93 -K 8baf473f2f8fd09487cccbd7097c6862 -P 8e27b6af0e692e750f32667a3b14605d -T NWU -F
Please let me know of any other information that may help fix this issue, and thank you so much for the help!