Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Modified Schedule Day 2 Network AniMator (nam) Examples simple.tcl mcast.tcl Day 3 Wireless (ad-hoc)

Similar presentations


Presentation on theme: "1 Modified Schedule Day 2 Network AniMator (nam) Examples simple.tcl mcast.tcl Day 3 Wireless (ad-hoc)"— Presentation transcript:

1 1 Modified Schedule Day 2 Network AniMator (nam) Examples simple.tcl mcast.tcl http://students.washington.edu/abouzeid Day 3 Wireless (ad-hoc)

2 2 Notes Linux Lab connect: ssh linux21.ee.washington.edu –l hussein (1  32, some dual processor 1Ghz) ns lives in /usr/local/ns-allinone-2.1b7a/ns-2.1b7a Examples: ~tcl/ex Test Suites: ~tcl/test Must first copy to your home directory! Windows: Download binary http://www.isi.edu/nsnam/dist/binary

3 3 Visualization Tools nam-1 (Network AniMator Version 1) ns-supported Packet-level animation xgraph (plotting) first convert (extract) info from ns trace run xgraph to plot required info

4 4 nam application Basic visualization controls Topology layout Animation control Synchronous replay Fine-tune layout TCP visualization generate ns simulation scripts

5 5 ns  nam Interface Color Node manipulation Link manipulation Topology layout Protocol state Misc

6 6 nam Interface: Color Color mapping $ns color 40 red $ns color 41 blue $ns color 42 chocolate Color  flow id association $tcp0 set fid_ 40;# red packets $tcp1 set fid_ 41;# blue packets

7 7 nam Interface: Nodes Color $node color red Shape (can’t be changed after sim starts) $node shape box;# circle, box, hexagon Marks (concentric “shapes”) $ns at 1.0 “$n0 add-mark m0 blue box” $ns at 2.0 “$n0 delete-mark m0” Label (single string) $ns at 1.1 “$n0 label \”web cache 0\””

8 8 nam Interfaces: Links Color $ns duplex-link-op $n0 $n1 color "green" Label $ns duplex-link-op $n0 $n1 label "abced" Dynamics (automatically handled) Asymmetric links not allowed

9 9 nam Interface: Topo Layout “Manual” layout: specify everything $ns duplex-link-op $n(0) $n(1) orient right $ns duplex-link-op $n(1) $n(2) orient right $ns duplex-link-op $n(2) $n(3) orient right $ns duplex-link-op $n(3) $n(4) orient 60deg else  automatic layout

10 10 nam Interface: Protocol State Monitor values of agent variables $ns add-agent-trace $srm0 srm_agent0 $ns monitor-agent-trace $srm0 $srm0 tracevar C1_ $srm0 tracevar C2_ # … … $ns delete-agent-trace $tcp1

11 11 Summary: Generic Script Structure set ns [new Simulator] # [Turn on tracing] # Create topology # Setup packet loss, link dynamics # Create routing agents # Create: # - multicast groups # - protocol agents # - application and/or setup traffic sources # Post-processing procs # Start simulation

12 12 Example: Simple n2 n3 n1 n0 1.5Mb, 10ms 5Mb, 2ms UDP0 at 1.0s udpsink0 UDP1 at 1.1s udpsink1 TCP at 1.2s TCPSink with/without queue limit

13 13 G2 t=1.2 G2 t=1.4 G1 G2 t=1.5 Example: Multicast Routing Dynamic group membership n0 n1 n2 n3 1.5Mb, 10ms G1 t=1.3 G2 1.5Mb, 10ms

14 14 Day#3 Outline Wireless Ad hoc routing Other (Mobile IP, Satellite networking) Other (Mobile IP, Satellite networking) Misc. Utilities Misc. Utilities


Download ppt "1 Modified Schedule Day 2 Network AniMator (nam) Examples simple.tcl mcast.tcl Day 3 Wireless (ad-hoc)"

Similar presentations


Ads by Google