Skip to content

Tutorial 1: DIF over a VLAN (point to point DIF)

Eduard Grasa edited this page Dec 14, 2018 · 8 revisions

Introduction

This tutorial explains how to configure IRATI to instantiate a normal DIF spanning two machines (systems) interconnected by a VLAN, as illustrated in Figure 1.

Tutorial 1 scenario

Configuration of System 1

Assumptions: IRATI has been successfully installed in the system as explained in How to install the IRATI stack. The software is assumed to have been installed in $INSTALLATION_PATH.

Configuring the VLAN

In order to configure the VLAN, type the following command

ip link add link eth1 name eth1.100 type vlan id 100
ip link set dev eth1 up
ip link set dev eth1.100 up

NOTE: If you are installing IRATI in a VirtualBox VM, please do not use the Intel PRO/1000 net card adaptor since it strips the VLAN tags.

Loading the RINA kernel modules

For this simple experiment we will use the shim DIF over 802.1q and the normal DIF, therefore we need to load the modules that provide kernel support for these functionalities.

modprobe rina-irati-core irati_verbosity=7
modprobe rina-default-plugin
modprobe normal-ipcp
modprobe shim-eth-vlan
modprobe shim-tcp-udp

Configuration files

Copy the following files to the $INSTALLATION_PATH/etc folder (ipcm.conf file assumes INSTALLATION_PATH=/usr/local/irati)

Instantiating the IPC Manager

Once the configuration file has the adequate contents, we can start the IPC Manager Daemon, which will trigger the creation of the two IPC Processes and assignment to its respective DIF as specified in the configuration file. To do so, we have to enter the following command in the $INSTALLATION_PATH/bin folder.

./ipcm -c ../etc/ipcm.conf

If everything went well you should be able to open a telnet session to the IPC Manager console like this:

socat - UNIX:/usr/local/irati/var/run/ipcm-console.sock

And once inside, type the list-ipcps command, the following output should be shown:

IPCM >>> list-ipcps
Management Agent not started

Current IPC processes (id | name | type | state | Registered applications | Port-ids of flows provided)
    1 | eth.1.IPCP:1:: | shim-eth-vlan | ASSIGNED TO DIF 100 | Normal.1.IPCP-1-- | -
    2 | Normal.1.IPCP:1:: | normal-ipc | ASSIGNED TO DIF Normal.DIF | - | -

You can obtain more information about a NORMAL IPC Process by using the query-rib command (not supported by shim IPC Processes yet). By examining this information we can look at the naming and addressing properties of the IPC Process, the configuration of the DIF policies, its neighbors, the registrations to N-1 DIFs, the N-1 Flows it currently relies on, the N-flows it provides to applications, etc. You can exit the IPC Manager console via the ´exit´ or ´quit´ commands.

Configuration of System 2

The configuration of system 2 is dual to the system 1 configuration, with only a minimal change in the IPC Manager configuration file:

Enrollment of IPC Processes in the normal DIF

Now we have two IPC Processes in two systems that belong to the normal DIF but they don't know about the existence of each other. In order to so, we have to trigger the enrollment procedure, which will make both IPC Processes to discover each other and to become neighbours in the normal DIF. We will trigger the enrollment procedure via the IPC Manager console of System 1 (could also be done from System 2 with a dual procedure).

socat - UNIX:/usr/local/irati/var/run/ipcm-console.sock

The usage of the ´enroll-to-dif´ command is the following: ´USAGE: enroll-to-dif ´. For our case:

IPCM >>> enroll-to-dif 2 normal.DIF 100
DIF enrollment succesfully completed

Running the rina-echo-time application in 'ping' mode

We will now use the rina-echo-time application in 'ping' mode to test a flow over the normal DIF. This application consists in two types of processes: servers and clients. In the 'ping' mode, the client sends a configurable number of packets (SDUs) at a configurable rate to the server, which echoes them back. The client reports the latency it perceives.

Running the rina-echo-time server

In System 2, go to the $INSTALLATION_PATH/bin folder and type:

./rina-echo-time -l

Now the server application has registered to the normal DIF. You can see it has done so by inspecting the RIB of the IPC Process test2.IRATI in System 2 via the IPC Manager console, the following new entry should appear:

Name: /dif/management/flowallocator/directoryforwardingtableentries/rina.apps.echotime.server-1--; Class: directoryforwardingtableentry; Instance: 20
Value: App name: rina.apps.echotime.server-1--; Address: 17; Timestamp: 0

Note that the IPC Process test2.IRATI has disseminated the registration of this application through the DIF, therefore the RIB of test1.IRATI will also contain this entry.

Running the rina-echo-time client

In System 1, go to the $INSTALLATION_PATH/bin folder and type:

./rina-echo-time -c 100

If the command is successful, you will see the following output:

Flow allocation time = 147ms 
SDU size = 20, seq = 0, RTT = 17ms
SDU size = 20, seq = 1, RTT = 4605us
SDU size = 20, seq = 2, RTT = 2724us
SDU size = 20, seq = 3, RTT = 33ms
SDU size = 20, seq = 4, RTT = 1682us
SDU size = 20, seq = 5, RTT = 4270us
SDU size = 20, seq = 6, RTT = 13ms
SDU size = 20, seq = 7, RTT = 2721us
SDU size = 20, seq = 8, RTT = 5776us
SDU size = 20, seq = 9, RTT = 3319us
SDU size = 20, seq = 10, RTT = 1637us
SDU size = 20, seq = 11, RTT = 37ms
SDU size = 20, seq = 12, RTT = 1950us
SDU size = 20, seq = 13, RTT = 1631us
...

If you inspect the RIB of any of the two IPC Processes, you will be able to see a new entry describing the flow supported by the normal DIF.

Name: /dif/resourceallocation/flowallocator/flows/16-2; Class: flow; Instance: 21
Value: * State: 2
* Is this IPC Process the requestor of the flow? 1
* Max create flow retries: 1
* Hop count: 3
* Source AP Naming Info: rina.apps.echotime.client:1::
* Source address: 16
* Source port id: 2
* Destination AP Naming Info: rina.apps.echotime.server:1::res: 
Destination port id: 
* Connection ids of the connection supporting this flow: +
Src CEP-id 0; Dest CEP-id 0; Qos-id 1
* Index of the current active connection for this flow: 0
You can’t perform that action at this time.