Testing over LTE using the Amarisoft Callbox Mini

Overview

The Amarisoft Callbox Mini is a compact 3GPP compliant eNB/gNB and EPC/5GC for testing a mobile User Equipment using CDRouter. This article will explain how to configure the Callbox Mini and CDRouter for testing a UE over LTE.

CDRouter Test Setup

Since the Callbox Mini is acting as the first-hop router in between the UE and CDRouter, a routed test setup must be used. For more details on this setup, refer to Connecting to CDRouter through multiple routers.

IPv4 Test Setup

The testvar wanMode must be set to static, since the Callbox Mini is responsible for address assignment. Testvars wanIspGateway, wanIspIp, and wanIspMask define the network that the CDRouter is connected to via eth2. Testvars wanIspAssignGateway, wanIspAssignIp, and wanIspAssignMask represent the network the UE is attached to, as defined by the Callbox Mini. Since the Callbox Mini routes packets to the UE, the testvar IPv4HopCount should be set to 2. If there are other routers between the Callbox Mini, IPv4HopCount should be adjusted accordingly.

Here is a sample CDRouter config for the provided test setup:

# -- Sample CDRouter IPv4 configuration using the Callbox Mini

testvar  wanMode                    static

testvar  wanIspIp                   202.254.1.1
testvar  wanIspGateway              202.254.1.2
testvar  wanIspMask                 255.255.255.0

testvar  wanIspAssignIp             202.254.2.2
testvar  wanIspAssignGateway        202.254.2.1
testvar  wanIspNextIp               202.254.2.3
testvar  wanIspAssignMask           255.255.255.0

testvar  IPv4HopCount               2

testvar wanDnsServer                202.254.101.1
testvar wanBackupDnsServer          202.254.101.2
testvar ntpServer1                  202.254.101.3
testvar ntpServer2                  202.254.101.4
testvar remoteHostIp                202.254.101.5
testvar acsIp                       202.254.101.6
testvar FreeNetworkStart            202.254.101.16
testvar FreeNetworkStop             202.254.101.254
testvar FreeNetworkMask             255.255.255.240

IPv6 Shared Prefix Test Setup

The testvar ipv6WanMode must be set to static since the Callbox Mini is responsible for address assignment. Testvars ipv6WanIspIp, ipv6WanIspGateway, and ipv6WanIspPrefixLen define the network that the CDRouter is connected to via eth2. Testvars ipv6WanIspAssignIp and ipv6WanAssignPrefixLen represent the network the UE is attached to, as defined by the Callbox Mini. Since the Callbox Mini routes packets to the UE, the testvar IPv6HopCount should be set to 2. If there are other routers between the Callbox Mini, IPv6HopCount should be adjusted accordingly. Testvar dhcpv6WanEnablePD must be set to no, since the UE will not be sending a DHCPv6 Solicit message.

Here is a sample CDRouter config for the provided test setup:

# -- Sample CDRouter IPv6 shared prefix configuration using the Callbox Mini
testvar supportsIPv6                yes
testvar ipv6WanMode                 static

testvar ipv6WanIspIp                2001:DB8:A::1
testvar ipv6WanIspGateway           2001:DB8:A::2
testvar ipv6WanIspPrefixLen         64

testvar ipv6WanIspAssignIp          2001:DB8:B::<UE’s IID>
testvar ipv6WanIspNextIp            2001:DB8:B::2

testvar IPv6HopCount                2

testvar dhcpv6WanEnablePD           no
testvar ipv6LanIp                   2001:DB8:B::%eui64%

testvar ipv6WanDnsServer            2001:DB8:FF00::1
testvar ipv6WanBackupDnsServer      2001:DB8:FF00::2
testvar ipv6NtpServer1              2001:DB8:FF00::3
testvar ipv6NtpServer2              2001:DB8:FF00::4
testvar ipv6RemoteHost              2001:DB8:FF00::5
testvar acsDualStackIp              2001:DB8:FF00::6
testvar ipv6FreeNetworkStart        2001:DB8:FF00:1::1
testvar ipv6FreeNetworkStop         2001:DB8:FF00:FFFF::FFFF
testvar ipv6FreeNetworkPrefixLen    64

IPv6 Prefix Delegation Test Setup

The testvar ipv6WanMode must be set to static since the Callbox Mini is responsible for address assignment. Testvars ipv6WanIspIp, ipv6WanIspGateway, and ipv6WanIspPrefixLen define the network that the CDRouter is connected to via eth2. Testvars ipv6WanIspAssignIp and ipv6WanAssignPrefixLen represent the network the UE is attached to, as defined by the Callbox Mini. Since the Callbox Mini routes packets to the UE, the testvar IPv6HopCount should be set to 2. If there are other routers between the Callbox Mini, IPv6HopCount should be adjusted accordingly.

Testvar dhcpv6WanEnablePD must be set to yes and dhcpv6WanEnablePDExclude must be set to yes. Testvar dhcpv6WanAssignPrefix and dhcpv6WanAssignPrefixLen must match the Callbox Mini’s configured PDN. Testvar ipv6LanIp must be a subnet of dhcpv6WanAssignPrefix.

Here is a sample CDRouter config for the provided test setup:

# -- Sample CDRouter IPv6 delegated prefix configuration using the Callbox Mini
testvar supportsIPv6                yes
testvar ipv6WanMode                 static

testvar ipv6WanIspIp                2001:DB8:A::1
testvar ipv6WanIspGateway           2001:DB8:A::2
testvar ipv6WanIspPrefixLen         64

testvar ipv6WanIspAssignIp          2001:DB8:B::<UE’s IID>
testvar ipv6WanIspNextIp            2001:DB8:B::2

testvar IPv6HopCount                2

testvar dhcpv6WanEnablePD           yes
testvar dhcpv6WanEnablePDExclude    yes
testvar dhcpv6WanAssignPrefix       2001:DB8:B::
testvar dhcpv6WanAssignNextPrefix   2001:DB8:B:2::
testvar dhcpv6WanAssignPrefixLen    63

testvar ipv6LanIp                   2001:DB8:B:1:%eui64%

testvar ipv6WanDnsServer            2001:DB8:FF00::1
testvar ipv6WanBackupDnsServer      2001:DB8:FF00::2
testvar ipv6NtpServer1              2001:DB8:FF00::3
testvar ipv6NtpServer2              2001:DB8:FF00::4
testvar ipv6RemoteHost              2001:DB8:FF00::5
testvar acsDualStackIp              2001:DB8:FF00::6
testvar ipv6FreeNetworkStart        2001:DB8:FF00:1::1
testvar ipv6FreeNetworkStop         2001:DB8:FF00:FFFF::FFFF
testvar ipv6FreeNetworkPrefixLen    64

Configuring the Amarisoft Callbox Mini

Updating Config Files

The Callbox Mini uses a collection of configuration files and symbolic links. To add a new config file, copy the default file and make your changes. Then link the symlink to the new file. For example, you can update the OTS config by creating a new file called ots-no-nat.cfg and updating the existing symbolic link with the following command.

# ln -sf ots-no-nat.cfg ots.cfg

To apply changes to the LTE connection, restart the service.

# systemctl restart lte

Checking the UE Status

To check if the UE is successfully connected to the Callbox Mini, connect to the command line:

screen -r

Then, make sure you are in the MME tab by pressing Ctrl-a 0

Use the ue command to list connected UEs. You’ll see a list of UEs that are currently connected to the Callbox Mini:

(mme) ue
            SUPI           IMEISV  CN M-TMSI/5G-TMSI REG           TAC #BEARER IP_ADDR
 001010123456789 9900166700061915 EPC     0x75784c2b   Y  00101.   0x1       1 202.254.2.2 2001:dba:b::

This view can also be useful after you change the Callbox Mini’s configuration and restart the lte service. If there are errors when the service is restarted or running, they will appear in this view.

To exit screen, press Ctrl-a d.

Disable NAT

By default, the Callbox Mini has NAT enabled for both IPv4 and IPv6. This can interfere with CDRouter, since it does not expect there to be a NAT between itself and the UE. To disable NAT, edit the file linked by /root/ots/config/ots.cfg. Edit the following line to include the --no-nat options.

MME_INIT=" -6 --no-nat --no-nat6"

Setup PDNs

IP networking is defined by the file linked by /root/mme/config/mme.cfg, which defines the Packet Data Networks (PDNs). The UE will most likely connect to the default Access Point Name, but some UEs may need to use the internet APN to connect.

IPv4 Address Assignment

In the PDN definition, first_ip_addr and last_ip_addr represent the IPv4 subnet that will be used for UE address assignment. In this example, the Callbox Mini will assign IP addresses for the default PDN from the 202.254.2.0/24 subnet. The Callbox Mini creates tunnel interfaces for each PDN defined, and uses the first address in the subnet as its own address. In this example, it will assign itself 202.254.2.1/24 on its tunnel interface tun0, which corresponds to wanIspAssignGateway. The UE that connects to this PDN will be assigned 202.254.2.2/24, which corresponds to wanIspAssignIp.

pdn_type: "ipv4",
access_point_name: "default",
first_ip_addr: "202.254.2.2",
last_ip_addr: "202.254.2.254",
ip_addr_shift: 0,
dns_addr: ["202.254.101.1", "202.254.101.2"],

IPv6 Address Assignment

IPv6 Address Assignment will act differently depending on the UE. Some UEs support DHCPv6 Prefix Delegation using the Prefix Exclude Option, which allows them to obtain multiple prefixes for the WAN and LAN. Other UEs will share the single /64 prefix that is assigned to the WAN to its LAN interface.

In the prefix sharing scenario, the Callbox Mini will advertise a single /64 prefix in its Router Advertisement, defined by the range of prefixes specified in first_ipv6_prefix and last_ipv6_prefix. In the below example, the UE will receive the prefix 2001:DB8:B:1:/64.

pdn_type: "ipv6",
access_point_name: "default",
first_ipv6_prefix: "2001:DB8:B:1::",
last_ipv6_prefix: "2001:DB8:B:F::",
dns_addr: ["2001:DB8:FF00::1", "2001:DB8:FF00::2"],

When the UE supports DHCPv6 PD, the UE requests a DHCPv6 IA_PD option and uses the DHCPv6 PD Exclude option to indicate what prefix it will use for its WAN side. For more information about the Prefix Exclude Option, see knowledge base article Connecting to CDRouter through multiple routers. The difference between Prefix Sharing and Prefix Delegation is not in the Callbox Mini config, but rather in the UE’s behavior. The user will need to know which scenario applies to configure CDRouter properly. In the following example, the Callbox Mini is limited to assigning a /63 prefix, which will mean that both the WAN and LAN side of the UE will allocate a /64 prefix. This is for the sake of the example, and other prefix sizes may be used.

pdn_type: "ipv6",
access_point_name: "default",
first_ipv6_prefix: "2001:DB8:B::",
last_ipv6_prefix: "2001:DB8:B:1::",
ipv6_prefix_delegation_count: "2,"
dns_addr: ["2001:DB8:FF00::1", "2001:DB8:FF00::2"],

Dual Stack Address Assignment

The above examples can be combined to allow for a dual-stack PDN by using pdn_type: "ipv4v6".

pdn_type: "ipv4v6",
access_point_name: "default",
first_ip_addr: "202.254.2.2",
last_ip_addr: "202.254.2.254",
ip_addr_shift: 0,
first_ipv6_prefix: "2001:DB8:B:1::",
last_ipv6_prefix: "2001:DB8:B:F::",
dns_addr: ["202.254.101.1", "202.254.101.2", "2001:DB8:FF00::1", "2001:DB8:FF00::2"],

Add a default route

Since CDRouter uses multiple addresses to simulate various network services, the Callbox Mini must have a route installed. To make this route simpler, it’s best to configure all CDRouter services to use one subnet. Then configure a route for that subnet. Note, the commands below do not add a persistent route and will need to be rerun after a reboot. For persistent routes, use Network Manager.

IPv4

# ip route add 202.254.101.0/24 via 202.254.1.1 dev eno1

IPv6

# ip route add 2001:db8:ff00::/32 via 2001:db8:a::1 dev eno1

Reserve an address for a UE

When testing with multiple UEs connected to the Callbox Mini, it’s necessary to reserve an address so that it is assigned the same address every time it connects. Add an entry to the UE database in the file /root/mme/config/ue_db-ims.cfg that includes the IMEI of the UE.

 pdn_list: [{
        access_point_name: "default",
        ipv4_addr: "202.254.2.2",
        ipv6_prefix: "2001:db8:b::",
        imei: "9900166700061915",
}],

Caveats

  • In this environment the UE receives its WAN IPv4 and IPv6 addresses from the Callbox. As a result CDRouter operates in a static WAN configuration which means that certain functional test cases and test modules that require dynamic WANs are not supported and cannot be run in this test setup. Please contact support@qacafe.com for a complete list of test cases and test modules that are not compatible with this test setup.

  • All Callbox models are suitable for functional testing with CDRouter. If performance testing is also a priority, note that the maximum throughput of this test setup is determined by the size and configuration of the Callbox used. Please contact sales@amarisoft.com for assistance in selecting an appropriate Callbox and optimizing the configuration for use with CDRouter.