12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Marking the trafficMarking the traffic is h<strong>and</strong>led by Marker objects. Markers are FIFO queues th<strong>at</strong> set the class index of each packet. To e<strong>ns</strong>ureaccuracy of the simul<strong>at</strong>io<strong>ns</strong>, it is best to configure these queues to have a very large buffer, so th<strong>at</strong> no packets are dropped inthe Marker. Demarkers are used to g<strong>at</strong>her end-to-end delay st<strong>at</strong>istics.$<strong>ns</strong>_ simplex-link $source $router(1) $bw $delay Marker;# set-up marker$<strong>ns</strong>_ queue-limit $source $router(1) [expr $buff*10];# Select huge buffers for markers$<strong>ns</strong>_ queue-limit $router(1) $source [expr $buff*10];# to avoid traffic dropsset q [$<strong>ns</strong>_ get-queue $source $router(1)];#in the marker$q marker_type 2 ;# St<strong>at</strong>istical marker$q marker_frc 0.1 0.2 0.3 0.4 ;# 10% Class 1, 20% Class 2, 30% Class 3, 40% Class 4.$<strong>ns</strong>_ simplex-link $router(2) $sink $bw $delay Demarker;# set-up demarker$<strong>ns</strong>_ queue-limit $router(2) $sink [expr $buff*10]$q trace-file e2e ;# trace end-to-end delays to file e2e<strong>The</strong> remaining steps (<strong>at</strong>taching agents <strong>and</strong> traffic gener<strong>at</strong>ors or applic<strong>at</strong>io<strong>ns</strong> to the nodes) are explained in Chapters 10 <strong>and</strong>38, <strong>and</strong> are h<strong>and</strong>led as usual. We refer to these chapters <strong>and</strong> the example scripts provided with your <strong>ns</strong> distribution.7.5.3 TracingTracing in JoBS is h<strong>and</strong>led internally, by the scheduler. Each JoBS queue can gener<strong>at</strong>e a trace file containing the followinginform<strong>at</strong>ion. Each line of the tracefile co<strong>ns</strong>ists of 17 colum<strong>ns</strong>. <strong>The</strong> first column is the simul<strong>at</strong>ion time, colum<strong>ns</strong> 2 to 5 representthe loss r<strong>at</strong>es over the current busy period for classes 1 to 4, colum<strong>ns</strong> 6 to 9 represent the delays for each class (average overa 0.5 seconds sliding window), colum<strong>ns</strong> 10 to 13 represent the average service r<strong>at</strong>es alloc<strong>at</strong>ed to each class over the last 0.5seconds, <strong>and</strong> colum<strong>ns</strong> 14 to 17 represent the i<strong>ns</strong>tantaneous queue length in packets. Additionally, Demarkers can be used totrace end-to-end delays.7.5.4 VariablesThis section summarizes the variables th<strong>at</strong> are used by JoBS, Marker <strong>and</strong> Demarker objects.JoBS objectstrace_hop_ Can be true or false. If set to true, per-hop, per-class metrics will be traced. (Trace files have then to be specified,using trace-file .) Defaults to false.drop_front_ Can be true or false. If set to true, traffic will be dropped from the front of the queue. Defaults to false(drop-tail).adc_resolution_type_ Can be 0 or 1. If set to 0, traffic will be dropped from classes th<strong>at</strong> have an ADC if the ADC cannotbe met by adjusting the service r<strong>at</strong>es. If set to 1, traffic will be dropped from all classes. A resolution mode set to 1 istherefore fairer, in the se<strong>ns</strong>e th<strong>at</strong> the pain is shared by all classes, but can lead to more deadline viol<strong>at</strong>io<strong>ns</strong>. Defaults to0.shared_buffer_ Can be 0 or 1. If set to 0, all classes use a separ<strong>at</strong>e per-class buffer (which is required if only r<strong>at</strong>e guaranteesare to provided). All per-class buffers have the same size. If set to 1, all classes share the same buffer (which is requiredif loss differenti<strong>at</strong>ion is to be provided). Defaults to 1.81

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!