Skip to content

Tutorial 10: DMM two providers ARCFIRE 2018

Eduard Grasa edited this page Jul 18, 2018 · 18 revisions

Introduction

Figure 1 shows a detailed overview of the physical systems involved in the RINA mobility experiment. The deployment features 2 mobile networks - each one with 3 base stations, 2 edge routers and 1 core router. 6 Raspberry Pi Model 3B are used as base stations (WiFi Access Points), three for each mobile network. Each base station broadcasts a different SSID. Each mobile net is connected to a different ISP router, which in turn provide connectivity to two servers. All the edge, core and ISP routers, as well as the servers are deployed as QEMU-KVM virtual machines running within a laptop. Finally, a laptop with two WiFi interfaces acts as the Mobile Host (MH). All the physical and virtual systems are running the IRATI RINA implementation.

Tutorial 10 scenario: physical systems

The different layers that are present in the experimental scenario are depicted in Figure 2. Each mobile network is composed by a _mobile network DIF _layer, which provides communication flows between the MH and the mobile network core router. Mobility through the operator's network is managed via this layer, which operates over point-to-point Ethernet links (between base stations and edge routers, and edge routers and the core router) and multi-access WiFi links (between the MH and the base stations). Each mobile network DIF layer is modelled as a single subnet which runs a link-state routing policy, therefore MHs do not need to obtain a new address when attaching to different access points. On top of both mobile network DIF, the mobile operators and the ISPs are operating a common layer that we have labelled Internet DIF. This layer allows applications running in the MH to communicate with applications running at the servers. The Internet DIF layer is only aware of mobility events across both operators; changes of access point within the same operator remain hidden to it.

Tutorial 10 scenario: DIFs

1. Configuration of the Raspberry Pis

The first step to get RINA up and running on the Raspberry Pi is to install IRATI as explained in IRATI Raspbian installation. The rest of this section assumes IRATI has been installed within the /usr/local/irati/ folder.

1.1 Raspberry Pi 1 (AP1)

Copy the following IRATI configuration files to the /usr/local/irati/etc folder:

Now, assuming the pi user exists on the Raspberry Pi, copy the following files to the /home/pi folder:

Edit /etc/rc.local and add a call to the IRATI init script at the end of the file (so that IRATI will be initialized at boot time).

/home/pi/init-rina.sh

Edit the /etc/default/hostapd file and point it to the /home/pi/hostapd.conf config file (edit the DAEMON_CONF variable):

DAEMON_CONF="/home/pi/hostapd.conf"

If you reboot the Raspberry Pi it should create the VLANs, configure the WiFi interface in AP mode and startup IRATI.

1.2 Raspberry Pi 2 (AP2)

Copy the following IRATI configuration files to the /usr/local/irati/etc folder:

Now, assuming the pi user exists on the Raspberry Pi, copy the following files to the /home/pi folder:

Edit /etc/rc.local and add a call to the IRATI init script at the end of the file (so that IRATI will be initialized at boot time).

/home/pi/init-rina.sh

Edit the /etc/default/hostapd file and point it to the /home/pi/hostapd.conf config file (edit the DAEMON_CONF variable):

DAEMON_CONF="/home/pi/hostapd.conf"

If you reboot the Raspberry Pi it should create the VLANs, configure the WiFi interface in AP mode and startup IRATI.

1.3 Raspberry Pi 3 (AP3)

Copy the following IRATI configuration files to the /usr/local/irati/etc folder:

Now, assuming the pi user exists on the Raspberry Pi, copy the following files to the /home/pi folder:

Edit /etc/rc.local and add a call to the IRATI init script at the end of the file (so that IRATI will be initialized at boot time).

/home/pi/init-rina.sh

Edit the /etc/default/hostapd file and point it to the /home/pi/hostapd.conf config file (edit the DAEMON_CONF variable):

DAEMON_CONF="/home/pi/hostapd.conf"

If you reboot the Raspberry Pi it should create the VLANs, configure the WiFi interface in AP mode and startup IRATI.

1.4 Raspberry Pi 4 (AP4)

Copy the following IRATI configuration files to the /usr/local/irati/etc folder:

Now, assuming the pi user exists on the Raspberry Pi, copy the following files to the /home/pi folder:

Edit /etc/rc.local and add a call to the IRATI init script at the end of the file (so that IRATI will be initialized at boot time).

/home/pi/init-rina.sh

Edit the /etc/default/hostapd file and point it to the /home/pi/hostapd.conf config file (edit the DAEMON_CONF variable):

DAEMON_CONF="/home/pi/hostapd.conf"

If you reboot the Raspberry Pi it should create the VLANs, configure the WiFi interface in AP mode and startup IRATI.

1.5 Raspberry Pi 5 (AP5)

Copy the following IRATI configuration files to the /usr/local/irati/etc folder:

Now, assuming the pi user exists on the Raspberry Pi, copy the following files to the /home/pi folder:

Edit /etc/rc.local and add a call to the IRATI init script at the end of the file (so that IRATI will be initialized at boot time).

/home/pi/init-rina.sh

Edit the /etc/default/hostapd file and point it to the /home/pi/hostapd.conf config file (edit the DAEMON_CONF variable):

DAEMON_CONF="/home/pi/hostapd.conf"

If you reboot the Raspberry Pi it should create the VLANs, configure the WiFi interface in AP mode and startup IRATI.

1.6 Raspberry Pi 6 (AP6)

Copy the following IRATI configuration files to the /usr/local/irati/etc folder:

Now, assuming the pi user exists on the Raspberry Pi, copy the following files to the /home/pi folder:

Edit /etc/rc.local and add a call to the IRATI init script at the end of the file (so that IRATI will be initialized at boot time).

/home/pi/init-rina.sh

Edit the /etc/default/hostapd file and point it to the /home/pi/hostapd.conf config file (edit the DAEMON_CONF variable):

DAEMON_CONF="/home/pi/hostapd.conf"

If you reboot the Raspberry Pi it should create the VLANs, configure the WiFi interface in AP mode and startup IRATI.

2. Configuration of the VLAN-aware Ethernet Switch

Make sure you create the VLANs indicated in Figure 1, and that you connect the Raspberry Pis and the Machine that will run the Demonstrator with IRATI VMs at the apropriate ports. For example, a possible configuration is:

  • AP1 is connected to Eth. switch port 1.
  • AP2 is connected to Eth. switch port 2.
  • AP3 is connected to Eth. switch port 3.
  • AP4 is connected to Eth. switch port 4.
  • AP5 is connected to Eth. switch port 5.
  • AP6 is connected to Eth. switch port 6.
  • Demonstrator machine is connected to Eth. switch port 8.

Then the following VLANs (which tag the traffic), have to be configured: VLAN 10 on port 1, VLAN 20 on port 2, VLAN 30 on port 3, VLAN 40 on port 4, VLAN 50 on port 5, VLAN 60 on port 6, VLANs 10, 20, 30, 40, 50, 60 on port 8.

3. Configuration of the machine that runs the Demonstrator

Before starting the demonstrator, make sure that:

  • You have connected the machine to the VLAN-aware Ethernet switch via the eth0 interface
  • You have connected all the Raspberry Pis to the VLAN Aware Ethernet switch and they are up and running
  • VLANs have been configured at the switch

The machine where the demonstrator needs to be installed must be a Linux machine and have the bridgeutils and qemu-kvm packages installed. Then copy the pre-configured demonstrator tar.gz file to any folder of your choice, and extract it.

# tar xzvf demonstrator-dmm.tar.gz demonstrator

Enter the demonstrator/demonstrator-dmm folder and execute the up.sh script:

# cd demonstrator/demonstrator-dmm
# ./up.sh

The demonstrator will create the required Ethernet bridges, instantiate VMs, boot them, instantiate IRATI, configure DIFs, trigger enrollments and instantiate rina-echo-time application processes at each one of the "Server" VMs (Figure 1).

4. Configuration of the UE machine (Mobile Host)

In our setup we have used a Debian 9 Laptop to act as the UE, but it can be any type of Linux machine (as long as its OS is supported by IRATI). The important requirement is that the machine has two WiFi interfaces. Since most laptops come with a single built-in WiFi interface, the easiest way to get another one is to use a USB WiFi dongle, but please make sure its drivers are compatible with the Linux distribution of choice (we have used this one).

First thing is to install IRATI according to the [instructions here] (https://github.com/IRATI/stack#2-build-instructions). We assume IRATI has been installed in the /usr/local/irati folder. Copy the following files to the /usr/local/irati/etc folder:

Copy the IRATI initialization script to the home folder (e.g. /home/i2cat):

Run the init script

# cd /home/i2cat
# ./init-rina.sh

Start the IPC Manager Daemon with the proper configuration

# cd /usr/local/irati/bin
# ./ipcm -c ../etc/ipcm.conf -l DEBUG -a "console, scripting, mobman"

Open another terminal and login to the management console, you should see the 2 shim WiFi IPCPs and three normal IPCPs created (one for each DIF: mobile.DIF, mobile2.DIF and internet.DIF). But no flows have been created yet.

# socat - UNIX:/usr/local/irati/var/run/ipcm-console.sock
# IPCM >>> list-ipcps 
  Management Agent not started

  Current IPC processes (id | name | type | state | Registered applications | Port-ids of flows provided)
      1 | wlan2.ue:1:: | shim-wifi-sta | ASSIGNED TO DIF arcfire | ue.mobile-1-- | -
      2 | wlan0.ue:1:: | shim-wifi-sta | ASSIGNED TO DIF pristine | ue.mobile-1-- | -
      3 | ue.mobile:1:: | normal-ipc | ASSIGNED TO DIF mobile.DIF | ue.internet-1-- | -
      4 | ue.mobile2:1:: | normal-ipc | ASSIGNED TO DIF mobile2.DIF | ue.internet-1-- | -
      5 | ue.internet:1:: | normal-ipc | ASSIGNED TO DIF internet.DIF | - | -

After 20 seconds the IPCM will instruct the wlan2 shim IPC Process to enroll to the pristine DIF. Once it is done the IPCP ue.mobile will also join the mobile DIF and after that the IPCP ue.internet will join the internet DIF.

IPCM >>> list-ipcps
Management Agent not started

Current IPC processes (id | name | type | state | Registered applications | Port-ids of flows provided)
    1 | wlan2.ue:1:: | shim-wifi-sta | ASSIGNED TO DIF pristine | ue.mobile-1-- | 1
    2 | wlan0.ue:1:: | shim-wifi-sta | ASSIGNED TO DIF pristine | ue.mobile-1-- | -
    3 | ue.mobile:1:: | normal-ipc | ASSIGNED TO DIF mobile.DIF | ue.internet-1-- | 2
    4 | ue.mobile2:1:: | normal-ipc | ASSIGNED TO DIF mobile2.DIF | ue.internet-1-- | -
    5 | ue.internet:1:: | normal-ipc | ASSIGNED TO DIF internet.DIF | - | -

After 20 seconds more the IPCM will handover from the access router AP1 to access router AP2. To do so first the wlan0 IPCP will attach to the arcfire SSID. Next the ue.mobile IPCP will connect to the IPCP in AP2 belonging to the mobile DIF, becoming multi-homed. After that the ue.mobile IPCP will disconnect from the IPCP in AP1 belonging to the mobile DIF and the wlan2 IPCP will detach from the pristine SSID.

IPCM >>> list-ipcps
Management Agent not started

Current IPC processes (id | name | type | state | Registered applications | Port-ids of flows provided)
    1 | wlan2.ue:1:: | shim-wifi-sta | ASSIGNED TO DIF pristine | ue.mobile-1-- | -
    2 | wlan0.ue:1:: | shim-wifi-sta | ASSIGNED TO DIF arcfire | ue.mobile-1-- | 3
    3 | ue.mobile:1:: | normal-ipc | ASSIGNED TO DIF mobile.DIF | ue.internet-1-- | 2
    4 | ue.mobile2:1:: | normal-ipc | ASSIGNED TO DIF mobile2.DIF | ue.internet-1-- | -
    5 | ue.internet:1:: | normal-ipc | ASSIGNED TO DIF internet.DIF | - | -

In another terminal we start a rina-echo-time client and allocate a flow to the echo time server named server1 (instantiated at the Server1 VM).

root@debian:/usr/local/irati/bin# ./rina-echo-time --server-api server1 -c 10000 -s 200 -w 50
13663(1531914650)#librina.logs (DBG): New log level: INFO
Flow allocation time = 19.115 ms
SDU size = 200, seq = 0, RTT = 3.6983 ms
SDU size = 200, seq = 1, RTT = 2.8362 ms
SDU size = 200, seq = 2, RTT = 10.104 ms
SDU size = 200, seq = 3, RTT = 6.7816 ms
SDU size = 200, seq = 4, RTT = 7.0986 ms
SDU size = 200, seq = 5, RTT = 5.7187 ms

And yet in another terminal we start another rina-echo-time client and allocate a flow to the echo time server named server2 (instantiated at the Server2 VM).

root@debian:/usr/local/irati/bin# ./rina-echo-time --server-api server2 -c 10000 -s 200 -w 50
11384(1531914609)#librina.logs (DBG): New log level: INFO
Flow allocation time = 20.743 ms
SDU size = 200, seq = 0, RTT = 5.8698 ms
SDU size = 200, seq = 1, RTT = 14.662 ms
SDU size = 200, seq = 2, RTT = 18.398 ms
SDU size = 200, seq = 3, RTT = 14.772 ms
SDU size = 200, seq = 4, RTT = 15.627 ms
SDU size = 200, seq = 5, RTT = 38.988 ms
SDU size = 200, seq = 6, RTT = 7.4919 ms
SDU size = 200, seq = 7, RTT = 19.446 ms

If we look at the IPCM console, we should see that the internet DIF is supporting two flows. In this screenshot the UE is now attached to the ocarina SSID and mobile2.DIF.

IPCM >>> list-ipcps
Management Agent not started

Current IPC processes (id | name | type | state | Registered applications | Port-ids of flows provided)
    1 | wlan2.ue:1:: | shim-wifi-sta | ASSIGNED TO DIF rinaisense | ue.mobile-1-- | -
    2 | wlan0.ue:1:: | shim-wifi-sta | ASSIGNED TO DIF ocarina | ue.mobile-1-- | 18
    3 | ue.mobile:1:: | normal-ipc | ASSIGNED TO DIF mobile.DIF | ue.internet-1-- | -
    4 | ue.mobile2:1:: | normal-ipc | ASSIGNED TO DIF mobile2.DIF | ue.internet-1-- | 16
    5 | ue.internet:1:: | normal-ipc | ASSIGNED TO DIF internet.DIF | - | 17, 20

After a while, the UE will handover from AP6 to AP1, executing a handover between different providers and preserving both flows (flows are not destroyed, impact on packet loss and delay is minimal).

IPCM >>> list-ipcps
Management Agent not started

Current IPC processes (id | name | type | state | Registered applications | Port-ids of flows provided)
    1 | wlan2.ue:1:: | shim-wifi-sta | ASSIGNED TO DIF pristine | ue.mobile-1-- | 21
    2 | wlan0.ue:1:: | shim-wifi-sta | ASSIGNED TO DIF ocarina | ue.mobile-1-- | -
    3 | ue.mobile:1:: | normal-ipc | ASSIGNED TO DIF mobile.DIF | ue.internet-1-- | 22
    4 | ue.mobile2:1:: | normal-ipc | ASSIGNED TO DIF mobile2.DIF | ue.internet-1-- | -
    5 | ue.internet:1:: | normal-ipc | ASSIGNED TO DIF internet.DIF | - | 17, 20
Clone this wiki locally