Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/route.php on line 2

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/route.php on line 2

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/route.php on line 3

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/route.php on line 4

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/route.php on line 5

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/emulab/route.php on line 8

 

 


Douglas E. Comer


Computer Science Department
Purdue University
West Lafayette, IN 47907

webmaster: W. David Laverell


Companion Topics

Home

Book Information

Purpose of Site

Getting Started

Students

Faculty

"What's New"

"Coming Attractions"

"C Pointers"

Acknowledgements

 

 
Hands-On Networking: Special Routing Experiment Home > Student > Experiments > Emulab > Special Routing Experiment

Special Routing Experiment

The following script builds a simple network of three nodes connected in a straight line. Notice that the statement rtproto Static, which is part of every script I have ever written, is commented out. This means that there will be no routing set up automatically. Nodes can talk to each other using their absolute identifications (eg, node0.experiment.project.emulab.calvin.edu) through the control network, but node0 will be able to ping node1 but not node2.

  
#generated by Netbuild 1.03
set ns [new Simulator]
source tb_compat.tcl

set node0 [$ns node]
set node1 [$ns node]
set node2 [$ns node]

tb-set-node-os $node0 FC4-STD
tb-set-node-os $node1 FC4-STD
tb-set-node-os $node2 FC4-STD

set link0 [$ns duplex-link $node0 $node1 100Mb 0ms DropTail]
set link1 [$ns duplex-link $node1 $node2 100Mb 0ms DropTail]

#$ns rtproto Static
$ns run
#netbuild-generated ns file ends.

Three things need to happen for node0 to be able to ping node2:

  1. node0 needs a route to node2.

  2. node2 needs a route to node0.

  3. node1 needs to do IP forwarding.

The first two are not so bad. See 18.3 for the FC4 syntax to add a route. The third is easy as well. On node1 just type sudo echo 1 > /proc/sys/net/ipv4/ip_forward. Then ping away.



This site is maintained by W. David Laverell of the Computer Science Department at Calvin College. For assistance or corrections, please contact him at lave@calvin.edu.