Giter Club home page Giter Club logo

upf's Introduction

free5GC-UPF

Get Started

Prerequisites

Libraries used in UPF

sudo apt-get -y update
sudo apt-get -y install git gcc g++ cmake go libmnl-dev autoconf libtool libyaml-dev
go get github.com/sirupsen/logrus

Linux kernel module 5G GTP-U (Linux kernel version = 5.0.0-23-generic or version >= 5.4)

git clone https://github.com/free5gc/gtp5g.git
cd gtp5g
git checkout v0.3.2
make
sudo make install

Build

mkdir build
cd build
cmake ..
make -j`nproc`

Test

cd build/bin
./testutlt

Edit configuration file

After building from sources, edit ./build/config/upfcfg.yaml

Setup environment

[Option 1] Set up when reboot

  • (Must) IPv4 forwarding
# Uncomment lines under /etc/sysctl.conf as below
net.ipv4.ip_forward=1
  • (Recommend) Forwarding chain in iptables can forward packet
sudo apt install iptables-persistent netfilter-persistent
sudo iptables -A FORWARD -j ACCEPT
sudo netfilter-persistent save
sudo systemctl enable netfilter-persistent
sudo systemctl restart netfilter-persistent
  • (Recommend) Close ubuntu firewall
sudo systemctl stop ufw
sudo systemctl disable ufw
  • (Optional) Using NAT for UE to access data network
sudo apt install iptables-persistent netfilter-persistent
sudo iptables -t nat -A POSTROUTING -o <DN_Interface_Name> -j MASQUERADE
sudo netfilter-persistent save
sudo systemctl enable netfilter-persistent
sudo systemctl restart netfilter-persistent

[Option 2] Set up in runtime

# (Must) IPv4 forwarding
sudo sysctl -a | grep forward        # check sys rule
sudo sysctl -w net.ipv4.ip_forward=1

# (Recommend) Forwarding chain in iptables can forward packet
sudo iptables -A FORWARD -j ACCEPT

# (Recommend) Close ubuntu firewall
sudo systemctl stop ufw
sudo systemctl disable ufw

# (Optional) Using NAT for UE to access data network
sudo iptables -t nat -A POSTROUTING -o <DN_Interface_Name> -j MASQUERADE

Run

cd build
sudo -E ./bin/free5gc-upfd

To show usage: ./bin/free5gc-upfd -h

Clean the Environment (if needed)

Remove POSIX message queues

ls /dev/mqueue/
rm /dev/mqueue/*

Remove gtp devices

sudo ip l del upfgtp

upf's People

Contributors

free5gc-org avatar matsumu-y avatar muthuramanecs03g avatar ryuichinamba-fj avatar edingroot avatar chuchuuu avatar kishiguro avatar louisroyer avatar susumu-yamazaki avatar calee0219 avatar frankie88888 avatar parkjop avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.