A. Run Core Network
Option 1. Run network function service individually, e.g. AMF (redo this for each NF), or
cd ~/free5gc ./bin/amf
Note: For N3IWF needs specific configuration in section B
Option 2. Run whole core network with command
B. Run N3IWF (Individually)
To run N3IWF, make sure the machine is equipped with three network interfaces. (one is for connecting AMF, another is for connecting UPF, the other is for IKE daemon)
We need to configure each interface with a suitable IP address.
We have to create an interface for IPSec traffic:
# replace <...> to suitable value sudo ip link add ipsec0 type vti local <IKEBindAddress> remote 0.0.0.0 key <IPSecInterfaceMark>
Assign an address to this interface, then bring it up:
# replace <...> to suitable value sudo ip address add <IPSecInterfaceAddress/CIDRPrefix> dev ipsec0 sudo ip link set dev ipsec0 up
Run N3IWF (root privilege is required):
cd ~/free5gc/ sudo ./bin/n3iwf
Or, you can use free5GC-compose to run free5GC inside the container.