Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

nepi-ng A: the basics

INTRO
A1
A2
A3
A4
A5
WRAP UP

In this series we run a few experiments that ping between various locations, over the networks available to experimenters in R2lab.

The steps A1 to A5 are small incremental changes, so that each concept is introduced one at a time. From A2 on, the code is shown as a diff against the previous step: inserted and deleted lines are highlighted so you can see what is new. The plain code is available in a dropdown.

Preparation

Before running these experiments we need

  • a valid reservation in the booking system;

  • the 2 nodes fit01 and fit02 up and running.

For this first series we assume these 2 steps are performed manually.

Getting a reservation

Once logged in on the website, go to the booking page. In a nutshell, in the calendar:

  • click once in a free slot to create a reservation;

  • drag a reservation to change it;

  • double-click a reservation to cancel it;

  • when you belong to several slices, drag a slice from the left-hand list right into the calendar. The current slice is the one with a back arrow; it is the one used when you single-click to reserve.

The code in this series assumes a slice named r2lab-tutorial, which of course you need to replace with your actual slice name.

Loading images

To load the images manually on the 2 nodes (use your slice name):

ssh your_slicename@faraday.inria.fr

If your public key is not at its standard location, add the -i option with the path to it. On Permission denied, go back to the registration tutorial to troubleshoot access.

Once on faraday, type the following (explained in the shell tools tutorial):

# always a good idea to check you currently own the reservation
rleases --check
# turn off the whole testbed - just in case
all-off
# select nodes 1 and 2
n 1 2
# load the default image (on the selected nodes)
rload
# wait for ssh to be up (still on the selected nodes)
rwait

rload takes a couple of minutes. Your output should look like this:

Sample output
prep.out
your_slicename@faraday:~$ rleases --check
Checking current reservation for your_slicename OK

your_slicename@faraday:~$ all-off
reboot05:already off
reboot19:already off
reboot28:already off
reboot04:already off
... <snip>
reboot12:ok
reboot02:ok
reboot20:ok
reboot13:ok
Turning WiFi OFF
Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.wifi.WifiSettings }
Turning OFF phone : turning on airplane mode
Broadcasting: Intent { act=android.intent.action.AIRPLANE_MODE (has extras) }
Broadcast completed: result=0

your_slicename@faraday:~$ n 1 2
export NODES="fit01 fit02"
export NBNODES=2

your_slicename@faraday:~$ rload
16:12:42 - +000s: Selection: fit01 fit02
16:12:42 - +000s: Loading image /var/lib/rhubarbe-images/default.ndz
16:12:42 - +000s: AUTH: checking for a valid lease
16:12:42 - +000s: AUTH: access granted
16:12:42 - +000s: fit02 reboot = Sending message 'on' to CMC reboot02
16:12:42 - +000s: fit01 reboot = Sending message 'on' to CMC reboot01
16:12:43 - +001s: fit02 reboot = idling for 15s
16:12:43 - +001s: fit01 reboot = idling for 15s
16:12:59 - +017s: started <frisbeed@234.5.6.1:10001 on default.ndz at 500 Mibps>
16:12:59 - +017s: fit01 frisbee_status = trying to telnet..
16:12:59 - +017s: fit02 frisbee_status = trying to telnet..
... <snip>
|############################################################################################|100% |29.56s|Time: 0:00:29
16:13:44 - +062s: fit02 Uploading successful
16:13:44 - +062s: fit02 reboot = Sending message 'reset' to CMC reboot02
16:13:46 - +064s: stopped <frisbeed@234.5.6.1:10001 on default.ndz at 500 Mibps>

your_slicename@faraday:~$ rwait
<Node fit01>:ssh OK
<Node fit02>:ssh OK

Both nodes now run the default image. You can log out of faraday and go back to your laptop to run the steps below.

Continue with the A1 tab above.