報告者:黃亮維 NS2 Chapter 26 Trace Support. Outline  Trace Support ‧ OTcl Helper Functions  Library support and examples  The C++ Trace Class  Trace File.

Slides:



Advertisements
Similar presentations
Wireless Communication : LAB 3
Advertisements

1 ns-2 Tutorial, part 2 Dave Anderson, Xiaowei Yang (Modified from Polly Huang’s slides)
1 NS Fundamentals (contd..) Padma Haldar USC/ISI.
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,
How to Add a New Protocol in NS2 Xu Leiming CSCW Lab. at CS Dept., Tsinghua Univ. June 1, 2001.
Introduction to NS. Information Main website Documentation, mailing list archive, tutorial Location of Source codes –C++ files.
OpenFlow Switch Specification-v part1 Speaker: Hsuan-Ling Weng Date: 2014/12/02.
Network Simulator 2 Tejas Vasavada.
Project Progress Presentation GENERATION OF NS2 TRACE FILES FOR SATELLITE-WIRELESS NETWORKS CS603 - Wireless Communications & Networks Summer II 2003 Wasim.
Chapter 3 Review of Protocols And Packet Formats
ECE 526 – Network Processing Systems Design Packet Processing II: algorithms and data structures Chapter 5: D. E. Comer.
EECS122 - UCB1 Measurements and Modeling Table of Contents 1. Measurements Measurements 2. Modeling and its Shortcomings Modeling and its Shortcomings.
Defining Network Protocols Application Protocols –Application Layer –Presentation Layer –Session Layer Transport Protocols –Transport Layer Network Protocols.
Introduction to Network Simulator NS-2 Part II
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Computer Communication and Networks Muhammad Waseem Iqbal Lecture # 07.
Process-to-Process Delivery:
Chapter 4: Managing LAN Traffic
Wireless Networking and Systems CSE 590 ns2 tutorial.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
THE OSI MODEL AND THE TCP/IP PROTOCOL SUITE CS 1202 Lectur3 part2.
1 / 10 Mobile Networking in ns Speaker : Mark Yang
Institut für Betriebssysteme und Rechnerverbund Technische Universität Braunschweig Multi hop Connectivity in Mobile Ad hoc Networks (MANETs) Habib-ur.
NS2 - Wireless Network Ming-Feng Yang. 2 2 Outline Basic wireless model Extensions wireless model Example - Ad hoc network Example – WLAN Example – Mobile.
1 Internet Protocol. 2 Connectionless Network Layers Destination, source, hop count Maybe other stuff –fragmentation –options (e.g., source routing) –error.
INTRODUCTION. What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language,
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
Date : 2010/11/23 Speaker : Chia-Wen Lu 1.  Network Simulation  Introduction to NS2  Simple Simulation Example 2.
Polytechnic University1 The internetworking solution of the Internet Prof. Malathi Veeraraghavan Elec. & Comp. Engg. Dept/CATT Polytechnic University
1 IP : Internet Protocol Computer Network System Sirak Kaewjamnong.
Wireless Software R&D Group, IITP RAS Kirill Andreev, Aleksey Kovalenko, Dmitriy Lakontsev Realization of IEEE802.11s draft standard in NS-3.3 Institute.
Network Simulator-2 Sandeep singla 1998A2A7540. NS-2 A discrete event simulator Focused on modeling network protocols –Wired, wireless –TCP,UDP,unicast,multicast.
COP 4930 Computer Network Projects Summer C 2004 Prof. Roy B. Levow Lecture 3.
1 Network Simulator Tutorial. 2 Network Simulation * Motivation: Learn fundamentals of evaluating network performance via simulation Overview: fundamentals.
CS4550 Computer Networks II IP : internet protocol, part 2 : packet formats, routing, routing tables, ICMP read feit chapter 6.
Chapter 15 The Addressing Structure in NS. The Default Address Format 32 lower bits for port-id, 1 higher bit for mcast and the rest 32 higher bits for.
1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.
Traffic Management - OpenFlow Switch on the NetFPGA platform Chun-Jen Chung( ) Sriram Gopinath( )
TCP/IP Protocol Architecture CSE 3213 – Fall
Design, Implementation and Tracing of Dynamic Backpressure Routing for ns-3 José Núñez-Martínez Research Engineer Centre Tecnològic de Telecomunicacions.
Performance Validation of Mobile IP Wireless Networks Presented by Syed Shahzad Ali Advisor Dr. Ravi Pendse.
Network Analyzer :- Introduction to Wireshark. What is Wireshark ? Ethereal Formerly known as Ethereal GUINetwork Protocol Analyzer Wireshark is a GUI.
Use of Mobility models in ns-2 Karthik Dantu Shyam Kapadia.
1 Connectivity with ARP and RARP. 2 There needs to be a mapping between the layer 2 and layer 3 addresses (i.e. IP to Ethernet). Mapping should be dynamic.
Network Topology. Network Topology Cont. Sender = 0 and Receiver = 5 Sender = 0 and Receiver = 5 Sender transmits ftp traffic over TCP/IP to receiver.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Communicating over the Network Network Fundamentals – Lecture 2 (CCNA1 – Chapter 2)
Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University.
Cisco I Introduction to Networks Semester 1 Chapter 6 JEOPADY.
Ch7: Link and Buffer Management. 2 Portrait of A Mobile Node Node ARP Propagation and antenna models MobileNode LL MAC PHY LL CHANNEL LL MAC PHY Classifier:
Introduction to Networks
NS2_Trace and Monitoring support 報告者:羅士捷
Lecture 3 By Miss Irum Matloob.
A quick intro to networking
Chapter 16 Mobile Networking in ns
Scaling the Network: The Internet Protocol
The OSI Model and the TCP/IP Protocol Suite
Mobicom ‘99 Per Johansson, Tony Larsson, Nicklas Hedman
Introduction to ns-2: “The” Network Simulator
Net 323: NETWORK Protocols
The OSI Model and the TCP/IP Protocol Suite
Data and Computer Communications by William Stallings Eighth Edition
Distributed Routing Protocol in Wireless Network Simulation
Process-to-Process Delivery:
Network Analyzer :- Introduction to Wireshark
Network Analyzer :- Introduction to Wireshark
Scaling the Network: The Internet Protocol
The OSI Model and the TCP/IP Protocol Suite
Process-to-Process Delivery: UDP, TCP
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

報告者:黃亮維 NS2 Chapter 26 Trace Support

Outline  Trace Support ‧ OTcl Helper Functions  Library support and examples  The C++ Trace Class  Trace File Format  Packet Types

Trace Support  Traces => Record each individual packet as it arrives, departs, or is dropped at a link or queue.  Trace data is either displayed directly during execution of the simulation, or (more commonly) stored in a file to be post-processed and analyzed.

Trace Support  The trace support in OTcl consists of a number of specialized classes visible in OTcl but implemented in C++ => Combined with a set of Tcl helper procedures and classes defined in the library. Trace/Hop : trace a hop Trace/Enque : packet arrival Trace/Deque : packet departure Trace/Drop : packet drop Trace/Recvpacket : receive event at the destination node of a link

OTcl Helper Functions  The following helper functions may be used within simulation scripts to help in attaching trace elements (see tcl/lib/ns-lib.tcl). $ns_ flush-trace This command flushes the trace buffer. $ns_ create-trace type file src dst This command creates a trace object of type between the and nodes. The traces are written into the.

OTcl Helper Functions $ns_ trace-queue n1 n2 optional:file This command creates a trace object for tracing events on the link represented by the nodes and. $ns_ drop-trace n1 n2 trace This command makes the given object a drop- target for the queue associated with the link between nodes and.

Library support and examples  The Simulator procedures described above require the trace and init-monitor methods associated with the OTcl Link class.  The trace function is defined as follows (in ns-link.tcl):

Library support and examples 11

加入 Trace 對象

The C++ Trace Class  The single C++ Trace class is used to implement the OTcl classes Trace/Hop, Trace/Enque, Trace/Deque, and Trace/Drop.  The type _ field is used to differentiate among the various types of traces any particular Trace object might implement. Currently, this field may contain one of the following symbolic characters: => + for enque, - for deque, h for hop, and d for drop.

The C++ Trace Class  The overall class is defined as follows in trace.cc:

Trace File Format  The []Trace::format method defines the trace file format used in trace files produced by the Trace class.  It formats the source, destination, and type fields defined in the trace object (not in the packet headers), the current time, along with various packet header fields including, type of packet (as a name), size, flags (symbolically), flow identifier, source and destination packet header fields, sequence number (if present), and unique identifier.

Trace File Format

 An example of a trace file (without the tcp header fields) might appear as follows:

Trace File Format  flags are used for ECN: =>TCP/IP 明確擁塞通知 (ECN) 讓路由器能夠通知「傳 輸控制通訊協定」 (TCP) 對等體,由於網路擁塞, 緩衝區已滿。 TCP 對等體會以減緩資料傳輸來回 應,協助防止封包損失。

Packet Types  Each packet contains a packet type field used by Trace::format to print out the type of packet encountered.  Initialization of the type field in packets is performed by the Agent::allocpkt method.  The type field is set to integer values associated with the definition passed to the Agent constructor.

Trace Support (wireless)  cmu-trace objects are of three types CMUTrace/Drop CMUTrace/Recv CMUTrace/Send

Trace Support (wireless)  An example of a trace for a tcp packet is as follows:  CMUTrace::format() defines and dictates the trace file format. (cmu-trace.cc)

Revised format for wireless traces  cmu-trace objects  $ns use-newtrace =>This command should be called before the universal trace command $ns trace-all  Note: Currently this new trace support is available for wireless.

new trace format

 Event type  In the traces above, the first field (as in the older trace format) describes the type of event taking place at the node and can be one of the four types: s send r receive d drop f forward

new trace format  General tag  The second field starting with "-t" may stand for time or global setting -t time -t * (global setting)

new trace format  Node property tags  denotes the node properties like node-id, the level at which tracing is being done like agent,router or MAC. The tags start with a leading "-N" and are listed as below: -Ni: node id -Nx: node’s x-coordinate -Ny: node’s y-coordinate -Nz: node’s z-coordinate -Ne: node energy level -Nl: trace level, such as AGT, RTR, MAC -Nw: reason for the event. The different reasons for dropping a packet are given below:

new trace format  Packet information at IP level  The tags for this field start with a leading "-I" and are listed along with their explanations as following: -Is: source address.source port number -Id: dest address.dest port number -It: packet type -Il: packet size -If: flow id -Ii: unique id -Iv: ttl value

new trace format  Next hop info  This field provides next hop info and the tag starts with a leading "-H". -Hs: id for this node -Hd: id for next hop towards the destination.  Packet info at MAC level  This field gives MAC layer information and starts with a leading "-M" as shown below: -Ma: duration -Md: dst’s ethernet address -Ms: src’s ethernet address -Mt: ethernet type

new trace format  Packet info at "Application level“ The packet information at application level consists of the type of application like ARP,TCP, the type of adhoc routing protocol like DSDV, DSR, AODV etc being traced. This field consists of a leading "-P“ and list of tags