0% found this document useful (0 votes)
39 views

Computer Network Gate

This document summarizes a study comparing the performance of TCP and UDP protocols in a hybrid network using Mobile IP. The hybrid network simulated consisted of 3 mobile nodes forming an ad-hoc wireless network connected to 2 wired nodes via a base station. TCP uses mechanisms like acknowledgments, congestion window size, and three-way handshaking for connection establishment to provide reliable data transmission. UDP is simpler and does not guarantee delivery or prevent packet loss but has less overhead than TCP. The performance of TCP and UDP was evaluated based on various metrics in the hybrid network environment.

Uploaded by

Jayaprasanna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Computer Network Gate

This document summarizes a study comparing the performance of TCP and UDP protocols in a hybrid network using Mobile IP. The hybrid network simulated consisted of 3 mobile nodes forming an ad-hoc wireless network connected to 2 wired nodes via a base station. TCP uses mechanisms like acknowledgments, congestion window size, and three-way handshaking for connection establishment to provide reliable data transmission. UDP is simpler and does not guarantee delivery or prevent packet loss but has less overhead than TCP. The performance of TCP and UDP was evaluated based on various metrics in the hybrid network environment.

Uploaded by

Jayaprasanna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

International Journal of Computer Applications (0975 – 8887)

Volume 83 – No 13, December 2013

Comparative Study and Simulation of TCP and UDP


Traffic over Hybrid Network with Mobile IP
Purnya Awasthi Akhilesh Kosta
Kanpur Institute of Technology Kanpur Institute of Technology
Gautam Buddha Technical Gautam Buddha Technical
University University

ABSTRACT 2. HYBRID NETWORK


The performance of the TCP and UDP protocol is evaluated The hybrid networks are preferred instead of the pure wired
by simulating them in a hybrid network using Mobile IP and networks and pure wireless ad hoc networks because the
compared their performances on the basis of some coverage area of the network can always be increased.
performance metrics.
Hybrid network is a network consisting of both cellular base
MANET is a group of wireless nodes connected through stations and ad hoc wireless nodes. The network used to
wireless link where nodes are free from any fixed simulate the Hybrid network contains 3 mobile nodes, 1 base
infrastructure and each node maintains the routing station and 2 wired nodes. These three mobile nodes form the
information and act as router. It is also considered as secluded adhoc network as they are mobile and routing between them is
network because the nodes have no access to the outside
world. But MANET integrated with internet can solve this performed by DSDV protocol. Here data is exchanged
problem by using an interconnected network where there can between the mobile and non-mobile nodes.
be two possible networks wired and wireless and The base station nodes are considered as the gateways
communication between two different networks can be done between the wired and wireless nodes. They are connected to
by using Mobile IP. Mobile IP has been designed to allow the the wired nodes through a wired link. The base station node
mobile node to use two IP addresses. One is the home address forwards all the packets from the wireless nodes destined to
which remains unchanged and the other one care-of address the wired nodes and vice a versa. So there is a need to keep
changes at each new point of attachment. the base station node
General Terms in the same domain as of the wireless nodes so that all the
Hybrid Networks, Mobile IP packets coming from wired nodes can be routed to their
destination mobile nodes using the DSDV protocol [8].
Keywords
TCP, UDP, Mobile IP, Hybrid networks, wired cum wireless 3. DSDV
network. Destination sequenced distance vector routing (DSDV) is
adapted from the conventional Routing Information Protocol
1. INTRODUCTION (RIP) to ad hoc networks routing. DSDV is a routing protocol
Wireless communication technology is making immense for ad hoc networks which was designed to overcome the
progress and has become widely popular for access networks looping problem of RIP and while keeping the simplicity of
over past few years. These wireless access networks, such as RIP.
Wireless Local Area Networks and cellular networks are
usually connected to a wired backbone network. Although In DSDV a new attribute is added named: sequence number,
TCP and UDP are considered very reliable in wired networks to each route table entry of the conventional RIP. By that
and a lot of researches have been done on their behavior in added sequence number, the mobile nodes keep stale route
wireless networks, there performance in hybrid networks is a information and the new route different and thus prevent the
matter of concern. Hybrid network has characteristics very formation of routing loops.It is a table driven routing scheme
different from those of wired networks and wireless networks based on Bellman-Ford algorithm.
[4].
3.1 Packet Routing and Routing Table
Although many researches have been done to measure and Management
analyze the TCP and UDP traffic over wireless networks or In DSDV, every mobile node has a routing table which has all
MANET but there was no comparison done for the hybrid available destinations to all other nodes, the metric, next hop
networks with Mobile IP. NS2 is used as the simulation tool and a sequence number generated by the destination node.
and studied various parameters in the hybrid environment to The number is generated by the destination, and the emitter
evaluate the behavior of two different transport layer needs to send out the next update with this number.
protocols with Mobile IP being used as the protocol between
two different networks. Using such routing table stored in each mobile node, the
packets are transmitted between the nodes of an ad hoc
network. Each node of the ad hoc network either after a fixed
duration of time or when some new routing information is
needed to be propagated transmits the packets between the
nodes of the adhoc network to update the routing information
by multicasting or broadcasting. The packet send has a metric
one which is used by the other nodes as they update their table

9
International Journal of Computer Applications (0975 – 8887)
Volume 83 – No 13, December 2013

and increase it by one every time it meets a new node and (AWND) in the TCP header so that a fast sender does not
retransmit it to update other packets also. This process is overwhelm a slow receiver [5].
repeated until all the nodes in the network receives a copy of
the update packet with a corresponding metric. If any node 4.3 Connection control
receives multiple update packets for a same destination, the To manage the dropped packets due to full buffer, a
routes with more recent sequence numbers are always congestion window size is also maintained called CWND.
preferred. If the update packets have the same sequence The sending window is taken as being the minimum of the
number with the same node, the update packet with the AWND and the CWND.
smallest metric will be used.
4.4 Connection Establishment and
4. TCP Termination
Transport layer is made for process to process delivery, it TCP connection starts with a three way handshake protocol.
deliver packets from one process to another. Transmission Firstly the receiver sends the SYN seq=x message to receiver.
Control Protocol (TCP) is a connection oriented point-to-point When the receiver receives the message it responds with a
protocol. It creates a virtual connection between two TCPs to new sequence number y and acknowledgement message as
send data. It also uses flow and error control mechanism at SYN seq= y, ACK x+1. When the sender receives it, it
transport level. It is extensively used in the Internet. acknowledges receiver with the ACK y+1 stating that
acknowledgment is received. Thus sender and receiver
4.1 Reliability perform a three way communication between them. In the first
TCP is a reliable as it guarantees that all the packets that were step a connection is established between sender and receiver
send to the destination have reached and are in the order as then connection is maintained by the receiver until the sender
they were sent.TCP takes care of this by using receives the acknowledgement and releases the connection
acknowledgements. Whenever a packet is received a called as connection termination. This is also called as three
acknowledgement is sent to the sender that packet is received. way handshaking mechanism. This is done so that two nodes
If the acknowledgement is not received by the sender it which are attempting to communicate, can exchange the
retransmits the packets after a time period maintained by the parameters of the network TCP socket connection before
timer. transmitting data.
4.2 Flow control 4.5 Parameters that affect the performance
In this mechanism, a window of segments (certain number of
segments) is transmitted at once. Each segment has a of TCP in a hybrid environment
sequence number. The receiver can acknowledge more than The parameters are as follows:
one segment at a time by acknowledging the highest one 4.5.1 Bandwidth Limitation
received, meaning that all the previous segments were
Wireless wide area networks offer limited raw bit rates which
successfully transmitted. And the size of the TCP window is
informed to the sender by a field called the advertised window have to be shared between several users whereas wireless
LAN offers sufficient bandwidth [14].

Sender`s event Receiver`s Event

Receive SYN , seq=x


Send SYN , seq=x

Send seq=y, ACK, ack=x+1


Receive SYN, ACK
seq=y

Send ACK ack=y+1

Network Messages

Figure 1. Three way handshake between TCP sender and receiver [7].

10
International Journal of Computer Applications (0975 – 8887)
Volume 83 – No 13, December 2013

4.5.2 Longer Latency Delay a need to stay connected to the internet all the time. Mobile IP
Wireless media exhibit longer latency delays than wired ones helps in tracking hosts without a need to change their IP
[13], this affects TCP throughput and increases the interactive address[1].
delays perceived by the user [14].
6.1 Working of Mobile IP
4.5.3 Vulnerable Transmission Losses Mobile IP can be demonstrated by its three major functions as
Transmission losses are more in wireless media, so there is a AGENT DISCOVERY, REGISTRATION, TUNNELING.
need to find a solution which aims at alleviating this
6.1.1 Agent Discovery
deficiency [14].

4.5.4 User mobility 6.1.1.1 Router advertisement


Mobile IP agent advertisements are built on top of the Internet
Wireless networks enable the user to move around. hosts.
Control Message Protocol (ICMP) Router Discovery Protocol
When a host is moving from one cell to another handoff (or
(IRDP). A beacon is sent after some defined interval of time
must be followed. During a handoff, all necessary information
by routers. By this beacon it advertises the services it
must be transferred between the two base stations so that the
supports. These beacons are either IP multicast or IP
mobile host can continue to be connected[14].
broadcast.
TCP exhibits Limited bandwidth and longer latency delay in
wireless networks and transmission errors are also more in 6.1.1.2 Router solicitation
wireless media, also when there are mobile nodes, the user Mobile agent solicitation is same as Router solicitation. In it a
mobility is a bigger concern. So there it would be beneficial to message is either multicast or broadcast to all other routers
study the TCP behavior in a hybrid network rather than in who listens this message can send their router advertisement.
wireless network or wired network as both have its pros and This is quicker as there is no wait for any periodic messages.
cons.
6.1.2 Registration
5. USER DATAGRAM PRTOCOL After discovery process, if the mobile nodes finds that it is in
User Datagram Protocol (UDP) is used as a transport layer a foreign network, it singals its location updates to its home
protocol for transfer of data across Internet Protocol based agent. This is done by mobile IP registration request. By this
network. The protocol uses datagrams to deliver the data. they convey to the Home Agent how to signal traffic to them
UDP is different in many ways with TCP. As TCP is by the Care Of Address. A registration reply is signaled either
connection oriented protocol where it set up a connection first by the Home Agent or the Foreign Agent.
then transfer data and the it terminate the connection, but in 6.1.3 Tunneling
UDP there is no connection establishment between sender and To send the routing information to the mobile node a logical
receiver. The messages are broken into datagrams and send link or a tunnel is set up which can carry IP packets. The
across the network. Each packet act as an individual message home agent will intercept datagrams which are to send for the
and is handled separately. Since each datagram has to keep mobile node, and forward them to the mobile node. This is
more information than a TCP packet, the size of data it can done by encapsulation.
carry is considerably low as compared to TCP. All the The encapsulation process creates a logical construct called a
datagrams can follow any path to reach to the destination and tunnel between the device that encapsulates and the one that
hence the order in which they reach is not fixed. Neither the decapsulates [6].
sender sends any acknowledgement to the sender that the
datagram is received. Hence this protocol is considered as 7. SIMULATION
unreliable as it does not guarantee that the whole data reached The simulation of the proposed network has been done by
to the destination or not. using Network Simulator-2. The network was simulated on
While these were some demerits with UDP yet it is used in the simulator as it supports the wired cum wireless network or
various applications where some data loss is tolerable like the hybrid network.
multimedia. Since in UDP there is no acknowledgement
service hence the network has lower overhead and hence a A rectangular area of 600m X 500m was used for simulation.
better throughput and thus is faster than TCP which is suitable The simulation was carried using 1 mobile node, 2 wired
for the applications like multimedia. nodes, 2 gateways and was run for 250 seconds. The source
starts sending data and chooses one of the hosts as destination
5.1 Performance of UDP in wireless randomly. The pause time is varied starting from 0 sec., 10
networks sec., 20 sec., 30 sec., 40 sec., and 50 sec. (i.e. in the steps of
For any closed wired network, the nature of the connections, 10 sec.) implemented respectively in a 100 m. x 100 m. The
the number of nodes and location of the recipients, what each simulation time was taken to be of 100 seconds.
needs to get from the transmission, and the response time of
each node is UDP`s performance can be best.
Some researches have found that packet drop is more in UDP
protocol as compared to TCP in a wireless network [15].
Transmission speed also more in UDP. The behavior of UDP
in wired network and wireless network is mixed so there is a
need to study the behavior of UDP in a hybrid network where
it can show the mixed behavior.
6. MOBILE IP
Mobile IP was developer for meeting the solution of mobile
users where there location is constantly changing and there is

11
International Journal of Computer Applications (0975 – 8887)
Volume 83 – No 13, December 2013

Table 1: Simulation Parameter Values


90
Transmitter range 250m 80
Bandwidth 2 Mbps 70
Simulation time 50 sec 60
Number of mobile 50
1 tcp
nodes 40
Number of Wired
2 30 udp
nodes
Number of base 20
2 10
stations
Max Speed 20 0

10
20
30
40
50
60
70
80
90
100
10, 20, 30, 40, 50,60, 70, 80, 90, 100
Pause time
sec
Terrain Area 100 m. x 100 m., 1000 m. x 1000 m.
Traffic type Constant Bit Rate, FTP Figure 3: Packet delivery ratio versus pause time
Packet size 512 bytes
This line graph illustrates the average packet delivery ratio
MAC type IEEE 802.11b over pause time by using TCP and UDP as the traffic modes.
Antenna type Omni-Antenna
Radio propagation 8.3 Total Packet Dropped
method Two Ray Ground The total number of packet dropped is calculated by
subtracting the number of packet send to number of packet
received.
8. SIMULATION RESULTS AND 50
ANALYSIS
8.1 Average end to end delay 40
It’s defined as time taken by a packet to reach from source to
destination that is the time the packet is received minus the
time it was generated at source. 30
tcp
35 20 udp
30 10
25
0
20 1 2 3 4 5 6 7 8 9 10
15
tcp Figure 4: Total Packet Dropped versus pause time
10
ud This line graph illustrates the total packet dropped during
5 p simulation over pause time by using TCP and UDP as the
traffic modes.
0
10 20 30 40 50 60 70 80 90 100 8.4 Throughput
Throughput is the average rate of successful packets delivered
over a communication channel. This data may be delivered
Figure 2: Average end to end delay versus pause time over a physical or logical link, or pass through a certain
network node.
This line graph illustrates the end to end delay over pause
time by using TCP and UDP as the traffic modes

8.2 Packet Delivery Ratio


It is defined as the ratio of number of packets received to the
total number of packet generated.

12
International Journal of Computer Applications (0975 – 8887)
Volume 83 – No 13, December 2013

800 10. ACKNOWLEDGMENT


I would like to express my deep and sincere gratitude to Mr.
700 Akhilesh Kosta, who guided me all the way in the research,
and sparks this research with his constant help, tremendous
600
efforts, and precious enlightenment.
500 Finally, special thanks must go to my husband and my family,
400 tcp who supported me with their love and encouragement, to do
my best in life.
300 udp
200
11. REFERENCES
[1] Perkins Charles E., May 1997, Mobile IP, IEEE
100 Communications Magazine, Sun Microsystems
0 [2] Stevens W. R., TCP/IP Illustrated, Volume 1: The
protocols. New York:Addison-Wesley, 1994..
20
10

30
40
50
60
70
80
90
100

[3] Schmid Andreas and Steigner, 2001: Avoiding Counting


to Infinity in Distance vector Routing, Kluwer Academic
Figure 5: Throughput versus pause time Publishers, and Netherlands.
[4] Pentikousis H. Badr,2002, A survey of TCP in wired-
This line graph illustrates the average throughput over pause
cum-wireless environments, State University of New
time by using TCP and UDP as the traffic modes.
York at Stony Brook, IEEE COMMUNICATIONS, The
9. CONCLUSIONS AND FUTURE Electronic Magazine of Original Peer-Reviewed Survey
Articles
WORK
[5] Paul Rajashree, 2002,SELECTIVE-TCP FOR
9.1 Conclusion WIRED/WIRELESS NETWORKS, University of
It is analyzed TCP and UDP protocols in the hybrid network
Kalyani.
with Mobile IP and analyzed some performance metrics. It
was found that in case of throughput in Hybrid network, TCP [6] http://www.isi.edu/nsnam/ns/tutorial/nsscript6.html#first
outperformed UDP and performed better in the hybrid
network. [7] Yu Wang, Weizhao Wang, Teresa A. Dahlberg, Truthful
Routing for Wireless Hybrid Networks, Department of
9.2 Future Work Computer Science
There can be a lot of options to explore in a hybrid network. [8] W. R. Stevens, 1994, TCP/IP Illustrated, Volume 1: The
One way is to implement various MANET protocols in the Protocols Addison-Wesley.
adhoc network, I have used DSDV, other protocols can also
be used and then the output can be compared. I have used [9] Mobile Communications Design Fundamentals John
Mobile IP as the gateway between wired and wireless Wiley and Sons, W. C. Lee Y. 1993, 2nd edition.
network. Other gateways can also be used to compare the
[10] Tsaoussidis V., Badr H., Pentikousis K., Ge X., July
performance of different gateway protocols.
2000. “Energy/Throughput Tradeoffs of TCP Error
Control Strategies”, in Proceedings of IEEE Symposium
on Computers.

IJCATM : www.ijcaonline.org 13

You might also like