Version 19 (modified by 13 years ago) (diff) | ,
---|
Under Construction
GEC11 NetServ tutorial: step-by-step instruction
Preparation
- Start the GEC11 VM and login as the "GENI User".
- Open Firefox and point it to the following URL:
Please note that you must replace "50" with your own user number throughout this tutorial.
- You will see the traffic visualization in your browser as follows:
Install NetServ module
- Open a terminal window and go to your NetServ user directory.
cd /netserv-root/tutorial/user50 ls -l
- The following files have been prepared for each user:
Makefile NetServ/Example.java example.mf upload.sh setup.sh remove.sh setup-request-1.txt setup-request-2.txt setup-request-3.txt remove-request.txt request-signer private-key-50.pem public-key-50.pem
- Build the Example module and upload it to the NetServ repository.
make ./upload.sh
- Send a SETUP message to the NetServ router to install the module.
While you are watching the browser window type the following command into the terminal window.
./setup.sh 1
The traffic will be redirected to D2 (the node on the lower right) and NetServ.Example will be added to the list of NetServ modules currently installed.
- The SETUP message looks like this:
$ cat setup-request-1.txt SETUP NetServ.Example_1.0.0 NETSERV/0.1 url: http://pc487.emulab.net/modules/user50/example.jar user: user50 ttl: 600 filter-ipv4: 10.10.2.2 filter-proto: udp filter-port: 20050 properties: debug = false, ip = 10.10.3.2
- Send a REMOVE message to the NetServ router to remove the module.
./remove.sh
- The REMOVE message looks like this:
$ cat remove-request.txt REMOVE NetServ.Example_1.0.0 NETSERV/0.1 user: user50
Develop NetServ module
- Open Example.java with gedit or your favorite editor.
gedit NetServ/Example.java &
Example.java is a typical NetServ packet processing module and it extends the NetServ.BuildingBlock.service.PktProcessorActivator class.
- Modify Example.java.
Comment out processPkt() marked as scenario #1, and uncomment processPkt() scenario #2.
- Compile and upload the new version of the module.
make ./upload.sh
- While you're watching the browser screen, install the module into the NetServ router.
./setup.sh 2
Note that the "2" argument will make the script send setup-request-2.txt, which includes two IP addresses in the properties header.
$ cat setup-request-2.txt SETUP NetServ.Example_1.0.0 NETSERV/0.1 url: http://pc487.emulab.net/modules/user50/example.jar user: user50 ttl: 600 filter-ipv4: 10.10.2.2 filter-proto: udp filter-port: 20050 properties: debug = false, ip = 10.10.2.2 10.10.3.2
Attachments (1)
-
traffic.jpg (80.4 KB) - added by 13 years ago.
Traffic visualization screenshot
Download all attachments as: .zip