report1 final

79
Table of Contents Introduction 1 Chapter 1 1. Network Simulator 1.1 Simulation Tool……………………………………………………….. 1.1.1 Why Simulation……………………………………………………… 1.1.2 Features of a network simulator………………………………………. 1.1.3 Ns Models…………………………………………………………… 1.1.4 Ns Components……………………………………………………… 1.1.5 NS Architecture ……………………………………………………… 2. What is NS-2 ……………………………………………………………. 2.1 NS-2 Generic Script Structure…………………………………………. 2.2 NAM (Network Animator)…………………………………………….. 2.3 TRACE FILE…………………………………………………………… 2.3.1 TRACE FILE FORMAT……………………………………………… Chapter 2 1.Transport layer Protocols 2.1.1 USER DATAGRAM PROTOCOL (UDP)……………………………… 2.1.2 Features of UDP…………………………………………………………. 2.1.3 Applications………………………………………………………………. 2.2 TRANSMISSION CONTROL PROTOCOL (TCP)………………………. 2.2.1 Features of TCP…………………………………………………………… 2.2.2 FLOW CONTROL……………………………………………………….. 1

Upload: atif-jalali

Post on 14-Dec-2015

234 views

Category:

Documents


1 download

DESCRIPTION

reposrt

TRANSCRIPT

Page 1: Report1 Final

Table of Contents

Introduction 1

Chapter 1 1. Network Simulator 1.1 Simulation Tool……………………………………………………….. 1.1.1 Why Simulation……………………………………………………… 1.1.2 Features of a network simulator………………………………………. 1.1.3 Ns Models…………………………………………………………… 1.1.4 Ns Components………………………………………………………  1.1.5 NS Architecture ………………………………………………………

2. What is NS-2 ……………………………………………………………. 2.1 NS-2 Generic Script Structure………………………………………….  2.2 NAM (Network Animator)…………………………………………….. 2.3 TRACE FILE…………………………………………………………… 2.3.1 TRACE FILE FORMAT………………………………………………

Chapter 2

1.Transport layer Protocols

2.1.1 USER DATAGRAM PROTOCOL (UDP)……………………………… 2.1.2 Features of UDP…………………………………………………………. 2.1.3 Applications………………………………………………………………. 2.2 TRANSMISSION CONTROL PROTOCOL (TCP)………………………. 2.2.1 Features of TCP…………………………………………………………… 2.2.2 FLOW CONTROL……………………………………………………….. 2.2.3 Congestion Cotrol…………………………………………………………. 2.2.4 Applications……………………………………………………………….

2.3 Stream Control Transmission Protocol (SCTP)……………………………… 2.3.1 SCTP Characteristics………………………………………………………. 2.3.2 Comparison of SCTP with TCP and UDP…………………………………. 2.3.3 Congestion Control………………………………………………………….

2.4 Real-time Transport Protocol (RTP)………………………………………… 2.4.1 What is meant by real-time…………………………………………………..

1

Page 2: Report1 Final

2.4.2 No Guarantee for timely Delivery…………………………………………. 2.4.2 Components of RTP………………………………………………………. 2.4.2.1 Data Transfer Protocol………………………………………………..

2.4.2.2 Real Time Control Protocol (RTCP)…………………………………..

2.4.3 Functions of RTCP………………………………………………………

2.4.4 RTP Sessions …………………………………………………………….

2.4.5 RTP-based systems………………………………………………………..

2.4.6 Applications of RTP………………………………………………………

Chapter 3Performance Parameters

3.1 Throughput…………………………………………………………………….3.2 Delay…………………………………………………………………………..3.3 Jitter……………………………………………………………………………3.4 TRAFFIC TYPES ………………………………………………………….3.4.1 Real Audio……………………………………………………………………3.4.2 Video Traffic (MPEG-4)……………………………………………………..3.4.2.1 Description…………………………………………………………………3.4.2.2 Advantages of MPEG-4…………………………………………………….

Chapter 4

WLAN 802.11b

4.1 Description……………………………………………………………………….

4.2 Range………………………………………………………………………………

4.3 Pros and Cons of 802.11b…………………………………………………………………

Chapter 5

SIMULATION AND ANALYSIS

5.1 Real Audio Traffic………………………………………………5.1.1 Wired to Wireless…………………………………………………………

2

Page 3: Report1 Final

5.1.2 Wireless to Wired

5.2 MPEG4 Traffic………………………………………….5.2.1 Wired to Wireless………………………………………………..5.2.2 Wireless to Wired ………………………………………………..

5.3 Delay………………………………………………………5.4 Jitter……………………………………………………….5.5 Increasing number of nodes………………………………..5.5.1 Wired to Wireless…………………………………………………..5.5.2 Wireless to Wired ………………………………………………….

3

Page 4: Report1 Final

ABSTRACT

Purpose of our project is to evaluate transport layer protocols like UDP,TCP,SCTP,TCP New Reno, RTP, on basis of their performance in heterogeneous while calculating throughput, delay and jitter. These performance parameters throughput, delay and jitter will be calculated by running different protocols for example real audio traffic and video traffic (MPEG-4) etc in heterogeneous network. Transport Protocol will be selected which will provide best result in different networking setups.

Providing multimedia applications such as video conferencing, real time video, audio and video streaming which are common now a days in the Internet, is considered to be very challenging and demanding over wireless networks. In wireless networks limited bandwidth support and lack of Quality of Service (QoS) at the air interface restrain wide deployment of these multimedia applications. One of the factors that affect the QoS is the transport protocol. The application performance can vary significantly when different transport protocols are employed. Currently UDP is mostly used for the transport of multimedia applications. However, UDP performance is not satisfactory due to several constraints such as lack of congestion control mechanism.

Chapter 1

4

Page 5: Report1 Final

1. Network Simulator1.1 Simulation Tool

Ns is a discrete event simulator targeted at networking research. Ns provides support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks.

1.1.1 Why Simulation 

Study of implemented protocols and algorithms Behavior Performance

Test of unimplemented new protocols and algorithms Comparison of results across research efforts

Simulation -- Advantage 

Inexpensive, Flexible and Reconfigurable Network phenomena interested can be  reproduced Opportunity to study large-scale Network Easier comparison of results across research efforts

Simulation -- Disadvantage 

Important details may be missed Protocols or algorithms must be “added” before simulation can be done High start-up cost Have to be carefully verified before the test results can be used.

1.1.2 What features should a simulator provide ? 

Easy Network topology setup Protocols and application implementation

TCP,UDP,SCTP etc FTP, Telnet, Web, CBR Routing protocols

Queue management protocols

Configurability Extensibility

1.1.3 Ns Models:

Traffic models and applications: Web, FTP, telnet, constant-bit rate, real audio, mpeg4.

Transport protocols:

5

Page 6: Report1 Final

Unicast: TCP (Reno, Vegas, etc.), UDP

Multicast: RTP.

Routing and queueing: Wired routing, ad hoc routting and directed diffusion

queueing protocols: RED, drop-tail, etc

Physical media: Wired (point-to-point, LANs), wireless (multiple propagation models), satellite

1.1.4 Ns Components 

Ns, the simulator itself

Nam, the network animator

Visualize ns (or other) output

Nam editor: GUI interface to generate ns scripts

Pre-processing: Traffic and topology generators

Post-processing: Simple trace analysis, often in Awk or Tcl.

1.1.5 NS Architecture 

Advantage: Reusability, Maintenance

Disadvantage: Performance (speed and memory)

Careful planning of modularity

2. What is NS-2 

Network Simulator, ns-2 is an object-oriented, discrete event driven network simulator developed at UC Berkely written in C++ and OTcl. Network Simulator is primarily useful for simulating local and wide area networks. Network simulator covers a very large number of applications, protocols, network types, network elements and traffic models.

2.1.1 NS-2 Generic Script Structure 

Create Simulator object [Turn on tracing] Create topology [Setup packet loss, link dynamics] Create routing agents Create application and/or traffic sources

6

Page 7: Report1 Final

Post-processing procedures (i.e. nam) Start simulation

Step1: Create Simulator Object 

The 1st step is to create the simulator object by using command

set ns [new Simulator]

Step2: Tracing 

Opens the file 'out.nam' for writing and gives it the file handle 'nf'.

set nf [open out. nam w]

Now tell the simulator object that we created above to write all simulation data that is going to be relevant for nam into this file.

    $ns namtrace-all $nf 

Post-Processing Procedures 

Add a 'finish' procedure that closes the trace file and starts nam.

 proc finish {} {

          global ns nf

          $ns flush-trace

#Close the NAM trace file

          close $nf

#Execute NAM on the trace file

          exec nam out.nam &

          exit 0

}

Step 3: Create network 

Two nodes, One link

7

Page 8: Report1 Final

figure 2.1: creation of two nodes

Nodes

The following two lines define the two nodes.

o set n0 [$ns node] o set n1 [$ns node]

new node object is created with the command '$ns node'. The above code will create two nodes and assigns them to the handles 'n0' and 'n1'.

Creating a larger topology 

for {set i 0} {$i < 7} {incr i} {

set n($i) [$ns node]

}

Step 4: Create Link & Queuing b/w two nodes

The next line connects the two nodes.

o $ns duplex-link $n0 $n1 1Mb 10ms RED

o $ns duplex-link $n0 $n1 <bandwidth> <delay> <queue_type> o <queue_type>: Drop Tail, RED, etc.

This line tells the simulator object to connect the nodes n0 and n1 with a duplex link with the bandwidth 1Megabit, a delay of 10ms and a Drop Tail queue.

Create Link & Queuing b/w more nodes

for {set i 0} {$i < 7} {incr i} {

$ns duplex-link $n($i) $n([expr ($i+1)%7]) 1Mb 10ms RED

}  

8

Page 9: Report1 Final

Step 5: Creating Agents

For UDP

These lines create a UDP agent and attach it to the node n0

set udp [new Agent/UDP]

$ns attach-agent $n0 $udp

Creating Null Agent

set null [new Agent/Null] 

$ns attach-agent $n1 $null 

For TCP

Creating TCP Agent

set tcp [new Agent/TCP]

$ns attach-agent $n0 $tcp

Creating Null Agent

set tcpsink [new Agent/TCPSink] 

$ns attach-agent $n1 $tcpsink 

For SCTP

Creating SCTP Agent

set tcp [new Agent/STCP]

$ns attach-agent $n0 $stcp

Creating Null Agent

set stcpsink [new Agent/STCP] 

$ns attach-agent $n1 $stcpsink 

9

Page 10: Report1 Final

Step 5: Creating traffic source

Attach a CBR traffic generator to the UDP agent. CBR is 'constant bit rate'.

The packet Size is being set to 500 bytes and a packet will be sent every 0.005 seconds (i.e. 200 packets per second).

CBR o set cbr [new Application/Traffic/CBR]

o $cbr set packetSize_ 500 o $cbr set interval_ 0.005

o $cbr attach-agent $udp

FTP

o set ftp [new Application/FTP] o $ftp attach-agent $tcp

Traffic timings

We have to tell the CBR agent when to send data and when to stop sending. Note: It's best to put the following lines just before the line '$ns at 5.0 "finish"'.

$ns at 0.5 "$cbr0 start"$ns at 4.5 "$cbr0 stop"

Now you can save the file and start the simulation again. When you click on the 'play' button in the nam window, it will be seen that after 0.5 simulation seconds, node 0 starts sending data packets to node 1. You can slow nam down then with the 'Step' slider.

figure 2.2: data flow between two nodes

I suggest that now you start some experiments with nam and the Tcl script.click on any packet in the nam window to monitor it, and you can also click directly on the link to get some graphs with statistics. We can try to change the 'packetsize_' and 'interval_' parameters in the Tcl script to see what happens.

10

Page 11: Report1 Final

Run Simulation 

Schedule Events

    $ns at <time> <event>

$ns at 0.5 "$cbr start"   

    $ns at 4.5 "$cbr stop“ 

Call ‘finish’

    $ns at 5.0 "finish"    

Run the simulation

    $ns run      

2.2 NAM (Network Animator)

Nam is a Tcl/Tk based animation tool for viewing network simulation traces and real world packet traces. It can support topology layout, packet level animation, and various data inspection tools. Simulation results from Network Simulator (NS) can be captured and feeded into NAM after a run has been completed.  NAM will plot simulated network and show animated packet flows between nodes. It can display detailed procedure of the simulation.

The network animator began in 1990 as a simple tool for animating packet trace data. The trace data is typically derived as output from a network simulator like ns or from real network measurements.

11

Page 12: Report1 Final

figure 2.3: name file format

2.3 TRACE FILE

Trace file is used for simulation analysis. The trace file contains topology information, e.g., nodes, links, as well as packet traces.The trace file is generated by NS. During ns simulation, user can produce topology configurations, layout information, and packet traces using tracing events in ns.Trace file is used to check that, how many packets sent(s), receive(r), drop (D), enqueue (+), dequeue (-), error (e) in the network.

Trace file format is different for

Wired ScenarioWireless Scenario

12

Page 13: Report1 Final

2.3.1 TRACE FILE FORMAT

The trace file events can be divided into 5 types, depending on to which object the event is associated.Below, we will discuss them.‘s’- send: packet is transmitted from source towards destination.‘r’ – Receive: The packet has finished transmission and started to be received at the destination.‘d’ - Drop. The packet was dropped from queue or link from source to receiver.‘+’ - Enterqueue. The packet entered the queue from source to receive.‘r’ - Leave queue. The packet left the queue from source to receiver.

The flags meanings:-t <time> is the time the event occurred.-e is the size (in bytes) of the packet.-s <src> is originating node.-d <dst> is destination node.

13

Page 14: Report1 Final

Chapter 2

1.Transport layer Protocols

2.1.1 USER DATAGRAM PROTOCOL (UDP) :

UDP is transport layer protocol which is layer 4 in open systems interconnection (OSI) communication model. It is a simple message based connectionless protocol because there is no effort made to establish a dedicated end to end connection between source and destination. Packets (messages) are sent in network as independent units while using udp.

2.1.2 Features of UDP

2.1.2.1 Unidirectional:Communication is done by transmitting data in one direction, from source to destination without checking whether destination is there or it is ready to receive information.

2.1.2.2 Unreliable:When a packet is sent, it is not known whether it will reach its destination, it could lost in the way so there is no concept of acknowledgement, retransmission and timeout.

2.1.2.3 Not rdered:If two messages are sent to required receiver, the order in which they arrive cannot be predicted. It is quite possible that later message reach destination earlier than first massage or vice versa.

2.1.2.4 Light Weighted:As there is no ordering of messages, no tracking connections so it is small, light weighted transport layer protocol. There are less overhead in udp.

2.1.2.5 Datagrams:Packets are sent individually, there will be no data streams. There is no guarentee for their delivery at receiver end and no protection from duplication . Packets have definite bounds and they cannot split or merge into data streams.

2.1.3 Applications

Voice and video traffic is generally transmitted using UDP. Multimedia applications uses UDP because they can tolerate some loss. UDP delay is less for real-time traffic. The main objective is to deliver packets on time, some amount of packet drop is acceptable.

14

Page 15: Report1 Final

For example, a single dropped packet in a video stream may not be detected by viewer, but attempting to recover the packet may cause delays that are detectable.About 5% of the packets in a voice stream can be dropped without detection. In multimedia traffic, speed is more important than reliability, and that is why application developers choose UDP.

2.2 TRANSMISSION CONTROL PROTOCOL (TCP):

TCP is connection oriented protocol which means a connection is established and maintained until messages are exchanged between transmitter and receiver.It is transport layer protocol which is layer 4 in open systems interconnection (OSI) communication model.

2.2.1 Features of TCP

2.2.1.1 Connection Establish:

TCP is a connection oriented protocol which means that upon communication it requires handshaking to set up end to end connection.Tcp uses three way handshakeHost A sends a tcp synchronize packet to host B.Host B receives A’s synchronize packet.Host B sends a synchronize acknowledgement to host A.Host A receives B’s synchronize acknowledgement.Host A sends acknowledgement to host B.Host B receives acknowledgement.Tcp connection is established between host A and host B.

Figure2.4: establishment of tcp connection through 3-way handshaking.

15

Page 16: Report1 Final

2.2.1.2 RELIABLE:It is responsible to ensure that a message has been delivered to proper destination.Many attempts are made by tcp for reliably deliver the message. If it gets lost along way, the server will request the lost part to be retransmit. the receiver is required to respond with an acknowledgment message to sender as it receives the data.

The sender keeps a record of each packet it sends, and waits for acknowledgment before sending the next packet so there is less probability for the loss of packet.If the ACK is not received within a timeout, the data is retransmitted.

The receiving TCP use sequence numbers to rearrange the segments when they arrive out of order, and to eliminate duplicate segments.It manages acknowledgement, retransmission, and timeout.

Figure2.5

2.2.1.3 ORDERED:

If two messages are transmitted along a connection, first message will reach receiver first. When data packets reach in wrong order, TCP layer holds later data until earlier data is rearranged and delivered to destination.

2.2.1.4 HEAVYWEIGHTED:

TCP uses three packets just to set up a socket, before any actual data can be sent. It controls, connections, reliability, and congestion control. It is a large transport layer protocol. Overhead is more.

2.2.1.5 STREAMING:

16

Page 17: Report1 Final

TCP transfers a contiguous stream of bytes. In tcp connection, data is treated as a stream, where one packet ends and other begins. Packets can be split or merged into smaller or bigger data streams arbitrarily. TCP itself can decide how to segment the data and it may forward the data at its own convenience.

2.2.1.6 Full Duplex:TCP provides for concurrent data streams in both directions.

2.2.2 FLOW CONTROL:

TCP uses an end-to-end flow control protocol to avoid having the sender send data too fast for the TCP receiver to reliably receive and process it. Having mechanism for flow control is essential in an environment where machines are of diverse network speeds communicate.Flow control is essential if application that is receiving the data is reading it more slowly than the sending application is sending it.TCP uses a sliding window flow control protocol. In every TCP segment, the receiver specifies in the receive window field the amount of additional received data (in bytes) that it is willing to buffer for the connection. Sending host can send only that amount of data before it must wait for an acknowledgment and window update from the receiving host.TCP sequence numbers and receive windows behave very much like clock.Receive window shifts each time the receiver receives and acknowledges a new segment of data.If it runs out of sequence numbers, the sequence number loops back to 0.When receiver advertises a window size of 0, the sender stops sending data and starts the persist timer. The persist timer is used to protect TCP from a deadlock situation that could arise if the window size update from the receiver is lost and the sender has no more data to send while the receiver is waiting for the new window size update. When persist timer expires, the TCP sender sends a small packet so that the receiver sends an acknowledgement with the new window size.

2.2.3 Congestion Cotrol

The final main aspect of TCP is congestion control. TCP uses number of mechanisms to achieve high performance and avoid 'congestion collapse where network performance can fall by several orders of magnitude. The mechanisms control the rate of data entering the network, keeping the data flow below a rate that would trigger collapse.

Acknowledgments for data sent, or lack of acknowledgments, are used by senders to detect network conditions between the TCP sender and receiver. Coupled with timers, TCP senders and receivers can alter the behavior of flow of data. This is referred to as congestion control and/or network congestion avoidance.

Modern implementations of TCP contain four intertwined algorithms: Slow-start, congestion avoidance, fast retransmit, and fast recovery.

17

Page 18: Report1 Final

2.2.4 Applications:

TCP is used extensively by many of the Internet's most popular applications, including the World Wide Web, E-mail, File Transfer Protocol and some streaming media applications.TCP is used for accurate delivery rather than timely delivery, and therefore, TCP sometimes offers relatively long delays (in seconds) while waiting for out-of-order messages or retransmissions of lost messages.It is not particularly suitable for real-time applications such as Voice over IP.

2.3 Stream Control Transmission Protocol (SCTP)

The Stream Control Transmission Protocol (SCTP) is a reliable transport layer

protocol that provides stable, ordered delivery of data between two endpoints (much

like TCP) and also preserves data message boundaries (like UDP). The purpose of

SCTP is to provide a reliable end-to-end message transportation service over IP-based

networks.

Stream Control Transmission Protocol (SCTP)is a reliable, message-oriented data transport protocol, operating on top of a connectionless packet network such as IP.

SCTP is designed to get rid the limitations and complexity of TCP while transporting real time signaling and data. SCTP is similar to TCP except that it can support multiple IP addresses at either or both ends.

SCTP has many interactive features as multi-homing and multi-streaming for video transport than TCP.However, unlike TCP and UDP, SCTP offers such advantages as multi-homing and multi-streaming capabilities, both of which increase availability.The term multi-streaming refers to the capability of SCTP to transmit several independent streams of chunks in parallel, for example transmitting Web page images together with the Web page text.

SCTP assigns a sequence number to each message sent in a stream. This can allow

independent ordering of messages in different streams. message ordering is optional

in SCTP; a receiving application may choose to process messages in the order they

are received instead of the order they were sent.

2.3.1 SCTP Characteristics

2.3.1.1Multihoming

18

Page 19: Report1 Final

It is defined as the ability of an association to support multiple IP addresses.sctp

supports it in which one (or both) endpoints of a connection can consist of more than

one IP address, This means it is a point-to-point protocol but with the ability to use

several addresses at the same end host. It can use different paths to reach the end host.

TCP breaks if the transport path breaks, unless the IP protocol corrects it.able to set

up different end nodes directly in the protocol, and hence doesn't have to rely on the

IP layer for resilience.

The benefit of multi-homing is greater survivability of the session in case of network

failures. Use of more than one address could allow re-routing of packets in event of

failure and also provide an alternate path for retransmissions

2.3.1.2 Multi-streaming.

This allows multiple simultaneous streams inside the same stream. So is given the name Stream Control Transmission Protocol. A single stream can be opened to download a single webpage, and all the images and html documents can then be downloaded within the same stream simultaneously. It is a database protocol which can create a separate control stream and then use several streams to receive the output from the different queries simultaneously. Stream Sequence numbers are included in the data packet to allow sequencing on a per-stream basis. This means that there would be no unnecessary head-of-line blocking between independent streams of messages in case of loss in one stream. SCTP provides a mechanism for designating order-of-arrival delivery as opposed to ordered delivery.

2.3.1.3 Reliable transmission.

It use checksums and SACK to detect corrupted, damaged, discarded, duplicated and reordered data. It can retransmit data as necessary. This is much the same as TCP, but SCTP is more resilient when it comes to reordered data and allows for faster pickups.

2.3.1.4 Message Orientation

In TCP, data sent between two endpoints is a stream of bytes.In SCTP, message boundaries are preserved. If an application sends a 100-byte message, the application will receive all 100 bytes in a single read: no more, no less. UDP provides a message-oriented service, but cannot reach SCTP's reliability.

2.3.1.5 Un-Ordered Service

In TCP, all messages are reliably delivered to a receiving application in exactly the order used by the sending application. In addition to ordered message service (and parallel ordered service discussed above), SCTP offers reliable delivery of messages with no order constraints. UDP provides unordered service, but without SCTP's reliability.

19

Page 20: Report1 Final

2.3.1.6 Rate adaptive.

It is developed to co-exist with TCP for bandwidth. It can scale up and down based on network load conditions just the same as TCP. It also has same algorithms for slow starting when packets where lost.

2.3.2 Comparison of SCTP with TCP and UDP

SCTP vs TCP vs UDP

Services/Features SCTP TCP UDP

Connection-oriented Yes yes no

Full duplex Yes yes yes

Reliable data transfer Yes yes no

Partial-reliable data transfer Optional no no

Ordered data delivery Yes yes no

Unordered data delivery Yes no yes

Flow control Yes yes no

Congestion control

Multihoming

Multistreaming

Yes

yes

yes

yes

no

no

No

no

no

20

Page 21: Report1 Final

Table 2.1: Comparison of SCTP with TCP and UDP

2.3.3 Congestion Control

The congestion control behaviour of an SCTP implementation may have an impact where timely delivery of messages is required (i.e. transport of signal data).,This ensures the proper behaviour of SCTP when it is introduced on a large scale into existing packet switched networks such as the Internet. The congestion control mechanisms for SCTP have been adapted for multihoming.

For every destination address (i.e. each path possible) a discrete set of flow and congestion control parameters is kept, such that from the point of view of the network, an SCTP association with a number of paths may behave similarly as the same number of TCP connections.

2.4 Real-time Transport Protocol (RTP)

RTP provides end-to-end network transport functions suitable for transmitting real-time data, such as audio, video or simulation data, over multicast or unicast network services.RTP does not provide any mechanism to ensure timely delivery or provide other quality-of-service guarantees, but relies on lower-layer services to do so. RTP itself does not guarantee real-time delivery of data, but it does provide mechanisms for the sending and receiving applications to support streaming data.

RTP protocol is designed for real-time, audio or video data flow transport.RTP supports data transfer to multiple destinations by using multicast.RTP provides no guarantee of the delivery, but sequencing of the data makes it possible to detect missing packets.RTP is regarded as the primary standard for audio/video transport in IP networks and runs on top of the UDP protocol.

21

Page 22: Report1 Final

2.4.1 What is meant by real-time?

The class of methods whose correctness or effictiveness depends not only on whether the result is the correct one, but also on the time at which the result is delivered.

For example: you want to listen to a song. When you are downloading from a site, you don't care whether it is downloaded at the same rate or not. You need a reliable download (preferably fast). But what if you want to listen to the song without downloading it? Then you are not only interested to get the whole data but also the rate at which you receive the data, otherwise the song loses its charm. Here you will need a real-time transmission.So time-factor is important in transmission of data. Real-time transmission is more important in multimedia conference.

2.4.2 RTP gives No Guarantee for timely Delivery

Rtp itself does not provide any mechanism to ensure timely delivery or provide other quality-of-service guarantees. It rely on lower layer services (e.g. UDP, TCP) to do so. It does not guarantee delivery or prevent out-of-order packet delivery.

2.4.2.1 So how come is it called a real-time protocol?

RTP provides suitable function for carrying real-time content, e.g., a timestamp and control mechanisms for synchronizing different streams with timing properties.

Timestamp is used to place incoming audio and video packets in the correct timing order. The sequence number is used to detect losses. Sequence numbers increase by one for each RTP packet transmitted, timestamps will increase by the time.

The sequence numbers included in RTP allow the receiver to reconstruct the sender's packet sequence which help it to detect missing packets.

2.4.2 Components of RTPThere are two parts of RTP

2.4.2.1 Data Transfer Protocol:

The RTP data transfer protocol manages delivery of real-time data (audio and video), between end systems. It is used for exchange of multimedia data, carries the media streams (e.g., audio and video), carry data that has real-time properties.

2.4.2.2 Real Time Control Protocol (RTCP):

The RTP control protocol (RTCP) is based on the periodic transmission of control packets to all participants in the session, using the distribution mechanism as the data packets.

2.4.3 Functions of RTCP

22

Page 23: Report1 Final

It monitors the quality of service and conveys information about the participants. RTCP is used to monitor transmission statistics and quality of service (QoS) information.

The RTP Control Protocol (RTCP) provide reception quality feedback, participant identification and synchronization between media streams. It is used to periodically send control information and Quality of service parameters.

By having each participant send its control packet to all the others, each can independently observe the number of participants. The number is used to calculate the rate at which the packets are sent. More users in a session means an individual source may send packets less frequently

While the RTP data packets are sent every few milliseconds, the control protocol operates on the scale of seconds. The information in RTCP is used for synchronization. The RTCP traffic is small when compared to the RTP traffic, around 5%.

2.4.4 RTP Sessions

An RTP session consists of a number of applications communicating with RTP, and is identified by a network address and two ports. One port can used for media data and the other for RTCP (real time transfer control protocol) control data.Session participants can receive, send, or do both. In a multimedia session Each media type is transmitted in a separate session (with its own RTCP packets reporting the reception quality for that session) enabling participants to choose which media types they want to receive. For example, user may just want the audio portion of a streaming music video.

2.4.5 RTP-based systems

RTP sender is responsible for capturing audio/video data and compressing them as frames using a suitable encoder. The encoded frames are transmitted as RTP packets. The sender may sometimes perform error correction and congestion control.

If compressed frames are large, they may be fragmented into several RTP packets, and if small, several frames may be bundled into a single RTP packet. The sender may or maynot make changes to the transmission, depending on the quality feedback received on RTCP.

The RTP receiver collects the RTP packets from the network, correcting any losses, recovering the timing, decoding the media data and presenting it to the user. It will also send reception quality to the sender via RTCP.

2.4.6 Applications of RTP

2.4.6.1 Simple Multicast Audio Conference

Initially the owner of the conference (say the leader of a group) through some allocation mechanism obtains a multicast group address and pair of ports. One port is

23

Page 24: Report1 Final

used for audio data, and other is used for control (RTCP) packets. This address and port information is distributed to intended participants. If privacy is desired, data and control packets may be encrypted, in which case an encryption key must also be generated and distributed.

Each participant send the audio data in small chunks (say 20ms) or packets. The structure of the packets will be discussed later.

Each instance of audio application (i.e. each participant) in the conference periodically multicasts a reception report plus name of its user on the RTCP (control) port. This helps to monitor quality of transmission and determine who the present participants are.

2.4.6.2 Audio and Video Conference

If both audio and video media are used in a conference, they are transmitted as separate RTP sessions RTCP packets are transmitted for each medium using two different UDP port pairs and/or multicast addresses. In a video conference, both ends of link need to act as RTP clients and RTP servers.

A conference having both audio and video would require two RTP sessions, one to handle each media type. On server end, a media stream might need to be captured with a video camera, and the audio and video components would each be transmitted on a RTP session. If video needed to be encoded in multiple formats for different receiver applications, several RTP sessions might be used.

2.5 TCP NEW-RENO:

BackgroundNew RENO is a slight modification over TCP-RENO. It is able to detectmultiple packet losses and thus is much more efficient that RENO in the event ofmultiple packet losses. Like Reno, New-Reno also enters into fast-retransmit when it receives multiple duplicate packets, however it differs from RENO in that it doesn’t exit fast-recovery until all the data which was out standing at the time it entered fast recovery is acknowledged. Thus it overcomes the problem faced by Reno of reducing the CWD multiples times.

2.5.1 DescriptionThe fast-transmit phase is the same as in Reno. The difference in the fast recoveryphase which allows for multiple re-transmissions in new-Reno. Whenever new-Reno enters fast recovery it notes the maximums segment which is outstanding. The fast-recovery phase proceeds as in Reno, however when a fresh ACK is received then there are two cases:

Case 1

24

Page 25: Report1 Final

If it ACK’s all the segments which were outstanding when we entered fast recoverythen it exits fast recovery and sets CWD to ssthresh and continues congestion avoidance like Tahoe.Case 2If the ACK is a partial ACK then it deduces that the next segment in line was lost and it re-transmits that segment and sets the number of duplicate ACKS received to zero.It exits Fast recovery when all the data in the window is acknowledged.

2.5.2 Characteristics of TCP New-Reno:It prevents many of the coarse grained timeouts of New-Reno as it doesn’t need to wait for 3duplicate ACK’s before it retransmits a lost packet.

Its congestion avoidance mechanisms to detect ‘incipient’ congestion are very efficient and utilize network resources much more efficiently.

Because of its modified congestion avoidance and slow start algorithm there are fewer retransmits.

2.5.3 TCP NEWRENO CONGESTION CONTROL

Modern TCP implementations incorporate congestion control algorithms that adapt the sending rate of the source according to perceived changes in available network bandwidth. This dynamic adaptation is achieved by computing the congestion window size (cwnd), a TCP state variable that places an upper bound on the number of (maximallysized) unacknowledged segments in the network. Depending on the congestion window adaptation policy in use, TCP may be classified as Tahoe, Reno, NewReno, SACK, or Vegas. The following sections briefly discussthe components of NewReno congestion control.

2.5.3.1 Slow Start and Congestion Avoidance

Let cwnd and ssthresh refer to the current congestion window size and the current slow start threshold, respectively.Then, if cwnd < ssthresh, receipt of a non-duplicate ACK results in cwnd increasing by one segment. Thus, in the absence of segment loss, cwnd doubles every round-trip time (RTT) until it reaches the slow start threshold value ssthresh.This algorithm is called the slow start algorithm.If cwnd¸ssthresh, cwnd increases by 1=cwnd for each non-duplicate ACK received. This window evolution in which the congestion window size increases by about one segment every RTT is referred to as the congestion avoidance algorithm.

2.5.3.2 Fast Retransmit and Fast Recovery

25

Page 26: Report1 Final

During slow start or congestion avoidance, receipt of four back-to-back identical ACKs (referred to as “triple duplicate ACKs”) causes the sender to perform fast retransmit. In fast retransmit, sender does the following. First, the segment implicitly requested by the triple duplicate ACK isretransmitted. Second, s sthresh is set to cwnd=2. Third, cwnd is set to s sthresh (new) plus 3 segments. Following these steps, the sender enters fast recovery. Upon entering fast recovery, the sender continues to increase the congestion window by one segment for each subsequent duplicate ACK received. The intuition behind the fast recoveryalgorithm is that duplicate ACKs indicate the reception of some segments by the receiver, and thus can be used to trigger new segment transmissions. The sender transmits new segments if permitted by its congestion window.TCP NewReno (unlike Reno) distinguishes between a “partial” ACK and a “full” ACK. A full ACK acknowledges all segments that were outstanding at the start of fast recovery, while a partial ACK acknowledges some but not all of this outstanding data. Unlike Reno, where a partial ACK terminates fast recovery, NewReno retransmits the segment next in sequence based on the partial ACK, and reduces the congestion window by one less than the number of segmentsacknowledged by the partial ACK. This window reduction, referred to as partial window deflation, allows the sender to transmit new segments in subsequent RTTs of fast recovery.On receiving a full ACK, the sender sets cwnd to ssthresh, terminates fast recovery, and resumes congestion avoidance.

2.5.3.3 Slow-but-Steady versus Impatient

The Slow-but-Steady (SBS) variant of NewReno resets the retransmit timer on receipt of each partial ACK. Thus, the Slow-but-Steady variant can recover from multiple segment losses in the same window by potentially retransmitting one lost segment per RTT. The TCP sender remains in fast recovery mode until a full ACK is received. The Impatient (IMP) variant of NewReno resets the retransmit timer only for the first partial ACK. Thus, the Impatient variant attempts to avoid lengthy fast recovery periods by invoking slow start following a timeout, and recovering lostsegments using a Go-back-N approach. Exactly when the Impatient variant experiences a timeout depends upon the retransmit timeout (RTO) estimation technique and the timer granularity. For example, if 2RTT < RTO < 3RTT, Impatient will continue in fast recovery forat least 3 RTTs. Thus, if 4 or more segments are dropped from a large window, Impatient will incur a timeout. In RFC 3782, the Impatient variant is recommended over the Slowbut- Steady variant.

Chapter 3Performance Parameters

26

Page 27: Report1 Final

3.1 Throughput

Network throughput is the average rate of successful message delivery over a communication channel. These data may be delivered over a physical or logical link, or pass through a certain network node.

The throughput is usually measured in bits per second (bit/s or bps), and sometimes in data packets per second or data packets per time slot. The system throughput is the sum of the data rates that are delivered to all terminals in a network.

Typical method of performing a measurement is to transfer a 'large' file and measure time taken to do so. The throughput is then calculated by dividing the file size by the time to get the throughput in megabits, kilobits, or bits per second.

The amount of data transferred from Sender to Receiver in a specified amount of time. In our experiment we take the throughput as:

Throughput = Number of Received Bits / Simulation Time

3.2 Delay

The amount of time by which an event is retarded. Delay is difference of time interval of receiving packet with respect to transmitted packet. The delay definition according to our experimental setup is:Delay = Packet a– Packet bWherea = current packetb= previous packetWe are calculating average delay in our experimental setup.

3.3 Jitter

It is difference of two consecutive delays of receiving packets. Instantaneous jitter is calculated by using formula given below:jitter = Delay of Packet a – Delay of Packet bWe are taking average of instantaneous jitter.

3.4 WLAN 802.11b

Overview of IEEE 802.11b

27

Page 28: Report1 Final

IEEE 802.11 is a set of standards carrying out wireless local area network (WLAN) computer communication in the 2.4, 3.6 and 5 GHz frequency bands. They are implemented by the IEEE LAN/MAN Standards Committee (IEEE 802).

3.4.1 Description

802.11b has a maximum raw data rate of 11 Mbit/s. The increase in throughput of 802.11b (compared to the original standard) along with simultaneous substantial price reductions led to the rapid acceptance of 802.11b as the definitive wireless LAN technology.

802.11b standard (also known as 802.11 High Rate) is used for transmissions of up to 11 Mbps. 802.11b devices can suffer interference from other products operating in the 2.4 GHz band.

In practice the maximum 802.11b throughput that an application can achieve is about 5.9 Mbit/s using TCP and 7.1 Mbit/s using UDP.802.11b, WLANs will be able to achieve wireless performance and throughput comparable to wired Ethernet. With 802.11b WLANs, mobile users can get Ethernet levels of performance, throughput, and availability

3.4.2 Range

802.11b is used in a point-to-multipoint configuration, wherein an access point communicates via an omni-directional antenna with one or more nomadic or mobile clients that are located in a coverage area around the access point.

Indoor range can be 30 m (100 ft) at 11 Mbit/s and 90 m (300 ft) at 1 Mbit/s.

IEEE 802.11b

Release date

Frequency band

Throughput (type)

Net bit rate (max.)

Range (indoor)

October 1999

2.4 GHz 5 M bit/s 11 M bit/s 30 m

Figure: Description of WLAN IEEE 802.11b

802.11b supports bandwidth up to 11 Mbps, comparable to traditional Ethernet.

28

Page 29: Report1 Final

802.11b uses the same unregulated radio signaling frequency (2.4 GHz) as the original 802.11 standard. Vendors often prefer using above frequencies to lower their production costs.

3.4.3 Pros and Cons of 802.11b

Pros of 802.11b

Lowest cost; signal range is good and not easily obstructed

Cons of 802.11b

Slowest maximum speed; home appliances may interfere on the unregulated frequency band.

 

.

Chapter 4

TYPES OF TRAFFIC

4.1 Real Audio

29

Page 30: Report1 Final

RealAudio is a proprietary audio format developed by Real Networks. It uses a variety of audio codec, ranging from low-bit rate formats that can be used over dialup modems, to high-fidelity formats for music.

It can also be used as a streaming audio format that is played at the same time as it is downloaded. In the past, many internet radio stations used RealAudio to stream their programming over the internet in real time. In recent years, the format has become less common and has given way to more popular audio formats. It is used heavily by the BBC websites.

Streaming media is multimedia that is constantly received by, and normally presented to, an end-user while it is being delivered by a streaming provider (the term presented is used in this article in a general sense that includes audio or video playback).

Name refers to delivery method of the medium rather than to the medium itself. The distinction is usually applied to media that are distributed over telecommunications networks, as most other delivery systems are either inherently streaming (e.g. radio, television) or inherently non-streaming (e.g. books, video cassettes, audio CDs). The verb 'to stream' is derived from this term, meaning to deliver media in this manner.

4.2 Video Traffic (MPEG-4)

MPEG4 is the one that is most suitable for the Internet. It is targeted for low bit rates. It allows real images to co-exist with computer-generated counterparts and also allows their separation and their receiving different treatment due to interaction with the user. The main feature of importance to the network is MPEG4’s capability of real-time adaptive encoding. This enhances network utilization and enables MPEG4 senders to be more responsive to changes in network condition.

4.2.1 Description

In the simulation the MEPG4 (video) rate can be increased or decreased by changing the value of rate factor variable.

MPEG-4 provides not only description for coding audio and video (as its predecessors MPEG-1 and MPEG-2), but also for coding images, animations, interactivity, protecting content, and distributing content on various transport channels such as an MPEG-2 transport stream for digital broadcast, or as an IP (Internet Protocol) network for broadband streaming.

4.2.2 Advantages of MPEG-4

Open, international standard: MPEG-4 is interoperable between products, ensuring multi-vendor support. Over 300 companies have spent over $500 million creating various products based on the MPEG-4 standard.

30

Page 31: Report1 Final

cost saving on bandwidth and storage: MPEG-4 files result in a 50 percent improvement over MPEG-2 files.

Monetization of digital media asset, engagement of end user: With MPEG-4, you can create interactive media using multiple objects - audio, video, PowerPoint, 2D, and animation - in a single format. In addition, you can also protect and monetize your content through digital rights management interfaces.

Broadest supports for networks and devices: MPEG-4 provides optimal audio/video quality for low- and high-bandwidth networks. MPEG-4 file can be played back on multiple devices such as TV set-tops, PCs, and wireless devices.

4.3 File Transfer Protocol

File Transfer Protocol (FTP) is a network layer protocol which is layer 3 in open systems interconnection (OSI) communication model. It is used to exchange and manipulate files over a TCP computer network. The objectives of FTP are:

File Sharing. Using of remote computers. Protect a user from variations in file storage system in between Different hosts. Reliable and efficient data transfermation.

4.3.1 Connection Methods

FTP runs over TCP. FTP listens on port 21 for incoming connections from FTP clients.FTP uses two channels for communication i-e FTP uses out of band control.1: Data channel.2: Associated Control channel:

1: Data channel: Actual file transfer takes place in data stream. Port 20 for data channel.2: Control channel: Commands are passed using this channel. Port 21 is used for control (or program). Control stream remains idle during data transfer in data stream.

4.3.2 FTP Return CodesFTP return codes indicate status using different digits. Each digit have its own meaning. Following are FTP return codes:

31

Page 32: Report1 Final

1xx: Positive Preliminary reply: The action requested is initiated but there will be another reply before it starts.2xx: Positive Completion reply: Requested action is completed. Client can issue a new command.3xx: Positive Intermediate reply: Command is successful, but server needs another command to fulfill the request.4xx: Transient Negative Completion reply: Command failed, but the failure is temporary client is free to try the command again.5xx: Permanent Negative Completion reply: Command failed and the client cannot repeat it again.x0x: syntax error.x1x: reply to a request for information.x2x: reply relating to connection information.x3x: reply relating to accounting and authorization.x4x: Unspecified.x5x: indicate the status of the Server file system.

4.3.3 Anonymous FTP

Any anonymous user can use FTP service and there is no login or verification required. For example, following are the anonymous passwords for different FTP agents:

Mozilla Firefox: [email protected] KDE Konqueror: anonymous@ Wget:-wget@ Lftp:lftp@

FTP and web browsersRecent browsers work as an interface to connect to FTP servers and help us to exchange and manipulate files. An FTP address looks like an HTTP, or Website address and uses a prefix ftp:// instead of http://.

4.4 Constant Bit Rate (CBR)

4.4.1 Bit rate

Bit rate is a measures rate of information content in a stream. Its units are bit/s or bps or Megabits per second (Mbit/s). Bit rate is directly proportional to quality of data. Variable bit rate (VBR) improves quality and decreases the bit rate. On fast moving scenes, a variable bit rate uses more bits than it does on slow ones of similar duration

32

Page 33: Report1 Final

and achieves a consistent visual quality. CBR (Constant Bit Rate) must be used for real-time and non-buffered video streaming

4.4.2 CBRConstant bit rate (CBR) is a term related to QoS (Quality of Service) in telecommunications. A uniform transmission rate, for example, real-time voice and

video traffic needs a CBR.

In codecs, CBR-encoding means that the rate at which a codec's output data is consumed is constant. CBR is essential for streaming multimedia applications on limited capacity channels because it is the maximum bit rate that is important (not the average bit rate). CBR can be used to get the benefit of capacity.

CBR cannot be the optimum for storage as it cannot allocate enough data space for complex sections (resulting in degraded quality) and wastes data on simple sections.This problem can be solved by choosing high data rate to ensure that there are enough bits for the encoding process but size of the file increases.

Chapter 5

SIMULATION AND ANALYSIS

Heterogeneous Network

33

Page 34: Report1 Final

5.1 Throughput

5.1.1 CBR Traffic

Wired to wireless

In the first case what we are doing is that we have made a wired connection between sender and access point and a wireless connection between access point and receiver. We are running Real Audio traffic on different protocols such as UDP, TCP, SCTP, RTP, and TCP NEWRENO. Then after the above steps we have calculated the throughput readings.

Figure-5.1: wired connection between sender and access point, wireless connection between access point and receiver

CBRsend rate

TCP NEWRENO

Rcvd bytes(Mb)

TCPRcvd

bytes(Mb)

SCTPRcvd

bytes(Mb)

UDPRcvd

bytes(Mb)

RTPRcvd

bytes(Mb)

1 0.7 0.7 0.9 0.58 0.6

34

Page 35: Report1 Final

2 1.4 1.3 1.7 1 1.13 2.1 1.9 2.77 1.38 1.64 2.65 2.4 3.55 1.88 2.25 3.3 3 4.4 2.55 2.66 4.1 3.7 5.2 2.96 3.17 5.07 4.7 5.7 3.47 3.68 5.56 5.22 6.3 3.94 4.19 5.8 5.5 6.7 4.45 4.6

10 6.3 6 7 4.96 5.111 6.8 6.5 7.5 5.39 5.712 7.4 7.1 7.9 5.79 6.113 7.6 7.4 8.3 6.22 6.314 7.65 7.44 8.31 6.23 6.3215 7.77 7.45 8.32 6.27 6.3316 7.77 7.45 8.32 6.27 6.3317 7.77 7.45 8.32 6.27 6.3318 7.77 7.45 8.32 6.27 6.33

Table-5.1: Throughput comparisons of different protocols

Throughput

(Mbps)

Send rate (mbps)

Figure-5.2: Throughput comparisons of different protocolsAt send rate of 4Mb maximum number of received bytes for SCTP are 3.55Mb, the receive rate for TCP Newreno is 2.65 for TCP is 2.4 for RTP is 2.2 and least rate is of UDP which is 1.8Mb

From table 5.1 Throughput of SCTP is greater than TCP Newreno and TCP due to its multihoming nature. SCTP has ability to support multiple IP addresses. It can use different paths to reach the end host. TCP in comparison if connection breaks the

35

Page 36: Report1 Final

transport path breaks so use of more than one address could allow re-routing of packets in event of failure and also provide an alternate path for retransmissions.

Throughput of UDP is least among other protocols. This is because percentage of packet loss in UDP is very high and due to unreliable performance of this protocol.As there is no concept of acknowledgement, retransmission of packets so probability of missing a packet (data) is always in UDP.

In the case of SCTP, TCP and TCPNewreno the number of send and received bytes after reaching a certain limit become constant. This is due to congestion control in the these protocols but In the case of RTP and UDP we can see that as we increase the send bytes the number of bytes send rate increases and increases but don’t stop at one reading but the number of received bytes after reaching a certain limit stop to increase and nearly become constant. This is because the numbers of send bytes are increasing but there is a limit to number of bytes that can be received. As there is maximum size of the receive buffer and number of bytes that are received cannot exceed the buffer size.

According to the above readings it can be seen that SCTP provides the best performance when calculating throughput

CBR Wireless to wired

Figure 5.3: wireless connection between sender and access point and wired connection between access point and receiver

CBRsend rate

TCP NEWRENO

Rcvd

TCP Rcvd

bytes(Mb)

SCTPRcvd

bytes(Mb)

UDPRcvd

bytes(Mb)

RTPRcvd

bytes(Mb)

36

Page 37: Report1 Final

bytes(Mb)1 0.75 0.72 0.9 0.582 0.62 1.45 1.33 1.73 1.01 1.13 2.02 1.92 2.4 1.42 1.64 2.7 2.67 3 2 2.25 3.3 3.22 3.9 2.31 2.46 4.05 3.92 4.8 2.62 2.97 4.95 4.7 5.5 3.1 3.48 5.5 5.1 6 3.7 49 5.9 5.6 6.6 4.43 4.8

10 6.33 6 7 5.01 5.311 6.9 6.7 7.5 5.42 5.712 7.55 7.2 7.9 5.77 613 8.1 7.7 8.31 6.41 6.614 8.3 8.3 8.31 6.82 715 8.31 8.31 8.32 6.83 7.0516 8.31 8.31 8.32 6.83 7.0517 8.31 8.31 8.32 6.83 7.0518 8.31 8.31 8.32 6.83 7.05

Table-5.2: Throughput comparisons of different protocols

Throughput (Mbps)

Send rate (mbps)

Figure-5.4: Throughput comparisons of different protocols

At send rate of 4Mb maximum number of received bytes for SCTP are 3Mb, the receive rate for TCP Newreno is 2.7 for TCP is 2.6 for RTP is 2.2 and least rate is of UDP which is 2Mb

37

Page 38: Report1 Final

In the case of SCTP, TCP and TCPNewreno the number of send and received bytes after reaching a certain limit become constant. This is due to congestion control in the these protocols but In the case of RTP and UDP we can see that as we increase the send bytes the number of bytes send rate increases and increases but don’t stop at one reading but the number of received bytes after reaching a certain limit stop to increase and nearly become constant. This is because the numbers of send bytes are increasing but there is a limit to number of bytes that can be received. As there is maximum size of the receive buffer and number of bytes that are received cannot exceed the buffer size. Throughput of SCTP is greater than TCP Newreno and TCP due to its multihoming nature. SCTP has ability to support multiple IP addresses. It can in other word use different paths to reach the end host. TCP in comparison if connection breaks the transport path breaks so use of more than one address could allow re-routing of packets in event of failure and also provide an alternate path for retransmissions.Throughput of UDP is least among other protocols. This is because percentage of packet loss in UDP is very high and due to unreliable performance of this protocol.As there is no concept of acknowledgement, retransmission of packets so probability of missing a packet (data) is always in UDP.

According to the above readings it can be seen that SCTP provides the best performance when calculating throughput

5.1.2 FTP Wired to wireless

38

Page 39: Report1 Final

Figure-5.5: wired connection between sender and access point, wireless connection between access point and receiver

FTPsend rate

TCP NEWRENO

Rcvd bytes(Mb)

TCPRcvd

bytes(Mb)

SCTPRcvd

bytes(Mb)

UDPRcvd

bytes(Mb)

RTPRcvd

bytes(Mb)

1 0.75 0.75 0.95 0.63 0.652 1.45 1.35 1.75 1.05 1.153 2.15 1.95 2.82 1.43 1.654 2.8 2.65 3.6 1.93 2.255 3.35 3.25 4.45 2.6 2.656 4.15 3.95 5.25 3.01 3.157 5.12 4.75 5.75 3.52 3.658 5.61 5.27 6.05 3.99 4.159 6 5.55 6.45 4.5 4.65

10 6.3 6 7 5.01 5.1511 6.85 6.5 7.35 5.44 5.7512 7.55 7 7.95 5.8 6.1513 7.65 7.45 8.35 6.27 6.3514 7.7 7.49 8.36 6.28 6.3715 7.82 7.5 8.37 6.32 6.3816 7.82 7.5 8.37 6.32 6.3817 7.82 7.5 8.37 6.32 6.3818 7.82 7.5 8.37 6.32 6.38

Table-5.3: Throughput comparisons of different protocols

39

Page 40: Report1 Final

Throughput

(Mbps)

Send rate (mbps)

Figure-5.6: Throughput comparisons of different protocolsAt send rate of 4Mb maximum number of received bytes for SCTP are 3.6 Mb, the receive rate for TCP Newreno is 2.8 for TCP is 2.65 for RTP is 2.2 and least rate is of UDP which is 1.93Mb

Throughput of UDP is least among other protocols. This is because percentage of packet loss in UDP is very high and due to unreliable performance of this protocol.As there is no concept of acknowledgement, retransmission of packets so probability of missing a packet (data) is always in UDP.

In the case of SCTP, TCP and TCPNewreno the number of send and received bytes after reaching a certain limit become constant. This is due to congestion control in the these protocols but In the case of RTP and UDP we can see that as we increase the send bytes the number of bytes send rate increases and increases but don’t stop at one reading but the number of received bytes after reaching a certain limit stop to increase and nearly become constant. This is because the numbers of send bytes are increasing but there is a limit to number of bytes that can be received. As there is maximum size of the receive buffer and number of bytes that are received cannot exceed the buffer size. According to the above readings it can be seen that SCTP provides the best performance when calculating throughput

40

Page 41: Report1 Final

FTP Wireless to wired

Figure 5.7: wireless connection between sender and access point and wired connection between access point and receiver

FTPsend rate

TCP NEWRENO

Rcvd bytes(Mb)

TCPRcvd

bytes(Mb)

SCTPRcvd

bytes(Mb)

UDPRcvd

bytes(Mb)

RTPRcvd

bytes(Mb)

1 0.8 0.77 0.95 0.632 0.652 1.5 1.38 1.78 1.06 1.153 2.07 1.97 2.45 1.47 1.654 2.75 2.72 3.05 2.05 2.255 3.35 3.27 3.95 2.36 2.456 4.1 3.97 4.7 2.67 2.957 5 4.85 5.5 3.1 3.458 5.55 5.25 6 3.95 4.059 5.85 5.57 6.65 4.48 4.85

10 6.38 6.35 7.05 5.06 5.3511 6.95 6.75 7.55 5.47 5.7512 7.6 7.45 7.95 5.82 6.0513 8.15 8.05 8.36 6.46 6.6514 8.35 8.35 8.36 6.87 7.0515 8.36 8.36 8.37 6.88 7.116 8.36 8.36 8.37 6.88 7.117 8.36 8.36 8.37 6.88 7.118 8.36 8.36 8.37 6.88 7.1

41

Page 42: Report1 Final

Table-5.4: Throughput comparisons of different protocols

Throughput

(Mbps)

Send rate (mbps)Figure-5.8: Throughput comparisons of different protocolsThroughput of UDP is least among other protocols. This is because percentage of packet loss in UDP is very high and due to unreliable performance of this protocol.As there is no concept of acknowledgement, retransmission of packets so probability of missing a packet (data) is always in UDP. In the case of SCTP, TCP and TCPNewreno the number of send and received bytes after reaching a certain limit become constant.In the case of SCTP, TCP and TCPNewreno the number of send and received bytes after reaching a certain limit become constant. This is due to congestion control in the these protocols but In the case of RTP and UDP we can see that as we increase the send bytes the number of bytes send rate increases and increases but don’t stop at one reading but the number of received bytes after reaching a certain limit stop to increase and nearly become constant. This is because the numbers of send bytes are increasing but there is a limit to number of bytes that can be received. As there is maximum size of the receive buffer and number of bytes that are received cannot exceed the buffer size.

According to the above readings it can be seen that SCTP provides the best performance when calculating throughput

Wired to WirelessIn the first case what we are doing is that we have made a wired connection between sender and access point and a wireless connection between access point and receiver. We are running Real Audio traffic on different protocols such as UDP, TCP, SCTP, RTP, and TCP NEWRENO. Then after the above steps we have calculated the throughput readings.

42

Page 43: Report1 Final

Figure-5.9: wired connection between sender and access point, wireless connection between access point and receiver

Real audiosend rate

TCP NEWRENORcvd bytes(Mb)

TCP Rcvd bytes(Mb)

SCTPRcvd bytes(Mb)

UDPRcvd bytes(Mb)

RTPRcvd bytes(Mb)

1 0.6 0.6 0.8 0.48 0.52 1.3 1.2 1.6 0.9 13 2 1.8 2.67 1.28 1.54 2.55 2.5 3.45 1.78 2.15 3.2 3.1 4.3 2.45 2.56 4 3.8 5.1 2.86 37 4.97 4.6 5.6 3.37 3.58 5.46 5.12 5.9 3.84 49 5.7 5.4 6.3 4.35 4.5

10 6.1 5.8 6.7 4.86 511 6.7 6.6 7.2 5.29 5.612 7.4 7.2 7.8 5.69 613 7.5 7.3 8.2 6.12 6.214 7.55 7.34 8.21 6.13 6.2215 7.67 7.35 8.22 6.17 6.2316 7.67 7.35 8.22 6.17 6.2317 7.67 7.35 8.22 6.17 6.2318 7.67 7.35 8.22 6.17 6.23

Table-5.5: Throughput comparisons of different protocols

43

Page 44: Report1 Final

From table 5.5 Throughput of SCTP is greater than TCP Newreno and TCP due to its multihoming nature. SCTP has ability to support multiple IP addresses. It can in other word use different paths to reach the end host. TCP in comparison if connection breaks the transport path breaks so use of more than one address could allow re-routing of packets in event of failure and also provide an alternate path for retransmissions.It can also be seen from table that as we increase number of send bytes a value comes that after which send rate becomes constant and cannot be increased, this is due to congestion control in TCP, TCP Newreno and SCTP. At send rate of 4Mb maximum number of received bytes for SCTP are 3.45Mb, the receive rate for TCP Newreno is 2.55 for TCP is 2.5 for RTP is 2.1 and least rate is of UDP which is 1.78Mb

Throughput

(Mbps)

Real audio rate (mbps)

Figure-5.10: Throughput comparisons of TCP, SCTP and TCP Newreno

Throughput of UDP is least among other protocols. This is because percentage of packet loss in UDP is very high and due to unreliable performance of this protocol.As there is no concept of acknowledgement, retransmission of packets so probability of missing a packet (data) is always in UDP.

According to table 5.2 we can see that as we increase the send bytes the number of bytes send rate increases and increases but don’t stop at one reading but the number of received bytes after reaching a certain limit stop to increase and nearly become constant. This is because the numbers of send bytes are increasing but there is a limit to number of bytes that can be received. As there is maximum size of the receive buffer and number of bytes that are received cannot exceed the buffer size.

44

Page 45: Report1 Final

According to the above readings it can be seen that SCTP provides the best performance when calculating throughput

Wireless to Wired In the second case we have set the scenario as follows:There is wireless connection between sender and access point and wired connection between access point and receiver. We are running Real Audio traffic on different protocols such as UDP, TCP, SCTP, RTP, and TCP NEWRENO. Then after the above steps we have calculated the readings.

Figure 5.11: wireless connection between sender and access point and wired connection between access point and receiver

45

Page 46: Report1 Final

Real audiosend rate

TCP NEWRENORcvd bytes(Mb)

TCP Rcvd bytes(Mb)

SCTPRcvd bytes(Mb)

UDPRcvd bytes(Mb)

RTPRcvd bytes(Mb)

1 0.65 0.62 0.8 0.482 0.52 1.35 1.23 1.63 0.91 13 1.92 1.82 2.3 1.32 1.54 2.6 2.57 2.9 1.9 2.15 3.2 3.12 3.8 2.21 2.36 3.95 3.82 4.3 2.52 2.87 4.85 4.7 5 2.8 3.38 5.4 5.1 5.6 3.8 3.99 5.7 5.42 6.5 4.33 4.7

10 6.23 6.2 6.9 4.91 5.211 6.8 6.6 7.4 5.32 5.612 7.45 7.3 7.8 5.67 5.913 8 7.9 8.21 6.31 6.514 8.2 8.2 8.21 6.72 6.915 8.21 8.21 8.22 6.73 6.9516 8.21 8.21 8.22 6.73 6.9517 8.21 8.21 8.22 6.73 6.9518 8.21 8.21 8.22 6.73 6.95

Table-5.6: Throughput comparisons of different protocols

From table 5.6 Throughput of SCTP is greater than TCP Newreno and TCP due to its multihoming nature. SCTP has ability to support multiple IP addresses. It can in other word use different paths to reach the end host. TCP in comparison breaks if the transport path breaks so use of more than one address could allow re-routing of packets in event of failure and also provide an alternate path for retransmissions.

From table 5.6we can see that as we increase number of send bytes a value comes that after which send rate becomes constant and cannot be increased, this is due to congestion control in TCP, TCP Newreno, SCTP but in the case of UDP and RTP the send rate continues to increase and the receive rate becomes constant after some point this is due to no congestion control in UDP and RTP

At send rate of 4Mb maximum number of received bytes for SCTP are 2.9Mb, the receive rate for TCP Newreno is 2.6 for TCP is 2.57 for RTP is 2.1 and least rate is of RTP which is 1.9Mb

46

Page 47: Report1 Final

Throughput

(Mbps)

rate (mbps)

Figure 5.12: Throughput comparisons of TCP, SCTP and TCP Newreno

Throughput of UDP is least among other protocols. This is because percentage of packet loss in UDP is very high and due to unreliable performance of this protocol.As there is no concept of acknowledgement, retransmission of packets so probability of missing a packet (data) is always in UDP.

According to table 5.6we can see that as we increase the send bytes the number of bytes send increases and increases but don’t stop at one reading but the number of received bytes after reaching a certain limit stop to increase and nearly become constant. This is because the numbers of send bytes are increasing but there is a limit to number of bytes that can be received

According to the above readings it can be seen that SCTP provides the best performance when calculating throughput

47

Page 48: Report1 Final

5.1.3 MPEG4 TrafficWired to WirelessWe have made a wired connection between sender and access point and a wireless connection between access point and receiver. We are running MPEG4 traffic on different protocols such as UDP, TCP, SCTP, RTP, and TCP NEWRENO .Then after setting up the network we calculated the readings.

Figure-5.13: wired connection between sender and access point, wireless connection between access point and receiver

Video send rate

TCP NEWRENORcvd bytes(Mb)

TCP Rcvd bytes(Mb)

SCTPRcvd bytes(Mb)

UDPRcvd bytes(Mb)

RTPRcvd bytes(Mb)

1 0.65 0.65 0.85 0.4 0.52 1.55 1.2 1.75 0.8 13 2.1 1.8 2.34 1.2 1.54 2.8 2.4 3.2 1.6 1.825 3.3 3 3.7 2 2.236 3.95 3.6 4.5 2.4 2.687 4.5 4.2 5 2.8 3.28 4.9 4.8 5.7 3 3.49 5.7 5.4 6.2 3.6 3.9

10 6.4 6.2 7 4 4.411 7 7 7.4 4.4 4.712 7.2 7.1 7.6 4.8 5.113 7.6 7.4 7.9 5.2 5.514 8.01 7.8 8.1 5.6 5.615 8.01 7.9 8.1 5.7 6.116 8.01 7.9 8.1 5.9 6.217 8.01 7.9 8.2 6.1 6.318 8.01 7.9 8.3 6.1 6.3

48

Page 49: Report1 Final

Table-5.7: Throughput comparisons of different protocols Throughput of SCTP is greater than TCP Newreno and TCP due to its multihoming nature. SCTP has ability to support multiple IP addresses. It can in other word use different paths to reach the end host. TCP in comparison breaks if the transport path breaks so use of more than one address could allow re-routing of packets in event of failure and also provide an alternate path for retransmissions.From table 5.7 we can see that as we increase number of send bytes a value comes that after which send rate becomes constant and cannot be increased, this is due to congestion control in TCP, UDP, SCTP

Throughput(Mbps)

Video rate (mbps)

Figure-5.14: Throughput comparisons of TCP, SCTP and TCP Newreno

Throughput of UDP is least among other protocols. This is because percentage of packet loss in UDP is very high and due to unreliable performance of this protocol.As there is no concept of acknowledgement, retransmission of packets so probability of missing a packet (data) is always in UDP.

According to table 5.7 we can see that as we increase the send bytes the number of bytes send increases and increases but don’t stop at one reading but the number of received bytes after reaching a certain limit stop to increase and nearly become constant. This is because the numbers of send bytes are increasing but there is a limit to number of bytes that can be received

According to the above readings it can be seen that SCTP provides the best performance when calculating throughput

49

Page 50: Report1 Final

Wireless to Wired We have made a wireless connection between sender and access point and a wired connection between access point and receiver. We are running MPEG4 traffic on different protocols such as UDP, TCP, SCTP, RTP, and TCP NEWRENO

Figure 5.15: wireless connection between sender and access point and wired connection between access point and receiver

Video send rate

TCP NEWRENORcvd bytes(Mb)

TCP Rcvd bytes(Mb)

SCTPRcvd bytes(Mb)

UDPRcvd bytes(Mb)

RTPRcvd bytes(Mb)

1 0.7 0.615 0.852 0.42 0.52 1.43 1.22 1.753 0.83 13 2 1.82 2.344 1.22 1.54 2.89 2.43 3.435 1.63 1.825 3.6 3.1 4 2.1 2.236 3.96 3.62 4.57 2.42 2.687 4.65 4.23 5.058 2.83 3.28 5 4.81 5.6 3.1 3.49 5.7 5.42 6.3 3.63 3.9

10 6.3 6.2 6.83 4.1 4.411 7.1 7 7.6 4.42 4.712 7.43 7.26 7.8 4.83 5.113 7.7 7.59 7.92 5.22 5.514 7.95 7.83 8.12 5.69 5.815 8.01 7.92 8.13 5.72 6.116 8.01 7.92 8.2 5.93 6.2

50

Page 51: Report1 Final

17 8.01 7.92 8.2 6.21 6.318 8.01 7.92 8.3 6.221 6.3

Table-5.8: Throughput comparisons of different protocols.

From table 5.8 Throughput of SCTP is greater than TCP Newreno and TCP due to its multihoming nature. SCTP has ability to support multiple IP addresses. It can in other word use different paths to reach the end host. TCP in comparison breaks if the transport path breaks so use of more than one address could allow re-routing of packets in event of failure and also provide an alternate path for retransmissions.

From table 5.8 we can see that as we increase number of send bytes a value comes that after which send rate becomes constant and cannot be increased, this is due to congestion control in TCP, UDP, SCTP

Throughput(mbps)

Figure 5.16: Throughput comparisons of TCP, SCTP and TCP Newreno

According to table 5.8 we can see that as we increase the send bytes the number of bytes send increases and increases but don’t stop at one reading but the number of received bytes after reaching a certain limit stop to increase and nearly become constant. This is because the numbers of send bytes are increasing but there is a limit to number of bytes that can be receivedThroughput of UDP is least among other protocols. This is because percentage of packet loss in UDP is very high and due to unreliable performance of this protocol.As there is no concept of acknowledgement, retransmission of packets so probability of missing a packet (data) is always in UDP.

51

Page 52: Report1 Final

According to the above readings it can be seen that SCTP provides the best performance when calculating throughput

5.2 Delay

Send Rate UDP(ms) TCP(ms) SCTP(ms) RTP(ms) TCP NEWRENO(ms)

1mb 7.8 15 7.9 6 13.32mb 9 17 10 8 163mb 13 21 16 12 194mb 22 27 24 19 245mb 25 36 32 22 346mb 28 42 34 23 387mb 32 48 45 28 478mb 40 58 48 32 51

Table-5.9: Delay comparison of different protocolsIn UDP and RTP the Delay value is the least because there is no acknowledgement to the lost packets.TCP experiences largest delay. This is due to the acknowledgement mechanism of the TCP. The reliability feature of TCP consumes time so cost of reliability in TCP is in term of time. In SCTP its value is less due to its feature of multihoming. From Table-5.9 we can see that we get least delay for RTP then UDP then SCTP then TCP Newreno and then TCP.

DELAY(ms)

Video Rate (Mb)

52

Page 53: Report1 Final

Figure 5.17: Delay comparison of different protocolsFrom the above table it can be seen that RTP has the lowest Delay and TCP has highest delay

5.34 Jitter

Send Rate SCTP(s) UDP(s) RTP(s) TCP(s) TCP NEWRENO(s)

1mbps 0.00037 0.00026 0.00021 0.00039 0.000352mbps 0.00048 0.00041 0.00036 0.00069 0.000653mbps 0.0038 0.00088 0.00065 0.0043 0.00384mbps 0.0062 0.0041 0.0038 0.0075 0.00685mbps 0.007 0.0058 0.0051 0.01029 0.00986mbps 0.0076 0.0073 0.00652 0.01102 0.00997mbps 0.0077 0.00735 0.0066 0.01103 0.01

0.0078 0.0074 0.0067 0.01109 0.01

Table-5.10: Jitter comparison of different protocols

From Table-5.10 we can see that we get least jitter for RTP then UDP then SCTP then TCP Newreno and then TCP

Time(s)

Send video rate (Mb)

Figure 5.18: jitter comparison of different protocols

Jitter values for RTP are less and TCP are greater

53

Page 54: Report1 Final

5.4Increasing number of nodes Wired to Wireless

Received(MB)

Number of NodesFigure 5.19: from the graph it can be seen that by increasing the number of receiving nodes the received bytes decrease exponentiallyNumber of nodes

TCP NEWRENO(Mb/s)

TCP(Mb/s)

SCTP(Mb/s)

UDP(Mb/s)

RTP(Mb/s)

1 3.2 3.12 3.8 2.21 2.32 1.6 1.5 1.9 1.1 1.153 0.8 0.7 1.1 0.65 0.684 0.6 0.55 0.9 0.56 0.585 0.6 0.58 0.73 0.42 0.466 0.5 0.45 0.62 0.37 0.38

54

Page 55: Report1 Final

7 0.41 0.39 0.5 0.31 0.33

Table-5.11: showing number of received bytes when number of nodes are increased

As we increase the number of nodes in wired to wireless scenario it can be seen that as the number of nodes are increased the throughput decreases exponentially.When the number of nodes are 4 in SCTP one receiver will receive 0.9Mb/s ,in TCP New Reno it will be 0.6Mb/s in TCP it will be 0.55Mb/s in UDP will be 0.56Mb/s in RTP it will be 0.58Mb/sIn the case of wired to wireless scenario the number of nodes on the receiver side can be increased to 7 after which the number of received bytes become very less as drop in the number of bytes in the wireless connection will be more as compared to wired connection

Wireless to Wired

Received (MB)

55

Page 56: Report1 Final

Number of NodesFigure 5.20: from the graph it can be seen that by increasing the number of receiving

nodes the received bytes decrease exponentially

Number of nodes

TCP NEWRENO(Mb/s)

TCP(Mb/s)

SCTP(Mb/s)

UDP(Mb/s)

RTP(Mb/s)

1 4.2 4 4.8 3.2 3.312 2.6 2.4 3.2 2.1 2.223 1.8 1.7 2.21 1.2 1.34 1.5 1.3 1.95 0.9 15 1.2 1.1 1.76 0.7 0.796 0.9 0.75 1.54 0.4 0.477 0.75 0.65 1.1 0.3 0.338 0.51 0.45 0.9 0.25 0.289 0.42 0.35 0.7 0.21 0.25

10 0.35 0.34 0.65 0.2 0.24 Table-5.12: showing number of received bytes when numbers of nodes are increased

As we increase the number of nodes in wired to wireless scenario it can be seen that as the number of nodes are increased the throughput decreases exponentially.When the number of nodes are 4 in SCTP one receiver will receive 1.95Mb/s ,in TCP New Reno it will be 1.5Mb/s in TCP it will be 1.3Mb/s in UDP will be 0.9Mb/s in RTP it will be 1Mb/s.In the case of wireless to wired scenario the number of nodes on the receiver side can be increased to 10 as drop in wired connection is less then in the wireless connection.

56

Page 57: Report1 Final

Appendix

57

Page 58: Report1 Final

Bibliography

1.Kevin Fall [email protected], Editor

2.Kannan Varadhan [email protected], Editor

3.www.isi.edu/nsnam/ns/ns-documentation.

4. http://isi.edu/nsnam/ns/

5.introductory: Marc Greis'stutorial.http://www.isi.edu/nsnam/ns/tutorial/index.html

6.Ns manualhttp://www.isi.edu/nsnam/ns/ns-documentation.html

7:Unix network programming by stevens

8.www.Wikipedia.com

58

Page 59: Report1 Final

59