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.
Test Procedure Summary
This test applies to any of enb, mme, ims configuration as long as those configurations are valid and does not cause any error during the execution and allow internet access.
Step 1 : Before you start lte service, try ping to 8.8.8.8 and make it sure it works (If this does not work, you have to troubleshoot this first)
Step 2 : Run lte service (i.e, run 'service lte restart')
Step 3 : Run linux screen (i.e, run 'screen -r')
Step 4 : Power on UE and wait until the connection is established
Step 5 : Ensure that UE has been assigned with at least one IP
Step 6 : Try to get access to internet (e.g, browser to any website on the internet or try YouTube on UE)
Table of Contents
- Out of the Box Test - Internet Access
- Test Procedure Summary
- Test Setup
- Configuration
- Check Up before trying UE connection
- Check Up Network Interfaces
- Check Up Routing Table
- Check Up IP table/NAT Table
- Check Up IP forwarding
- Check Up Connectivety between Callbox and External World
- Initial Attach and Check up before Internet Connection
- Trying Ping from UE over Internet
- Trying Internet from UE
- Analyzing Traffic with WebGUI
- Analyzing IP Traffic
- Tips
Test Setup
Test setup for this tutorial is as shown below.
- Since this test is for Out of the box testing, I used the default configuration(cfg) file without changing anything in it
- SIM Card used in this tutorial is the one delivered with the system as it is.
- If you want to change the configuration, The tutorial Configuration Guide would help
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.
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.
# nmcli dev status
# nmcli radio wifi
# nmcli device wifi rescan
# nmcli dev wifi list
# nmcli dev wifi connect network-ssid password "network-password"
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).
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
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
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"
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
Check Up Routing Table
Check up the routing table on CallBox PC. It would usually be as follows.
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.
- cd /root/mme
- ./lte_init.sh
- try 'iptables -t nat -L -v -n' and see if the table is set as expected
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'
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 (
- Analyzing IP Traffic
- Check Up Network Interfaces
- Check Up Routing Table
- Check Up IP table/NAT Table
- Check Up IP forwarding
Try ping to a url to check the DNS is working by ping www.google.com
[Optional] you may find the IP address to a specific url and try ping to the server with both in direct IP and url
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. (
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.
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. (
Ping from Callbox to UE and confirm that ping works
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.
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.
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.
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.
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.
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.
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.
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. (
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
i) get UE connected to Callbox (LTE or NR)
ii) figure out the IP assigned to the UE (You can find the UE IP in (mme) command as shown here)
iii) ping from Callbox to UE for a couple of seconds
iv) ping from UE to the callbox (You may need to install a ping app on your UE to do this)
v) ping from UE to 8.8.8.8
vi) Analyze traffic in Wireshark
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.
- Most WiFi dongle (even high end dongle) support only little bit over 1Gbps. Most of regular / common WiFi dongle support only several hundreds of Mbps
- You may not have very high throughput provided by the WLAN service provider.
- If you use Wired LAN connection attached to WiFi Range Extender, the throughput over internet can be restricted up to 100 Mbps since most of Wired LAN port on WiFi Range extender is 100 Mbps port (NOT Gbit port)
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).
- 192.168.1.x
- 192.168.y.x, where Y ranges from 2 through 10 (If you use default mme.cfg this would be enough, but if you modify mme.cfg to use other subnets you need to avoid that subnet as well).
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.