Commit 907bb9b6 authored by Robert Ricci's avatar Robert Ricci
Browse files

Include The Internet in the topology

parent d3cf1796
...@@ -72,6 +72,8 @@ if { [llength $nodelist] > 0 } { ...@@ -72,6 +72,8 @@ if { [llength $nodelist] > 0 } {
set hwtype "<HWType>" set hwtype "<HWType>"
set node_version "<NodeVersion>" set node_version "<NodeVersion>"
set inet_string ""
# #
# Select the N approximately least-loaded nodes of the given type. Fails if # Select the N approximately least-loaded nodes of the given type. Fails if
# insufficient nodes are found due to excessive loads or inadequate disk space. # insufficient nodes are found due to excessive loads or inadequate disk space.
...@@ -80,6 +82,8 @@ for {set i 1} {$i <= $num_nodes} {incr i} { ...@@ -80,6 +82,8 @@ for {set i 1} {$i <= $num_nodes} {incr i} {
set node($i) [$ns node] set node($i) [$ns node]
tb-set-hardware $node($i) $hwtype tb-set-hardware $node($i) $hwtype
append $inet_string "$node(${i}) "
if { [llength $nodelist] > 0 } { if { [llength $nodelist] > 0 } {
tb-fix-node $node($i) [lindex $nodelist [expr $i - 1]] tb-fix-node $node($i) [lindex $nodelist [expr $i - 1]]
} }
...@@ -126,6 +130,13 @@ for {set i 1} {$i <= $num_nodes} {incr i} { ...@@ -126,6 +130,13 @@ for {set i 1} {$i <= $num_nodes} {incr i} {
# at experiment startup, swapin, and vnode reboot. Of course, it needs # at experiment startup, swapin, and vnode reboot. Of course, it needs
# to exist on the vnode, probably from a tarball or RPM you installed. # to exist on the vnode, probably from a tarball or RPM you installed.
#
# This makes "the Internet" an addressable object in your topology - it will,
# for example, enable you to set up automatic tcpdump on it.
#
set internet [$ns make-lan "$inet_string" 100Mbps 0ms]
tb-set-lan-protocol $internet "ipv4"
# #
# Boilerplate # Boilerplate
# #
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment