Вы находитесь на странице: 1из 5

International Journal of Electronics and Computer Science Engineering

Available Online at wwwijecseorg ISSN: 2277-1956


ISSN-2277-1956/V1N2-762-766
Effect of Packet-Size over Network Performance
1
Abhi U. Shah,
2
Daivik H. Bhatt,
3
Parth R. Agarwal,
4
Preksha R. Agarwal
1
Maharaja Sayajirao University, Baroda.
shah.abhi22@yahoo.com
2
Dharmsinh Desai Universities, Nadiad.
daivikbhatt.10@gmail.com
3
Jyoti Microsystems Pvt. Ltd., Ahmedabad
parthagarwal24@yahoo.co.in
4
Tata Consultancy Services, Mumbai
agarwalpreksha@gmail.com
Abstract- TCP (Transmission Control Protocol) is the most widely-used protocol on Internet. It divides one large
data into small sized packets, called segments. Segmentation is useful for improving network performance. It has
a major problem in that its congestion control algorithm does not allow flows to obtain full available bandwidth
during fast long-distance links. One of the tools for evaluating TCP performance in various network scenarios is
Network Simulator-2 (NS-2). By using this tool one can simulate and evaluate the performance of different TCP
algorithms. In fast network one of the factors that degrade the TCP performance is packet size. Increasing the
packet size decreased the throughput of network, reason being that after crossing dedicated packet size, it will
allocate double the required packet size and fill up garbage in the unallocated packet space, thus decreasing the
throughput.

Keywords: TCP, NS-2, Selective Acknowledgment (SACK), Packet
1. Introduction
TCP, the most widely-used protocol on Internet, has a major problem in that its congestion control algorithm does not
allow flows to obtain full available bandwidth on fast long distance links. One of the limiting factors that degrade the
performance of TCP is packet size of transmitted packet. [1] The motivation for this project is to show how packet size is
affecting the performance of TCP using NS-2. The TCL script for observing the performance of TCP is based on
dumbbell topology. Simulating the TCL script in NS-2, average throughput can be calculated by keeping fixed queue size
and varying packet-size. Moreover, plot of throughput vs. packet size will show how packet size affects the network
performance.
2. Background
TCP was developed by a Department of Defense (DOD) in the United States of America (U.S.A.) research project to
connect a number different networks designed by different vendors into a network of networks (the "Internet"). It was
initially successful because it delivered a few basic services that everyone needs (file transfer, electronic mail, remote
logon) across a very large number of client and server systems. Several computers in a small department can use TCP/IP
(along with other protocols) on a single LAN. On the battlefield a communications network will sustain damage, so the
DOD designed TCP/IP to be robust and automatically recover from any node or phone line failure. This design allows the
construction of very large networks with less central management. However, because of the automatic recovery, network
problems can go undiagnosed and uncorrected for long periods of time.
TCP is responsible for verifying the correct delivery of data from client to server. Data can be lost in the intermediate
network. TCP adds support to detect errors or lost data and to trigger retransmission until the data is correctly and
completely received.
It is one of the most widely used protocols for data transmission in network. TCP used for segmentation of the big
message. It divides one large data in small size of packets, called segment. Segmentation is useful technique by which one
can improve performance of the network because small size of data always transmitted faster than one big data. Another
advantage of segmentation is that if data loss occurs in network than one does not have to retransmit the data instead of that
one has to just transmit only lost packet/segment. So by this way retransmission of data at the data loss will also efficient in
this.
763
EFFECT OF PACKET-SIZE OVER NETWORK PERFORMANCE


ISSN-2277-1956/V1N2-762-766
For data transmission on the network TCP uses different type of algorithms like Reno, New Reno, and Westwood etc
[3]. To understand this different type of algorithms, one of the useful tools is NS-2. Using NS-2 one can observe the
network performance in different condition and understand the TCP algorithm which we want to analyze.
The TCP packet format is shown below in Figure 1.


Figure 1 TCP PACKET FORMAT
Source Port [SP] (16 bits): When a connection is attempted, or being conducted, this specifies what port the
local machine is waiting to listen for responses from the destination machine.
Destination Port [DP] (16 bits): When a user desires to connect up to a service on a remote machine, the
Application Layer program specifies what port initial connections should use. When not as part of an initial
connection, this specifies what port number is going to be used for the remote machine as a packet is being
sent out to its destination.
Sequence Number [SN] (32 bits): In a sliding window protocol like TCP, the sequence number allows both
TCP stacks to know what packets have been received and which ones have not. Say for instance mail
messages contains 1,2,3,5,6,7,8,9, and 10 from source when destination knows source is sending 10 messages.
If source numbered each of source messages, destination can look through and see that destination does not
have message number 4, and it can tell source to send me another copy of that. The sequence number works
very much like this, as well as to allow for a little security so that other users cannot easily break into the
middle of destination machine connection and continue where source left off. Predictable sequence numbers
for certain implementations of TCP/IP stacks has led to some security problems with attacks geared to
anything from blind Denial of Service, to taking over connections in use by other users that have authenticated
themselves.
Acknowledgment Number [TL] (32 bits): This works by acknowledging the sequence number as sent by the
remote host. The local host's Acknowledgement Number is a reference to the remote machine's Sequence
number, and the local machine's sequence number is related to the remote machine's acknowledgement
number.
Header Length [HL] (4 bits): Just as the TCP Header Length, this one also is a measure of the length of the
header in 32-bit sized words.
Reserved (6 bits): These bits are reserved future use.
Urgent flag [URG] (1 bit): This specifies that the Urgent point included in this packet is valid.
Acknowledgement flag [ACK] (1 bit): This specifies that the portion of the header that has the
acknowledgement number is valid.
IJECSE,Volume1,Number 2
Abhi U. Shah at el.



ISSN-2277-1956/V1N2-762-766
Push flag [PSH] (1 bit): This tells the TCP/IP stack that this should be pushed up to the Application Layer
program that needs, or requires it as soon as time allows.
Reset flag [RST] (1 bit): This is used to reset the connection.
Synthesis flag [SYN] (1 bit): This is to Synchronize sequence numbers with acknowledgement numbers for
both hosts, sometimes referred to synthesis of a connection. The former reference is more common, while the
latter is rarer.
Finish Flag [FIN] (1 bit): This is to specify that a connection is finished according to the side that sent the
packet with the FIN flag set.
Window size [WS] (16 bits): This specifies how many bytes may be received on the receiving side before
being halted from sliding any further and receiving any more bytes as a result of a packet at the beginning of
the sliding window not having been acknowledged or received.
TCP Checksum [TCPCS] (16 bits): This is a checksum that covers the header and data portion of a TCP
packet to allow the receiving host to verify the integrity of an incoming TCP packet.
Urgent Pointer [UP] (16 bits): this allows for a section of data as specified by the Urgent pointer to be passed
up by the receiving host quickly.
Options (Variable bits if used): Seldom ever used. [3]
3. Software Tool: NS-2 TCP LINUX
NS2 is an open-source event-driven simulator designed specifically for research in computer communication networks.
Recently, a module, NS-2 TCP Linux, was developed for NS-2 to provide Linux-based TCP Agents. Linux TCP has several
differences from the TCP implementation present in current NS-2. Linux-TCPs SACK processing can recover even from
the loss of retransmitted packet where as NS-2s default TCP times out. Linux-TCP does not use delayed
acknowledgements initially, so that the congestion window can grow faster. Linux-TCP uses the D-SACK [4] information
to rearrange out of order packets. Upon increasing the packet size the throughput may increase or decrease [5, 6]. Linux-
TCP uses an improved packet loss detection algorithm called score-boarding. All these improvements in Linux-TCP might
cause the results obtained by using NS-2 TCP Linux to differ from those obtained using NS-2s default TCP [7].

Figure 2 Snap Shot of Wired Network in NS-2
The topology shown in Figure 2 was used to study the behavior of TCP for different packet size. It consists of two
senders and receivers with two routers in between connected by a 20 Mbps channel. The senders and the receivers are
connected to routers through a 5 Mbps (bottom neck link) channel. Data flows from sender 1 node to receiver 4 node.
Throughput is considered as a performance metrics for the network topology in NS-2 and it can be calculated by ratio of
no of received packet to time. Algorithm for calculating average throughput is shown below in the Figure 3.
765
EFFECT OF PACKET-SIZE OVER NETWORK PERFORMANCE


ISSN-2277-1956/V1N2-762-766

Figure 3 Throughput Algorithm Figure 4 awk File Snapshot
The awk file was used to calculate throughput and snap shot of generated trace file tcp.tr is shown in Figure 4.
4. Simulation Results
Here transition of packets from node-1 to node-4 is taken placed using TCP agent. Now, trace different variable and
calculate average throughput for packet size 500. After performing this do the same procedure for different packet size and
calculate average throughput for them. At the end compare the result and try to conclude how packet size is affecting the
TCP performance.
Table 1 Throughput for Various Packet Size
SR. NO PACKET SIZE AVERAGE THROUGHPUT
1 500 633477
2 700 854804
3 900 1.01499e+06
4 1000 1.07144e+06
5 1100 1.17763e+06
6 1200 1.35717e+06
7 1300 1.36528e+06
8 1400 1.36804e+06
9 1500 1.36804e+06
10 1650 894677


IJECSE,Volume1,Number 2
Abhi U. Shah at el.



ISSN-2277-1956/V1N2-762-766

Figure 5 THROUGHPUT vs. PACKET SIZE
Throughput of wired network for various packet sizes is shown in Table 1. The effect of the various packet sizes over
throughput of the network can be observed in graphical format in Figure 5. It can be observed that initially as the packet
size is increased, the throughput increases till 1500 packet size. As the size of the transmitted packet increased beyond some
limit, the throughput starts to degrade for the wired network.
5. Conclusion & Future Scope
In this paper, the main focus is on the effect of the various packet sizes over network throughput for particular topology
created in NS-2. It is assumed that power is constant. Throughput and performance of network may vary if there is a
variation in transmitted power. It may also affect by the various parameters of the real time network environment viz. traffic
density, path loss or threshold value. In future, one can use soft computing techniques to decide the optimal packet size to
improve the performance and throughput of the network.
REFERENCES:
[1] Jingsong Zhang; McLeod, R.D.; A UDP-based file transfer protocol with flow control using fuzzy logic approach, Electrical and Computer
Engineering, 2003. IEEE CCECE 2003.
[2] Ikegawa, T. Takahashi, Y., The effect of retransmitted packet size preservation property on TCP goodput over links with Bernoulli bit-
errors, Modeling and Optimization in Mobile, Ad Hoc, and Wireless Networks, 2005 IEEE, WIOPT 2005
[3] http://mike.passwall.com/networking/tcppacket.html
[4] Ming Zhang; Karp, B.; Floyd, S.; Peterson, L.; RR-TCP: a reordering-robust TCP with DSACK, Network Protocols, 2003
Proceedings. 11th IEEE International Conference
[5] Yantao Li; Xin Qi; Zhen Ren; Gang Zhou; Di Xiao; Shaojiang Deng; Energy modeling and optimization through joint packet size
analysis of BSN and WiFi networks , Performance Computing and Communications Conference (IPCCC), 2011
IEEE 30th International.
[6] Haas, Z.; Gitlin, R.D.On the packet size in integrated networks INFOCOM '91. IEEE Proceedings. Tenth Annual Joint
Conference of the IEEE Computer and Communications Societies. Networking in the 90s., 732 - 740 vol.2.
[7] The network simulator ns2- Documentation

Вам также может понравиться