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

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

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

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

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

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

Warning: include(net.top.html): Failed to open stream: No such file or directory in /var/www/html/activities/books/networking/labbook/exp/emulab/exp15.2.php on line 12

Warning: include(): Failed opening 'net.top.html' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/activities/books/networking/labbook/exp/emulab/exp15.2.php on line 12
Hands-On Networking: Experiment 15.2 (An Emulab Approach) Home > Student > Experiments > Emulab > 15.2

Chapter 15: Experiment 15.2 - Assign Fixed Length IP Subnet Addresses

There are two changes that need to be made to Experiment 15.1 to represent a solution to 15.2. The topology needs to be changed significantly, and the netmasks need to be a bit different. Fortunately, there is a command which does the trick: tb-set-mask. The following does not represent the topology given in Experiment 15.2. Later!

  
set ns [new Simulator]
source tb_compat.tcl

set node12 [$ns node]
set node13 [$ns node]
set node14 [$ns node]
set node15 [$ns node]
set node16 [$ns node]



set lan2 [$ns make-lan "$node12 $node13 $node16 " 100Mb 0ms]
set lan3 [$ns make-lan "$node14 $node15 $node16 " 100Mb 0ms]

tb-set-ip-lan $node12 $lan2 10.0.0.1
tb-set-ip-lan $node13 $lan2 10.0.0.2
tb-set-ip-lan $node16 $lan2 10.0.0.3
tb-set-netmask $lan2 "255.255.240.0"

tb-set-ip-lan $node14 $lan3 192.168.254.1
tb-set-ip-lan $node15 $lan3 192.168.254.2
tb-set-ip-lan $node16 $lan3 192.168.254.3
tb-set-netmask $lan3 "255.255.255.0"

$ns rtproto Static
$ns run


Warning: include(net.bottom.html): Failed to open stream: No such file or directory in /var/www/html/activities/books/networking/labbook/exp/emulab/exp15.2.php on line 63

Warning: include(): Failed opening 'net.bottom.html' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/activities/books/networking/labbook/exp/emulab/exp15.2.php on line 63