0% found this document useful (0 votes)
17 views5 pages

5G Workshop Commands - NextEPC Part - HackMD

Uploaded by

Herve ngeleka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views5 pages

5G Workshop Commands - NextEPC Part - HackMD

Uploaded by

Herve ngeleka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

20180914_5G Workshop Commands - NextEPC part - HackMD https://hackmd.io/@AN4J0hQ9SaGjRxVsuG1fwg/ryWBaxU6Om?typ...

20180914_5… 

1 sur 5 23-12-24, 11:58


20180914_5G Workshop Commands - NextEPC part - HackMD https://hackmd.io/@AN4J0hQ9SaGjRxVsuG1fwg/ryWBaxU6Om?typ...

sudo apt-get -y install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils


sudo adduser `id -un` libvirtd
sudo virsh list --all

sudo apt-get install virt-manager


sudo virt-manager

 Install Mongo DB

sudo apt-get update


sudo apt-get -y install mongodb
sudo systemctl start mongodb

 Set TUN device

ls -al /dev/net/tun

If it is not "crw-rw-rw- 1 root 28 10, 200 Feb 11 05�13 /dev/net/tun", then

chmod 666 /dev/net/tun

 Write the configuration file for the TUN deivce

sudo sh -c "cat << EOF > /etc/systemd/network/99-nextepc.netdev


[NetDev]
Name=pgwtun
Kind=tun
EOF"

 Create the TUN device

2 sur 5 23-12-24, 11:58


20180914_5G Workshop Commands - NextEPC part - HackMD https://hackmd.io/@AN4J0hQ9SaGjRxVsuG1fwg/ryWBaxU6Om?typ...

sudo systemctl enable systemd-networkd


sudo systemctl restart systemd-networkd
sudo apt-get -y install net-tools
ifconfig pgwtun

 Check IPv6 Kernel Configuration

sysctl -n net.ipv6.conf.pgwtun.disable_ipv6
(if the output is 0 and IPv6 is enabled, skip the following 2 lines)
sudo sh -c "echo 'net.ipv6.conf.pgwtun.disable_ipv6=0' > /etc/sysctl.d/30-nextepc.conf"
sudo sysctl -p /etc/sysctl.d/30-nextepc.conf

 Set the IP address on TUN device

sudo sh -c "cat << EOF > /etc/systemd/network/99-nextepc.network


[Match]
Name=pgwtun
[Network]
Address=45.45.0.1/16
Address=cafe::1/64
EOF"

sudo systemctl enable systemd-networkd


sudo systemctl restart systemd-networkd
ifconfig pgwtun

 Install the necessary packages �15x packages)

sudo apt-get -y install autoconf libtool gcc pkg-config git flex bison libsctp-dev libgnutls28-dev libgcr

 Git clone and compile

git clone https://github.com/acetcom/nextepc


cd nextepc
autoreconf -iv
./configure --prefix=`pwd`/install
make -j `nproc`
make install

 Verify the installation

./test/testepc

3 sur 5 23-12-24, 11:58


20180914_5G Workshop Commands - NextEPC part - HackMD https://hackmd.io/@AN4J0hQ9SaGjRxVsuG1fwg/ryWBaxU6Om?typ...

 Install npm and Nodejs for webui to control HSS database

sudo apt-get -y install curl


curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get -y install nodejs

cd webui
npm install

 Run WebUI

npm run dev

 Add new user to HSS database

Connect to http://localhost:3000/
Account: admin / Password: 1423
Click “+” buttion
Fill the K/OPc/IMSI and click “Save”

SIM card Information

IMSI� 208930000000003
OPc: 8e27b6af0e692e750f32667a3b14605d
K� 8baf473f2f8fd09487cccbd7097c6862

 Modify the configuration of NextEPC

gedit ./install/etc/nextepc/nextepc.conf

4 sur 5 23-12-24, 11:58


20180914_5G Workshop Commands - NextEPC part - HackMD https://hackmd.io/@AN4J0hQ9SaGjRxVsuG1fwg/ryWBaxU6Om?typ...

 Set the rule for forwading packets from NextEPC to Internet

sudo ifconfig ens38 192.188.2.2


sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
sudo iptables -t nat -A POSTROUTING -o ens33 -j MASQUERADE
sudo iptables -I INPUT -i pgwtun -j ACCEPT

./nextepc-epcd

5 sur 5 23-12-24, 11:58

You might also like