NS Fundamentals (contd..) Padma Haldar USC/ISI 1 Outline Ns - - PowerPoint PPT Presentation

ns fundamentals contd
SMART_READER_LITE
LIVE PREVIEW

NS Fundamentals (contd..) Padma Haldar USC/ISI 1 Outline Ns - - PowerPoint PPT Presentation

NS Fundamentals (contd..) Padma Haldar USC/ISI 1 Outline Ns fundamentals Part I (by Chen) NS fundamentals Part II NS Internals 2 Ns Internals Tcl commands translates into series of object creation plumbing of


slide-1
SLIDE 1

1

NS Fundamentals (contd..)

Padma Haldar USC/ISI

slide-2
SLIDE 2

2

Outline

Ns fundamentals – Part I (by Chen) NS fundamentals –Part II

NS Internals

slide-3
SLIDE 3

3

Ns Internals

Tcl commands translates into

series of object creation plumbing of these objects

Step-by-step review of how each network

component gets set up in ns

slide-4
SLIDE 4

4

Network Topology: Node

n0 n1

Addr Classifier Port Classifier classifier_ dmux_ entry_ Node entry

Unicast Node

Multicast Classifier classifier_ dmux_ entry_ Node entry

Multicast Node

multiclassifier_

set n0 [ns_ node] Set ns_ [new Simulator –multicast on] Set n1 [ns_ node] 1

slide-5
SLIDE 5

5

Node Addressing

Two basic address styles available: flat and

hierarchical

Default flat address: 32 bits each for node

and port id

Default hier address:

3 levels of hierarchy 10 11 11

  • r 1 9 11 11 if mcast specified

Different bit allocation possible for specific

hier addresses

slide-6
SLIDE 6

6

Hierarchical Node

n2

Node entry Level 1 Level 2 Level 3 Address classifier To Port demux ns_ node-config –addressing hier

slide-7
SLIDE 7

7

Network Topology: Link

n0 n1 enqT_ queue_ deqT_

drophead_ drpT_

link_ ttl_

n1 entry_ head_

tracing simplex link duplex link

[ns_ duplex-link $n0 $n1 5Mb 2ms drop-tail]

slide-8
SLIDE 8

8

Transport

n0 n1

Addr Classifier Port Classifier classifier_ dmux_ entry_ Agent/TCP agents_ Addr Classifier Port Classifier classifier_ dmux_ entry_ Agent/TCPSink agents_ dst_= 1.0 dst_= 0.0

set tcp [new Agent/TCP] ns_ attach-agent $n0 $tcp set tcpsink [new Agent/TCPSink] ns_ attach-agent $n1 $tcpsink ns_ connect $tcp $tcpsink 1

slide-9
SLIDE 9

9

Application: Traffic Generator

n0 n1

Addr Classifier Port Classifier classifier_ dmux_ entry_ Agent/TCP agents_ Addr Classifier Port Classifier classifier_ dmux_ entry_ Agent/TCPSink agents_ dst_= 1.0 dst_= 0.0 Application/FTP

set ftp [new Application/FTP] $ftp attach-agent $tcp $ns at 1.2 “$ftp start” 1

slide-10
SLIDE 10

10

Routing

n0 n1

Addr Classifier Port Classifier classifier_ dmux_ entry_ Node entry

1

enqT_ queue_ deqT_ drophead_ drpT_ link_ ttl_ n1 entry _ head_ Agent/TCP agents_ Application/FTP

slide-11
SLIDE 11

11

Routing (con’t)

n0 n1

Addr Classifier Port Classifier classifier_ dmux_ entry_

1

Addr Classifier Port Classifier classifier_ dmux_ entry_

1

Link n0-n1 Link n1-n0 Agent/TCP agents_ Application/FTP Agent/TCP

slide-12
SLIDE 12

12

Plumbing: Packet Flow

1

n0 n1

Addr Classifier Port Classifier entry_ Agent/TCP Addr Classifier Port Classifier entry_

1

Link n0-n1 Link n1-n0 Agent/TCPSink dst_= 1.0 dst_= 0.0 Application/FTP