5. Testing UERANSIM against free5GC - anhtien17/free5GC GitHub Wiki
free5gc
VM
1. Run on -
Run network setting (must do everytime rebooting):
sudo sysctl -w net.ipv4.ip_forward=1 sudo iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE sudo systemctl stop ufw sudo iptables -I FORWARD 1 -j ACCEPT
-
Run
free5gc
:cd ~/free5gc ./run.sh
At this time free5GC has been started.
ueransim
VM
2. Run on -
Open a Terminal 1, execute
nr-gnb
and leave it running:cd ~/UERANSIM sudo build/nr-gnb -c config/free5gc-gnb.yaml
-
Open a Terminal 2, execute
nr-ue
and leave it running:cd ~/UERANSIM sudo build/nr-ue -c config/free5gc-ue.yaml
-
Open a Terminal 3,
ping 192.168.31.101
to seefree5gc
is alive. Then, useifconfig
to see if the tunneluesimtun0
has been created (by nr-ue). -
Ping
google.com
via the tunneluesimtun0
to test the connection to the internet via 5G core network.ping -I uesimtun0 google.com
If
ping
gets replies, thenfree5GC
is running properly. Congratulations!