Tutorials on running simple mfping application using mobilityfirst routers, host stack and GNRS. === Set up === 1. In order to access the test bed, create a reservation and have it approved by the reservation service. 2. Access to the resources are granted after the reservation is confirmed. 3. Please follow the process shown on the COSMOS workflow page to get started (currently ORBIT sb4 is used for the experiments described below). = Experiment 1 (Ethernet Interfaces) = === Topology === || [[Image(exp1.png, width=500px)]] || Fig.1 MF Topology setup for Experiment 1 === Configuration === 1. Load the images on the nodes using the command below, the image mf-exp1.ndz has all the required source code files for host stack, routers and GNRS. {{{ console:~$ omf load -i mf-exp1.ndz -t node1-3,node1-4,node1-7,node1-6,node1-8 }}} 2. Please turn on the nodes after loading image {{{ console:~$ omf tell -a on -t node1-3,node1-4,node1-7,node1-6,node1-8 }}} 3. Open separate terminals for each of the nodes either using mobaxterm or putty 4. Configuration of GNRS * Login into the GNRS node (node1-8 in this case) {{{console:~$ ssh root@node1-8}}} * Change the ipv4 address in {{{vim ~/mf/gnrs/jserver/sample-configs/single-server/net-ipv4.xml}}} file to X.X.X.X (eth1 address – 10.14.1.8) * Change the ipv4 address and the binding port in {{{vim ~/mf/gnrs/jserver/sample-configs/single-server/as-binding.ipv4}}} file to X.X.X.X (eth1 address-10.14.1.8) 5. Download the bash script into your console environment {{{ console:~$ git clone https://gitlab.orbit-lab.org/pnetalkar/cosmos-mf-tutorial.git }}} 6. Run/Execute the scripts present in {{{exp1}}} folder from the console (see below for more instruction) 7. Configure the config.sh file according to your node setup {{{ #!/bin/bash log_level="1" #Node IDs n1="1" n2="2" n3="3" n4="4" #Node Address node1="node1-3" node2="node1-4" node3="node1-7" node4="node1-6" nodegnrs="node1-8" }}} 8. Execute ./setup_interfaces.sh to configure the IP address of the respective {{{eth0}}} interfaces as shown in the topology figure above {{{ console:~/cosmos_tutorial/exp1$./setup_interfaces.sh }}} 9. Execute ./copy_router_conf.sh to copy {{{topo}}} file required by click routers {{{ console:~/cosmos_tutorial/exp1$./copy_router_conf.sh }}} 10. Run ./copy_hostconf.sh to copy host stack configuration files to the respective hosts * Before copying host config file, make sure you edit these mfstack files present in conf folder. * Inside {{{mfstack1.conf}}} and {{{mfstack4.conf}}}, configure GUID and also the interfaces with the respective next hop IP and MAC address of the router. {{{ # Required. DEFAULT_GUID = 1 #INTERFACE = ether,eth0,ip,auto INTERFACE = ether,eth0,ip,manual,192.168.1.2,d8:50:e6:d4:f5:2d }}} 11. Run ./start_gnrs.sh to start the GNRS at node1-8 {{{ console:~/cosmos_tutorial/exp1$./start_gnrs.sh }}} Verify the status of the GNRS using command: {{{root@node1-8:~# tail -f /var/log/mfgnrs.log}}} at node1-8 12. Run ./start_routers.sh to start the routers on node1-4 and node1-7. {{{ console:~/cosmos_tutorial/exp1$./start_routers.sh }}} Verify the status of the routers using command: {{{root@node1-4:~# tail -f /var/log/mfrouter2.log}}} to read the logs of router with id 2 and {{{root@node1-7:~# tail -f /var/log/mfrouter3.log}}} to read the logs of router with id 3. 13. Run ./start_hosts.sh to start the host on node1-3, node1-6 respectively. {{{ console:~/cosmos_tutorial/exp1$./start_hosts.sh }}} Use {{{root@node1-3:~# tail -f /var/log/mfhost1.log}}} and {{{root@node1-6:~# tail -f /var/log/mfhost4.log}}} to read the logs/status of host with id 1 and id 4 respectively. === Running MFPING === 1. At Host 4: Server(Start the server first) {{{ root@node1-6:~# mfping -m 4 -o 1 -s -d }}} 2. At Host 1: Client {{{ root@node1-3:~# mfping -d -m 1 -o 4 -c -n 10 }}} 3. Use the stop script to stop the respective host, routers and GNRS {{{ console:~/cosmos_tutorial/exp1$./stop_gnrs.sh console:~/cosmos_tutorial/exp1$./stop_routers.sh console:~/cosmos_tutorial/exp1$./stop_hosts.sh }}} === Additional Details === 1. Starting GNRS: * {{{cd mf/gnrs/jserver}}} * {{{mf/gnrs/jserver# java -Dlog4j.configuration=file:sample-configs/single-server/log4j.xml -jar target/gnrs-server-1.0.0-SNAPSHOT-jar-with-dependencies.jar sample-configs/single-server/server.xml}}} 2. Starting Routers: * {{{cd ~/mf/router/click/conf}}} * {{{~/mf/router/click/conf# click MF_IPAccessMultiRouter.click my_GUID=X topo_file=topo core_dev=ethX GNRS_server_ip=x.x.x.x GNRS_server_port=5000 GNRS_listen_ip=y.y.y.y GNRS_listen_port=5001 edge_dev=ethx edge_dev_ip=z.z.z.z}}} 3. Staring Host: * {{{cd mf/mfclient/hoststack/conf}}} * {{{mf/mfclient/hoststack/conf# mfstack -d mfstack.conf}}} = Experiment 2 (WIFI) = || [[Image(exp2.png, width=500px)]] || Fig.2 MF Topology setup for Experiment 2 = Experiment 3 (OAI) = || [[Image(exp3.png, width=500px)]] || Fig.3 MF Topology setup for Experiment 3