Run

A. Run the Core Network

Option 1. Run network function services individually. For example, to run the AMF:

cd ~/free5gc
./bin/amf

Note: The N3IWF needs specific configuration, which is detailed in section B.

Option 2. Run whole core network

cd ~/free5gc
./run.sh

B. Run the N3IWF (Individually)

To run an instance of the N3IWF, make sure your system is equipped with three network interfaces: the first connects to the AMF, the second connects to the UPF, and the third is for IKE daemon.

Configure each interface with a suitable IP address.

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 the N3IWF (root privilege is required):

cd ~/free5gc/
sudo ./bin/n3iwf

C. Run all-in-one with external RAN

Refer to this sample config if you wish to connect an external RAN with a complete free5GC core network.

D. Deploy within containers

free5gc-compose provides a sample for the deployment of elements within containers.