OpenAirInterface Core Network Docker Deployment : Generating Traffic |
I will not explain here:
- how to start/stop EPC nor
- how to start/stop eNB or gNb nor
- how to attach an UE
Once your UE is attached, you can either see if you have internet connection.
YOUR_DNS_IP_ADDRESS shall have a correct value.
from your EPC Docker Host:
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.21.179 0.0.0.0 UG 300 0 0 ens3
...
In this example, the DNS IP address is 192.168.21.179
.
In the docker-compose.yml
file:
DEFAULT_DNS_IPV4_ADDRESS: 192.168.21.179
DEFAULT_DNS_SEC_IPV4_ADDRESS: 8.8.4.4
In the docker-compose.yml
file:
NETWORK_UE_NAT_OPTION: 'yes'
In the docker-compose.yml
file:
PUSH_PROTOCOL_OPTION: 'yes'
But us for testing purposes (not use our Internet bandwidth) we prefer to manage traffic internally.
$ cd openair-epc-fed
$ cd ci-scripts
$ docker build --target trf-gen --tag trf-gen:production --file Dockerfile.traffic.generator.ubuntu18.04 .
$ docker image prune --force
$ docker image ls
trf-gen production bfdfe4e7ac51 1 minute ago 217MB
$ docker run --privileged --name prod-trf-gen --network prod-oai-public-net -d trf-gen:production
$ SPGWU_IP=`docker inspect --format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" prod-oai-spgwu-tiny`
$ docker exec -it prod-trf-gen /bin/bash -c "ip route add 12.1.1.0/24 via ${SPGWU_IP} dev eth0"
$ docker exec -it prod-trf-gen /bin/bash -c "ping -c 20 12.1.1.2"
Depending on the iperf
version that is installed on your UE, use:
$ docker exec -it prod-trf-gen /bin/bash -c "iperf --version"
iperf version 2.0.10 (2 June 2018) pthreads
$ docker exec -it prod-trf-gen /bin/bash -c "/iperf-2.0.5/bin/iperf --version"
iperf version 2.0.5 (08 Jul 2010) pthreads