Amarisoft

Out of the Box Test - Internet Access

 

The purpose of this tutorial is to show you how to get access to internet from the UE through Amari Callbox. It is assumed that you don't have any previous experience with Amari callbox.  

Personally I think the Internet Access is one of the best feature for Amarisoft Callbox (eNB/gNB). Of course, most of the other test equipment allow you to get access to Internet, but not as easy as you do with Amarisoft Callbox.  If you get your callbox to any eithernet port that has access to Internet, by default your UE would get access to internet by default.

By detault, as soon as your UE complete the initial attach, your UE would get a local IP address and DNS address (google DNS by default). With those default IP address and DNS, your UE would get access to internet and perform any task/test over the internet, for example, browsing, YouTube, File Download, Speedtest etc.  If you have any network connection to Internet on callbox (whether it is wired LAN or WLAN), it gets automatically configured as the default Gateway for all the UE IP address you configured and the UE would get access to Internet.

Even if the internet setting is automatically configured by default, you can configure it as per your own demand and necessity, for example, setting up your own IP address, using your own DNS etc.  Overall data path and components during internet access is illustrated as below.

OutOfBox Internet Overall Flow 01

NOTE : You can assign IP address to each tun interface as you like in pdn_list: of mme configuration. The default configuration is shown at the section Check Up before trying UE connection

NOTE : In this example diagram, the GTPU is shown to be connected to tun 0, but the connection can be made to other tun during PDN/PDU establishement process.

NOTE : In this example diagram, DNS is specified to 8.8.8.8 (Google DNS), but this can be changed as well in  pdn_list: of of mme configuration.

NOTE : TCP/UDP port number is not shown here because it is automatically set (set differently depending on situation) when those sockets are created.

 

 

Table of Contents

 

 

Test Setup

Test setup for this tutorial is as shown below.

TestSetup Callbox Internet 01

There are several many ways to provide internet access to your CallBox. Followings are some of them I can think of. In this tutorial, I used the Case 4.

TestSetup Callbox Internet 02

If you decided to use Case 2 and Case 3, following tips would be helpful.

Since Amari Callbox is running command line mode of Linux (Fedora or Ubuntu) NOT on GUI , it is not straightforward to enable / connect WiFi.

Followings are some of the command line command you would need to get WiFi connectivity. You may search these commands on internet for the detailed usage.

 

Configuration

You can use any configuration that will assign at least one IP to UE with internet apn. If you just want to try with what I have used in this tutorial, you can do as follows.

Go to the directory /root/enb/config and make a symbolic link as follows. (NOTE : If you are doing the test right out of the box you may not need to do this since this is the default configuration of Amari Callbox, but it is no harm to do this again).

OutOfBox Lte Config 01

Now you should see the enb.cfg file linked to enb.default.cfg as follows.  Here you see enb.cfg is symolically linked to enb.default.cfg. When you run callbox software, eNB and gNB is using the configuration file that is linked to enb.cfg

OutOfBox Lte Config 02

Now go to the directory /root/mme/config. You should see the configuration files as below. Here you see ims.cfg is symolically linked to ims.default.cfg and mme.cfg is symbolically linked to mme-ims.cfg. When you run callbox software, 4G core and 5G core are using the configuration file that is linked to mme.cfg and IMS server is using the configuration file that is linked to ims.cfg

OutOfBox Lte Config 03

If ims.cfg and mme.cfg is not linked to the files as shown above, you may run following commands to make proper link.

"ln -sf mme-ims.cfg mme.cfg" mean 'link mme-ims.cfg to mme.cfg' and "ln -sf ims.default.cfg ims.cfg" mean "link ims.default.cfg to ims.cfg"

OutOfBox Lte Config 04

 

Check Up before trying UE connection

Before you trying internet connection with UE, you need to check several basic things shown in this section and make it sure everything works as shown here, otherwise Internet connection from UE may not work.

Check Up Network Interfaces

Make it sure that the network interface with internet connectivity is up and tun0,1,2,3 are up.  [eno1] is the Network interface that is connected over the WiFi network in my test setup. You may see different name in your setup.  The interface tun0,1,2,3 are network interface crated by Callbox. The IP assigned to these interfaces are configured in /root/mme/config/mme.cfg

NOTE : To get all the interface shown here, you need to run lte service (i.e, service lte restart). Otherwise, you woudn't get tun interfaces shown here. However, you don't have to get any UE connection just for this check up.

TestSetup Callbox Internet CheckUp 01

TestSetup Callbox Internet CheckUp 02

Check Up Routing Table

Check up the routing table on CallBox PC. It would usually be as follows.

NOTE : The gateway Interface name may be different on your system depending on your system configuration. But you should see tun0, tun1, tun2, tun3 as shown below). In this case, the network interface eno1 works as the gateway and tun0,1,2,3 get access to external network (e.g, internet) via eno1.

NOTE : You should get at least one Gateway shown here. Otherwise, UE can exchange IP traffic (e.g ping) between UE and one of the tun0 interfaces, but UE would not get access to internet.

TestSetup Callbox Internet CheckUp 03

Check Up IP table/NAT Table

Especially for UE to connect to external network, make it sure that NAT table is properly set. You can check up the current NAT setting with linux command 'iptables -t nat -L -v -n'. You should see the part marked in the box.

NOTE : If you don't see the configuration high lighted above, try following

Check Up IP forwarding

Even if everything explained above is set as intended, the IP packet from UE would not be able to go through default gateway if ip forwarding is not enabled.  You can check out the current setting for ip forwarding with 'sysctl net.ipv4.ip_forward' command. If it gives 'net.ipv4.ip_forward=1', it mean 'forwarding enabled'. If it gives 'net.ipv4.ip_forward=0', it mean 'forwarding disabled'

NOTE : You can enable the forwarding by running the command 'sysctl -w net.ipv4.ip_forward=1'

Check Up Connectivety between Callbox and External World

Make it sure that the call box can reach a server over the internet. I am checking the connectivity as follows

Try ping to 8.8.8.8. This is google DNS and this is configured as DNS by default in mme.cfg (NOTE : This is very important to check. If you don't get this ping work, you have to troubleshoot this step first. It is more like troubleshooting  PC network setting or internet connection between the PC and outside network. In most cases, this cannot be helped much by Amarisoft because it is most likely a network issue on user side. Each user should figure out to make it work ).

TestSetup Callbox Internet CheckUp 04

NOTE : The fact this ping works does not guarantee that ping from UE to 8.8.8.8 will work. It is minimum condition(necessary condition), but not the sufficient condition for UE getting access to external network. If you have problem with UE getting access to external network (e.g, 8.8.8.8), refer to followings

Try ping to a url to check the DNS is working by ping www.google.com

TestSetup Callbox Internet CheckUp 05

[Optional] you may find the IP address to a specific url and try ping to the server with both in direct IP and url

TestSetup Callbox Internet CheckUp 06

 

Initial Attach and Check up before Internet Connection

Before you trying to connect internet from your UE (DUT), you would suggest you to check up a few things first. Firs thing I would suggest is to disable WiFi on UE, otherwise most of UE would give higher priority to WiFi for data connection than cellular connection. So if WiFi is not disabled, UE would try to connect internet over WiFi instead of celluar network. (NOTE : This behavior would vary depending on UE firmware implementation, but it would be better to disable WiFi for consistency of the test).

OutOfBox Internet InitialAttach 01

Do the initial attach and confirm that UE is connected to Callbox.  The simplest way to check the connectivity would be just to run 't' command and make it sure that you see some traffics.

OutOfBox Internet InitialAttach 02

Once UE connection is confirmed, make it sure that UE is assigned with an IP. Remember the IP assigned to UE for the ping test. (NOTE : This is also very important to get. You should get at least one IP_ADDR is assigned to the UE)

OutOfBox Internet InitialAttach 03

Ping from Callbox to UE and confirm that ping works

OutOfBox Internet InitialAttach 04

 

Trying Ping from UE over Internet

Now let's check on IP connectivity with DNS server. For this test, I have installed an App called Ping on my DUT. You may use any other App that is capable of ping test. First I tried ping to DNS server using IP address and then tried with DNS url. It is confirmed that both trial worked OK indicating that the connection to DNS is OK.

OutOfBox Internet Ping 01

 

Trying Internet from UE

If all of the steps mentioned above confirmed working, you can try with real traffic to the internet. I have tried with three different traffic. First I tried with browsing to amarisoft website, next tried YouTube and then tried with Speedtest on internet. All of these worked fine.

OutOfBox Internet InternetAccess 01

 

Analyzing Traffic with WebGUI

This is optional process. You may skip this section. It is assumed that you are already familiar with how to connect to WebGUI and do basic operation. If you are not familiar with WebGUI setup and basic operation, refer to the tutorial : WebGUI.

WebGUI 01

Select [Throughput] tab to get the plots for throughput. You would see various items on the left panel.  'Global' plots the aggregated throughput of all the UEs connected to a cell. Under the item 'Global', you would see many of numbered items. That number indicates UE ID. By clicking one of those numbered item, you can plot the throughput a specific UE.

OutOfBox Internet WebGUI 02

If you hit on [Slot] button, it would show the statistics (KPI) for each slots. For example, if you hit [Slots] on [Throughput] tab, you will get the throughput for each slot.

OutOfBox Lte Log Analysis 04

If you want to check on radio link quality of the connection, it would be good idea to check how many packets get retransmitted. [TX/RETX] plot shows how many packets are failed to be received by UE and get retransmitted.

OutOfBox Internet WebGUI 03

 

Analyzing IP Traffic

You may not do this kind of analysis often, but there would be some cases where you need to do troubleshooting (e.g, UE getting no internet access) and you need to check IP traffic flow at every check points along the data path. Here I will show you various ways of capturing IP traffic at multiple different check points.

The main purpose of this analysis is to confirm the data path between every check points are properly connected. If there is any of broken check points, internet access would not work properly.

NOTE : IMPORTANT !!!  Before starting this type of analysis, MAKE IT SURE that you checked everything in CHECK UP BEFORE TRYING UE CONNECTION.  If any of those check up is not met, internet connection from UE would not work.

Once you got everything working as described in CHECK UP BEFORE TRYING UE CONNECTION, get UE connected to Callbox (eNB or gNB). Then capture IP packet at every checkpoint marked below. To do this, you need to capture every IP packet flowing outside of the eNB/gNB using Wireshark (or tcpdump) and every IP packets following inside of dNB/gNB using WebGUI.

 

tcpdump

Basically Amarisoft Callbox PC is running on command line mode. You can enable Graphic Mode on Callbox PC(Fedora) and run 'lte service' on a terminal, but this is not strongly recommended due to possible performance issue). A command way to capture the IP packets in this kind of situation is to use tcpdump as shown here. (NOTE : This method is a little cumbersome and you cannot analyze the packet in realtime. So using Wireshark and WebGUI would be faster/easier way)

This is a case showing the case of capturing packets flowing through the interface 'eno1' ('eno1' is the gateway ethernet interface on my callbox. You may have different name on your callbox. Use the appropriate interface name for your callbox PC). You can capture the packet through tun interface (e.g, tun0, tun1 etc) in the same way.

Then make it sure that the file is properly saved as intended. Now you can analyze the file on your local PC with Wireshark.

 

Wireshark

For easier troubleshooting, I would recommend you to ssh to Callbox from GUI based PC (e.g, Ubuntu) and run Wireshark on callbox from the remote PC.  Open a terminal on the PC and run [ssh -X root@callbox_ip] (ssh -X root@10.0.0.185 as an example) and then run wireshark there.

The Wireshark will popup on the local PC, but the wireshark is running on callbox. If you run the wireshark while 'lte service' is running on callbox, you will see all the network interface and tun interfaces (i.e, tun0, 1,2,3 etc). You can select a specific interface to capture the packets or just select [any] and it will capture the packets from every interfaces. In my case, I normally select [any] interface to see all the packets from every interfaces within a single capture.

Once I started the capture, I did the followings

You should be able to all of the traffic flowing outside of eNB/gNB protocol stack in the wireshark log as shown below.

 

WebGUI

If you don't get ping reply from any of the attempt you did above, the first thing you need to check is to see the packet is going through eNB/gNB software stack. You can check it out through WebGUI.

My personal trick for debugging is to collect every elements in ENB, MME even if a certain elements may not be necessary right at the moment (it may help later). You may increase the Max size (data size of log capture) for a elements you are especially interested in. In this case of troubleshooting IP data path, I usually increase the Max size of GTPU as shown below.

Enable the log capture for every elements on ENB and increase GTPU Max size.

Enable the log capture for every elements on MME and increase GTPU Max size.

In most case of IP packet analysis, the first level check point is GTPU. So I set the display filter to GTPU only.

Now I am getting all the GTPU packets. Then make it sure that you see all the ping packets you tried. If you see any discrepencies between wireshark log and the GTPU log shown here, it indicates some connecting point along the data path is broken. Follow through each and every ping packets from wireshark and webGUI log, and identify the broken link if the ping does not go through. It may be tedius but there is no easy / shortcut for this kind of troubleshooting.

 

Tips

 

Throughput Impact with WiFi

If you want to connect the Callbox to Internet over WiFi just for remote control purpose (e.g, ssh to Callbox for regular operation), you may use any kind of WiFi Adaptor or Range Extender as long as I can get successfully connected to the Callbox, but if you want to use it both for remote control and throughput test over internet. You need to consider the factors that may limit the maximum achievable throughput as listed below.

 

Selecting Proper Subnet for WiFi Network

When you want to connect the Callbox or UEsim to WiFi network,  be careful of setting the subnet of your WiFi Network. I would suggest NOT to use the subnet that is possibly used by any of the callbox / UEsim network interface.  If your WiFi network subnet collides with the subnet used by Callbox or UEsim, you may see various strange behavior. In my experience, some of the device in the WiFi network is impacted by the collision. Try to avoid the following subnet for your WiFi network (Most of the WiFi Access Point would allow you change the subnet as you like).

 

Distance between WiFi Access Point and WiFi Range Extender

WiFi Range Extender is designed for extending the WiFi coverage, but if they are located too close to each other, they may interfer each other and degrades WiFi connection rather than improving the connectivity. So I would suggest NOT to put WiFi Access Point and Range Extender too close to each other.