This experiment demonstrates how SAGE generated code interoperates with Linux built-in ping
and traceroute
in Mininet-configured network. Please find the provided VM to conduct this experiment. In this experiment, users will build a router program which includes static framework code and SAGE-generated code. Then, users will run four commands in Mininet as below to interact with router program.
The experiment contains a few simple steps:
-
Generate ICMP header and code files (Scripted in
run.sh
. Note the execution enables a flag-o
so that the generated code with API syntax that matches with VM compiler version) -
Properly patch header and code files (Patching detail is noted below. Scripted in
run.sh
) -
Compare against the expected header and code files (Scripted in
run.sh
). The expected header and code files are identical to the files already included in the VM.
(Optional) Copy/paste generated gen.h
and icmp_hdr.h
file to the specified folder in VM (Please follow the instructions to put files under sub-folder router
.) It is okay to skip this step because the identical generated gen.h
and icmp_hdr.h
are already included.
- Execute interoperability experiment(instructions)
The detail of patching is to remove redundant comments, to match file naming in static framework code, and to add include guards to the code file so that the generated code can match with the static framework. We do NOT patch any extra functions/features in this step.
Simple instructions on the execution steps are as following:
-
Import the ova file to Virtual Box
-
Login user account
CS 551 Student
with password:sage
-
Go to terminal:
> 551-Labs; cd exp
-
Set up the hook-up environment with the script
run_all.sh
:
> ./run_all.sh
-
Set up mininet:
> ./run_mininet
-
Open another tab/window; go to sub-folder
router
; make the source code (a copy of SAGE generated code is already included) and run the program:
> cd router; make; ./sr
-
Go back to the window executing Mininet and run testing command.
For example,> client ping -c 3 10.0.1.1
(The mininet side receives packets successfully and the experiment is done)The four commands evaluated in the paper are:
Test Commands Purpose client ping -c 10 10.0.1.1 Test Echo message client ping -c 10 192.168.3.1 Test Dest Unreachable message client ping -c 10 -t 1 192.168.2.2 Test Time Exceeded message client traceroute 10.0.1.1 Test TRACEROUTE -
(Optional) Switch back to router window to view the print out message.
Execution of the experiments would depend on user-configured resource for VM.