Open source 5G core network

栏目: IT技术 · 发布时间: 4年前

内容简介:There are no gNB and UE for standalone 5GC available in the market yet.

Open source 5G core network

Table of Contents

  • Recommended Environment
    • B. Install Control Plane Entities
    • C. Install User Plane Function (UPF)
    • B. Run N3IWF (Individually)

Hardware Tested

There are no gNB and UE for standalone 5GC available in the market yet.

Questions

For questions and support please use the official forum . The issue list of this repo is exclusively for bug reports and feature requests.

Recommended Environment

  • Software
    • OS: Ubuntu 18.04
    • gcc 7.3.0
    • Go 1.12.9 linux/amd64
    • kernel version 5.0.0-23-generic (MUST for UPF)

Note: Please use Ubuntu 18.04 and kernel version 5.0.0-23-generic

You can use go version to check your current Go version.

- Hardware
    - CPU: Intel i5 processor
    - RAM: 4GB
    - Hard drive: 160G
    - NIC card: 1Gbps ethernet card

- Hardware recommended
    - CPU: Intel i7 processor
    - RAM: 8GB
    - Hard drive: 160G
    - NIC card: 10Gbps ethernet card

Installation

A. Pre-requisite

  1. Required kernel version 5.0.0-23-generic . This request is from the module gtp5g that we has used. Any more details please check here

    # Check kernel version
    $ uname -r
    5.0.0-23-generic
  2. Require go language

    • If another version of Go is installed
      • Please remove the previous Go version
        • sudo rm -rf /usr/local/go
      • Install Go 1.12.9
        wget https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz
        sudo tar -C /usr/local -zxvf go1.12.9.linux-amd64.tar.gz
    • Clean installation
      • Install Go 1.12.9
        wget https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz
        sudo tar -C /usr/local -zxvf go1.12.9.linux-amd64.tar.gz
        mkdir -p ~/go/{bin,pkg,src}
        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=off' >> ~/.bashrc
        source ~/.bashrc
  3. Required packages for control plane

    sudo apt -y update
    sudo apt -y install mongodb wget git
    sudo systemctl start mongodb
  4. Required packages for user plane

    sudo apt -y update
    sudo apt -y install git gcc cmake autoconf libtool pkg-config libmnl-dev libyaml-dev
    go get -u github.com/sirupsen/logrus
  5. Network Setting

    sudo sysctl -w net.ipv4.ip_forward=1
    sudo iptables -t nat -A POSTROUTING -o <dn_interface> -j MASQUERADE
    sudo systemctl stop ufw

B. Install Control Plane Entities

  1. Clone free5GC project in $GOPATH/src

    cd $GOPATH/src
    git clone --recursive -b v3.0.2 -j `nproc` https://github.com/free5gc/free5gc.git
    cd free5gc

    (Optional) If you want to use the nightly version, runs:

    cd $GOPATH/src/free5gc
    git checkout master
    git submodule sync
    git submodule update --init --jobs `nproc`
    git submodule foreach git checkout master
    git submodule foreach git pull --jobs `nproc`
  2. Run the script to install dependent packages

    cd $GOPATH/src/free5gc
    chmod +x ./install_env.sh
    ./install_env.sh
    
    Please ignore error messages during the package dependencies installation process.

    In step 2, the folder name should remain free5gc. Please do not modify it or the compilation would fail.

  3. Compile network function services in $GOPATH/src/free5gc individually, e.g. AMF (redo this step for each NF), or

    cd $GOPATH/src/free5gc
    go build -o bin/amf -x src/amf/amf.go

    To build all network functions in one command

    ./build.sh

C. Install User Plane Function (UPF)

  1. Please check Linux kernel version if it is 5.0.0-23-generic

    uname -r

    Get Linux kernel module 5G GTP-U

    git clone https://github.com/PrinzOwO/gtp5g.git
    cd gtp5g
    make
    sudo make install
  2. Build from sources

    cd $GOPATH/src/free5gc/src/upf
    mkdir build
    cd build
    cmake ..
    make -j`nproc`

Note: Config is located at $GOPATH/src/free5gc/src/upf/build/config/upfcfg.yaml

Run

A. Run Core Network

Option 1. Run network function service individually, e.g. AMF (redo this for each NF), or

cd $GOPATH/src/free5gc
./bin/amf

Note: For N3IWF needs specific configuration in section B

Option 2. Run whole core network with command

./run.sh

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 $GOPATH/src/free5gc/
sudo ./bin/n3iwf

Test

Start Wireshark to capture any interface with pfcp||icmp||gtp filter and run the tests below to simulate the procedures:

cd $GOPATH/src/free5gc
chmod +x ./test.sh

a. TestRegistration

(In directory: $GOPATH/src/free5gc)
./test.sh TestRegistration

b. TestServiceRequest

./test.sh TestServiceRequest

c. TestXnHandover

./test.sh TestXnHandover

d. TestDeregistration

./test.sh TestDeregistration

e. TestPDUSessionReleaseRequest

./test.sh TestPDUSessionReleaseRequest

f. TestPaging

./test.sh TestPaging

g. TestN2Handover

./test.sh TestN2Handover

h. TestNon3GPP

./test.sh TestNon3GPP

i. TestULCL

./test_ulcl.sh -om 3 TestRegistration

For more details, you can reference to our wiki

Release Note

Detailed changes for each release are documented in the release notes .


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Java核心技术·卷 I(原书第10版)

Java核心技术·卷 I(原书第10版)

[美] 凯.S.霍斯特曼(Cay S. Horstmann) / 周立新 等 / 机械工业出版社 / 2016-9 / CNY 119.00

Java领域最有影响力和价值的著作之一,由拥有20多年教学与研究经验的资深Java技术专家撰写(获Jolt大奖),与《Java编程思想》齐名,10余年全球畅销不衰,广受好评。第10版根据Java SE 8全面更新,同时修正了第9版中的不足,系统全面讲解了Java语言的核 心概念、语法、重要特性和开发方法,包含大量案例,实践性强。 一直以来,《Java核心技术》都被认为是面向高级程序员的经典教......一起来看看 《Java核心技术·卷 I(原书第10版)》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具