M. Dahshan - TCOM52721 TCOM 5272 Telecomm Lab Dr. Mostafa Dahshan OU-Tulsa 4W 2 nd floor 660-3713

Slides:



Advertisements
Similar presentations
1 NS-2 Tutorial COMP R2 University of Manitoba March 4, 2009.
Advertisements

NS2 Tutorial – Part II Internet Computing KUT Youn-Hee Han.
Statistical Methods Lynne Stokes Department of Statistical Science Lecture 7: Introduction to SAS Programming Language.
Introduction to Matlab
Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
Brief Intro to ns2: The most widely used Network Simulator COMP5416 Advanced Network Technologies Based on: Marc Greis's
Ns-2 Tutorial Exercise (1) Multimedia Networking Group, The Department of Computer Science, UVA Jianping Wang Adopted from Nicolas’s slides Jianping Wang,
Introduction to NS. Information Main website Documentation, mailing list archive, tutorial Location of Source codes –C++ files.
EMT 2390L Lecture 4 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
1 ns-2 for Multicast Research Polly Huang AT&T Labs Research 12 August, 1999.
Introduction to Matlab By: Dr. Maher O. EL-Ghossain.
Network Performance versus TCP Receiver Window Size Project 2 cs533.
Questions  RED vs. DropTail  What’s the key difference?  Why RED drops packet randomly?  What’s the major effect if using RED.
Submitters: Stella Pantofel Michael Halperin Igor Berman
CSE4251 The Unix Programming Environment
TCP Performance: what to measure?  Dynamic Performance  Bottleneck utilization, queue length;  TCP source congestion window,
Introduction to Network Simulator NS-2 Part II
Advanced File Processing
Wireless Networking and Systems CSE 590 ns2 tutorial.
Agenda Sed Utility - Advanced –Using Script-files / Example Awk Utility - Advanced –Using Script-files –Math calculations / Operators / Functions –Floating.
Agenda User Profile File (.profile) –Keyword Shell Variables Linux (Unix) filters –Purpose –Commands: grep, sort, awk cut, tr, wc, spell.
1 Experimental Statistics - week 4 Chapter 8: 1-factor ANOVA models Using SAS.
XP 1 Excel Tables Purpose of tables – Process data in a group – Used to facilitate calculations – Used to enhance readability of output Types of tables.
1 Performing Spreadsheet What-If Analysis Applications of Spreadsheets.
Descriptive Statistics I: By the end of this class you should be able to: Palm: Section 7.1, 7.2 Program cords and delays in your music programs plot a.
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
CIS 218 Advanced UNIX1 CIS 218 – Advanced UNIX (g)awk.
Role and Mechanism of Queue Internet Engineering.
Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command to search for.
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
Chapter Five Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command.
Network Simulator-2 Sandeep singla 1998A2A7540. NS-2 A discrete event simulator Focused on modeling network protocols –Wired, wireless –TCP,UDP,unicast,multicast.
NetFlow Very useful for traffic analysis Very useful for traffic analysis Standard sampler: Standard sampler: –Cisco Netflow –Juniper Traffic Sampling.
1 Network Simulator Tutorial. 2 Network Simulation * Motivation: Learn fundamentals of evaluating network performance via simulation Overview: fundamentals.
Introduction to Unix – CS 21 Lecture 12. Lecture Overview A few more bash programming tricks The here document Trapping signals in bash cut and tr sed.
Background of Wireless Communication Student Presentations and Projects Wireless Communication Technology Wireless Networking and Mobile IP Wireless Local.
The Impact of Active Queue Management on Multimedia Congestion Control Wu-chi Feng Ohio State University.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. a lesson approach Microsoft® Excel 2010 © 2011 The McGraw-Hill Companies,
Confidential ACL Functions Corporate Audit Services Technology Solutions Team Charlene Vallandingham and Jack Hauschild September 29, 2008.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
Spreadsheet Data Tables Data Table 1 allows you to change one input variable’s value at a time and record the impact that the input assumption has on several.
1 NS Fundamentals. USC INFORMATION SCIENCES INSTITUTE 2 OTcl and C++: The Duality C++ OTcl Pure C++ objects Pure OTcl objects C++/OTcl split objects ns.
1 Introduction to NS-2 r Tutorial overview of NS m Create basic NS simulation r Walk-through a simple example m Model specification m Execution and trace.
Basic & Advanced Reporting in TIMSNT ** Part Three **
Table of Contents TopicSlide Administrator Login 2 Administrator Navigations 3 Managing AlternativeDr.com Blogs 4 Managing Dr. Lloyd May Blogs 5 Managing.
Network Simulator 2. Introduction Open source network simulator NS uses two languages: C++ and OTcl  C++ is fast to run but slower to change Kernel 
The Excel Component -Screen Shots-. Excel Menu Showing All Functionality.
Introduction to Matlab
Use of Mobility models in ns-2 Karthik Dantu Shyam Kapadia.
IP-BASED MOBILITY FOR WIRELESS LANS WITH THE NETWORK SIMULATOR NS Frank Christahl, Andreas Huber, Matthias Rosenschon University of Applied Sciences Giessen-Friedberg.
– Introduction to the Shell 1/21/2016 Introduction to the Shell – Session Introduction to the Shell – Session 3 · Job control · Start,
1 Lecture 10 Introduction to AWK COP 3344 Introduction to UNIX.
ORAFACT Text Processing. ORAFACT Searching Inside Files grep - searches for patterns within files grep [options] [[-e] pattern] filename [...] -n shows.
Network Topology. Network Topology Cont. Sender = 0 and Receiver = 5 Sender = 0 and Receiver = 5 Sender transmits ftp traffic over TCP/IP to receiver.
CS 403: Programming Languages Lecture 20 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
Awk- An Advanced Filter by Prof. Shylaja S S Head of the Dept. Dept. of Information Science & Engineering, P.E.S Institute of Technology, Bangalore
1 UNIX Operating Systems II Part 2: Shell Scripting Instructor: Stan Isaacs.
NS-2 Training 12/12/2011. Introduction  NS-2: Network Simulator Generation 2  Latest Release: 2.35 / Nov. 4, 2011 
DETECTION OF WORMHOLE ATTACK IN MANET
Performance Evaluation of Ethernet Networks under different Scenarios Lab 6
Computer Application in Engineering Design
Choe, Hyun Jung (Stella)
Introduction to ns-2: “The” Network Simulator
Chapter 6 Filters.
What is Bash Shell Scripting?
The Linux Command Line Chapter 6
Guide To UNIX Using Linux Third Edition
Microsoft Excel 101.
References Awk – A Tutorial and Introduction NS by Example nile.wpi.edu/NS/
Introduction to Bash Programming, part 3
Presentation transcript:

M. Dahshan - TCOM52721 TCOM 5272 Telecomm Lab Dr. Mostafa Dahshan OU-Tulsa 4W 2 nd floor

M. Dahshan - TCOM52722 References  Awk – A Tutorial and Introduction  NS by Example nile.wpi.edu/NS/ nile.wpi.edu/NS/

M. Dahshan - TCOM52723

4 Awk utility  Awk is an excellent filtering and reporting utility  A pseudo-C interpreter  Same C arithmetic  Supports associative arrays (array index can be a variable of any type)

M. Dahshan - TCOM52725 Awk – Basic Structure  pattern { action }  pattern specifies when action is performed  Awk is line oriented  Default pattern matches every line  Two other important patterns BEGIN END

M. Dahshan - TCOM52726 Awk – Basic Structure  Example on an NS trace file cbr cbr r cbr BEGIN {print “Time\tSequence Number”} {print $2”\t”$11} END {print “DONE”}  Output TimeSequence Number DONE

M. Dahshan - TCOM52727 Calculating Packet Delay BEGIN { # simple awk script to generate end-to-end # packet lifetime statistics # in a form suitable for plotting with xgraph # Lloyd Wood, July # highest_packet_id = 0; }

M. Dahshan - TCOM52728 Calculating Packet Delay { action = $1; time = $2; node_1 = $3; node_2 = $4; src = $5; flow_id = $8; node_1_address = $9; node_2_address = $10; seq_no = $11; packet_id = $12;

M. Dahshan - TCOM52729 Calculating Packet Delay if ( packet_id > highest_packet_id ) highest_packet_id = packet_id; # getting start time is not a problem, provided you're not starting # traffic at 0.0. # could test for sending node_1_address or flow_id here. if ( start_time[packet_id] == 0 ) start_time[packet_id] = time; # only useful for small unicast where packet_id doesn't wrap. # checking receive means avoiding recording drops if ( action != "d" ) { if ( action == "r" ) { # could test for receiving node_2_address or flow_id here. end_time[packet_id] = time; } } else { end_time[packet_id] = -1; }

M. Dahshan - TCOM Calculating Packet Delay END { for ( packet_id = 0; packet_id <= highest_packet_id; packet_id++ ) { start = start_time[packet_id]; end = end_time[packet_id]; packet_duration = end - start; if ( start < end ) printf("%d %f\n", packet_id, packet_duration); }

M. Dahshan - TCOM Calculate Average Delay  First, calculate packet delay  { #increment number of lines num_lines++; #sum the delay values #column 2 is the packet delay sum_delay=sum_delay+$2; } END {print sum_delay/num_lines}

M. Dahshan - TCOM Calculating Dropped Packets BEGIN{dropped=0} { action = $1; if(action=="d") dropped++; } END{print dropped}

M. Dahshan - TCOM Calculating Throughput  Throughput = total number of bytes received  BEGIN{dest=3} { action = $1; node2 = $4; packet_size = $6; if(action=="r" && node2=dest) throughput + = packet_size; } END{throughput}

M. Dahshan - TCOM Calculating Jitter  Jitter = difference between packet delays  First, calculate packet delay

M. Dahshan - TCOM Calculating Jitter BEGIN {old_delay=0.0;} { delay = $2; if(old_delay>0) jitter=delay-old_delay; else jitter=0.0; #if(jitter<0) jitter = -jitter; old_delay = delay; print $1 " " jitter; }

M. Dahshan - TCOM cat, grep, wc  We can simplify processing by doing some pre-filtering using grep  We can also do some quick calculations by combining multiple small commands  Take the output of a command as an input to the next command (pipes)

M. Dahshan - TCOM Print only CBR Traffic  grep cbr out.tr cbr cbr cbr cbr r cbr cbr cbr cbr cbr r cbr

M. Dahshan - TCOM Print CBR Traffic From 2 to 3  grep "2 3 cbr" out.tr cbr cbr cbr cbr cbr cbr cbr cbr r cbr cbr

M. Dahshan - TCOM Print Only Received Packets  grep ^r out.tr r cbr r cbr r cbr r cbr r cbr r cbr r cbr r cbr r cbr r cbr

M. Dahshan - TCOM Print CBR Received at Node 3  grep ^r out.tr | grep "2 3 cbr" r cbr r cbr r cbr r cbr r cbr r cbr r cbr r cbr r cbr r cbr

M. Dahshan - TCOM Calculate Dropped Packets!  grep ^d out.tr | wc –l 18

M. Dahshan - TCOM527222

M. Dahshan - TCOM Trace Analysis Example  Download the file Trace Analysis Example simple-trace.tcl simple-trace.tcl

M. Dahshan - TCOM Activity 1: Calculate Packet Delay  Use the provided packet delay script to calculate the delay for CBR traffic only!  Save the output to a file cbr_delay.txt  Commands: ns ns-simple-trace.tcl grep cbr out.tr | awk -f pkt_delay.awk > cbr_delay.txt

M. Dahshan - TCOM Activity 2: Calculate Jitter  Use the provided packet jitter script to calculate the delay for CBR traffic  Save the output to a file cbr_jitter.txt  Commands: awk -f jitter.awk cbr_delay.txt > cbr_jitter.txt

M. Dahshan - TCOM Activity 3: Plot Delay and Jitter  Use xgraph or gnuplot to plot the delay and jitter for CBR traffic on the same graph  For xgraph xgraph cbr_delay.txt cbr_jitter.txt

M. Dahshan - TCOM Activity 3: Plot Delay and Jitter  Using gnuplot  gnuplot gnuplot>set key left top Right noreverse enhanced box gnuplot>set xlabel "Packet ID" gnuplot>set ylabel "Delay and Jitter (sec)" gnuplot>plot “cbr_delay.txt" using 1:2 title “Packet Delay" with lines 1, “cbr_jitter.txt" using 1:2 title “Jitter" with lines 2

M. Dahshan - TCOM Activity 4: Stochastic Fair Queue  Edit the ns-sample-trace.tcl script  Change the queue type from DropTail to SFQ  Save as ns-sample-trace-sfq.tcl  Recalculate delay, jitter and plot the results (cbr_delay_sfq.txt, cbr_jitter_sfq.txt)  Discuss your findings

M. Dahshan - TCOM Activity 4: Random Early Detection  Edit the ns-sample-trace.tcl script  Change the queue type from DropTail to RED  Save as: ns-sample-trace-red.tcl  Recalculate delay, jitter and plot the results (cbr_delay_red.txt, cbr_jitter_red.txt)  Discuss your findings