<h1>TEEP : Installation Free5GC & UERANSIM</h1> <h2> 1. Free5GC Installation </h2> <h3> check and change kernel version </h3> ```bash uname -r ```  the version must be 5.4.0-89 ```bash sudo apt-get install linux-headers-5.4.0-89-generic linux-image-5.4.0-89-generic linux-modules-5.4.0-89-generic linux-modules-extra-5.4.0-89-generic linux-tools-5.4.0-89-generic sudo update-grub sudo reboot ``` Go to Booting mode by press esc  choose advance option  choose 5.4.0-89-generic  <h3> Installing Golang </h3> Check Go version ```bash go version ``` if there is another version Go, remove the Go ```bash sudo rm -rf <go path> ``` installing Go ```bash wget https://dl.google.com/go/go1.18.10.linux-amd64.tar.gz sudo tar -C /usr/local -zxvf go1.18.10.linux-amd64.tar.gz mkdir -p ~/go/{bin,pkg,src} #The following assume that your shell is bash: echo 'export GOPATH=$HOME/go' >> ~/.bashrc echo 'export GOROOT=/usr/local/go' >> ~/.bashrc echo 'export PATH=$PATH:$GOPATH/bin:$GOROOT/bin' >> ~/.bashrc echo 'export GO111MODULE=auto' >> ~/.bashrc source ~/.bashrc ``` but in my case the Go path was in `/usr/bin/go` <h3> Installing MongoDB </h3> ```bash sudo apt -y update sudo apt -y install mongodb wget git sudo systemctl start mongodb ``` <h3> User-plane Supporting Packages </h3> ```bash sudo apt -y update sudo apt -y install git gcc g++ cmake autoconf libtool pkg-config libmnl-dev libyaml-dev ``` <h3> Linux Host Network Settings </h3> ```bash sudo sysctl -w net.ipv4.ip_forward=1 sudo iptables -t nat -A POSTROUTING -o <dn_interface> -j MASQUERADE sudo iptables -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1400 sudo systemctl stop ufw sudo systemctl disable ufw # prevents the firewall to wake up after a OS reboot ``` in my case it is `ens03`  <h3> Installing Control Plane </h3> ```bash cd ~ git clone --recursive -b v3.3.0 -j `nproc`https://github.com/free5gc/free5gc.git ``` installing AMF : ```bash cd ~/free5gc make amf ``` <h3> Installing User Plane </h3> retrieve the 5G GTP-U ```bash git clone -b v0.8.3 https://github.com/free5gc/gtp5g.git cd gtp5g make sudo make install ``` build the UPF ```bash cd ~/free5gc make upf ``` <h3> Installing WebConsole </h3> installing package for webconsole ```bash sudo apt remove cmdtest sudo apt remove yarn curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt update sudo apt install -y nodejs yarn ``` build webconsole ```bash cd ~/free5gc make webconsole ``` how to open webconsole Free5GC ```bash cd ~/free5gc/webconsole/frontend yarn start ```  username : admin password : free5gc <h2> 2. Installing UERANSIM </h2> install required package for UERANSIM ```bash sudo apt update sudo apt upgrade ``` ```bash sudo apt install make sudo apt install g++ sudo apt install libsctp-dev lksctp-tools sudo apt install iproute2 sudo snap install cmake --classic ``` clone UERANSIM git and build ```bash cd ~ git clone https://github.com/aligungr/UERANSIM cd UERANSIM git checkout 3a96298 make ```  <h2> 3. End to End Testing </h2> <h3> Setting Free5GC </h3> 1. Setting AMF ```bash cd ~/flexric/config sudo nano amfcfg.yaml ``` Replace ngapIpList IP from 127.0.0.1 to <ip free5GC> :  2. setting SMF ```bash sudo nano smfcfg.yaml ``` Replace ngapIpList IP from 127.0.0.1 to <ip free5GC> :  3. setting UPF ```bash sudo nano upfcfg.yaml ``` Replace addr IP from 127.0.0.1 to <ip free5GC> :  <h3> Setting UERANSIM </h3> ```bash cd ~/UERANSIM/config sudo nano free5gc-gnb.yaml ``` 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up