TestNon3GPP network interface help


I am struggling to figure out how to configure my IPSec interface for a successful TestNon3GPP test.

I’m using free5gc-compose (docker setup) with the following:

  • N3IWF IP address:

And here’s my config setup in the non3gpp_test.go file for the test:

  • n3iwfInfo_IPSecIfaceAddr = “”
  • n3ueInfo_IPSecIfaceAddr = “”
  • n3ueInfo_SmPolicy_SNSSAI_SST = “1”
  • n3ueInfo_SmPolicy_SNSSAI_SD = “010203”
  • n3ueInfo_IPSecIfaceName = “veth3”
  • n3ueInfo_XfrmiName = “ipsec”
  • n3ueInfo_XfrmiId = uint32(1)
  • n3ueInfo_GreIfaceName = “gretun”
  • ueInnerAddr = new(net.IPNet)

Can someone explain to me what “n3iwfInfo_IPSecIfaceAddr” and “n3ueInfo_IPSecIfaceAddr” should be set to? I see by default they are set to and respectively. However, when I run these default parameters, my TestNon3GPP test script is unable to communicate with the N3IWF.

Are there updated instructions on properly configuring routing for the N3IWF and TestNon3GPP?


The test script will create one namespace for the UE in the TestNon3GPP test. n3iwfInfo_IPSecIfaceAddr represents the Nwu interface IP address (IKE) on the N3IWF; it is set in the function setupN3ueEnv. And n3ueInfo_IPSecIfaceAddr represents the UE’s address, which connects to n3iwf; it’s also set in the setupN3ueEnv. So if you want to modify it, you should modify setupN3ueEnv in the test script too.

If you only want to test, you don’t need to execute Docker Compose and don’t need to set the IP. When you run ./test.sh TestNon3GPP, the script will set up the environment for the n3iwf and n3ue.

@Jerry I only tried the Docker Compose method because the normal ./test.sh TestNon3GPP does not work.

Let me try restarting from scratch.

I have created a new install on a fresh computer as defined here: Index - free5GC

When doing so, the ./test.sh uses n3iwfcfg.test.yaml, which tries to find the AMF at However, the amfcfg.yaml sets the AMF ip address to

I cannot figure out what all needs to be changed for the TestNon3GPP test to actually pass.

Hello, so you execute the TestNon3GPP test in the n3iwf container? Can you describe your setting in detail? And please provide the complete log. Thank you.

Thanks for the response Jerry.

The free5GC-compose doesn’t have test scripts that I can find. So I have my core running in docker, and I’m running the ./test.sh TestNon3GPP outside my containers on the same computer. Do you know of an easier way to do this?

Here is my computer’s ifconfig (outside a container):

user:~/free5gc-compose$ ifconfig
br-free5gc: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet  netmask  broadcast

enp89s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast

And here is my N3IWF ifconfig:

user@user-NUC11BTMi9:~$ docker exec -it n3iwf ifconfig
eth0      Link encap:Ethernet  HWaddr 02:42:0A:64:C8:0F  
          inet addr:  Bcast:  Mask:

ipsec0    Link encap:UNSPEC  HWaddr 0A-64-C8-0F-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:  Mask:
          UP RUNNING NOARP  MTU:1480  Metric:1

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          UP LOOPBACK RUNNING  MTU:65536  Metric:1

xfrmi-default Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:  Mask:
          UP RUNNING NOARP  MTU:1500  Metric:1

Based on what you said about n3ueInfo_IPSecIfaceAddr, I’ve tried changing n3ueInfo_IPSecIfaceAddr to my br-free5gc IP (, but when I do that, it is unable to communicate with the N3IWF.

Are there any routes I need to manually configure? I’m just trying to get TestNon3GPP to run successfully using ANY setup right now.


Resolving this post.

I started over from scratch and running ./test.sh TestNon3GPP passes without any config file changes at all. Overall my only guess was an incompatibility with my kernel version.

Ultimately I followed these steps: Index - free5GC

Specifically I did this:

  • Created a new VM with Ubuntu 20.04 OS. Specifically I installed Ubuntu ARM64 server 20.04. After installation I installed desktop GUI using sudo apt install ubuntu-desktop
  • Ensured my kernel was on version 5.4.x as recommended in 2 config vm en - free5GC . In my case my kernel is 5.4.0-169-generic