Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 14

Fundamentals to Computer Network

Transfer Control Protocol Role


TCP or also known as Transfer Control Protocol has an important role in the Transport Layer.
The role of a TCP is explained as below:
Reliable Transmission
In the Transfer Control Protocol each byte is identified by a sequence number. What this
sequence number does is that it identifies the order of any fragmentation, disordering or lost
packets that may occur during transmission. Each payload byte transmitted the sequence
number will be incremented. During the first two steps of the 3-way handshake, both
computers will exchange an initial sequence number (ISN).
The 3-way handshake is a method used to establish or begin a connection to the network. If a
client wishes to connect with a server, that server must first connect to a port to open it up so
that connections to the client can take place. The server does this by performing a technique
known as the 3-way handshake by sending a SYN, SYNACK, ACK packets. To put this in a
simpler view, below are step by step explanations on how the packets are sent.

3-way handshake
1.) A client computer will send a SYN packet also known as synchronize packet to the
server.
2.) The server will then accept the SYN packet whereby it will then inform the client that
it has received a SYN packet by replying with a SYN-ACK packet also known as
synchronize acknowledgment packet.

3.) The client will accept the packet which was sent then replies to the server by sending
an ACK packet.
4.) Once the server receives a reply from the client and the TCP connection is
successfully established.

The diagram above demonstrates the 3-way handshake

Flow Control and Windowing


The main use of the flow control protocol in TCP is to regulate the speed of the data
being sent to the TCP receiver so that it can be reliably received and processed. If a server
operating and speeds of 1gigabits per second were to send data to a slow device for example
PDA or smart phones it needs to regulate the influx of the data.
The flow control works like a sliding window whereby in each segment of the TCP, the
receiver will specify the size of the window in bytes that it is willing to buffer for the
connection. When the host server is sending the data, it can only send the amount that has
2

been specified by the window size before it must wait for an acknowledgment from the
receiving host.
The term flow control and windowing was used particularly because TCP works something
like a window. To explain this further, a window shall be used as an example. Lets say, there
was this window size of y that is able to send up to y bytes without receiving an
acknowledgment. When an acknowledgment ACK is received the window slides forward. In
every ACK (acknowledgement) it is advertising the receivers window size. This window
size indicates the number of bytes the receiver has space for starting from the highest
sequence of acknowledged data. The diagram below will explain further.

The diagram above illustrates the flow control of the data


3

Error Detection
Every time a packet is sent through the network, sequence numbers and acknowledgments
cover for the discarding duplicate packets, retransmission of packets that have gone lost and
also for the ordered-data transfer. To ensure the accuracy and correctness a checksum is used.
Before a data is being sent over the network, it is first broken down into many parts called
packets. To ensure each packet is properly assembled in an orderly way at the receivers side
each packet has a checksum which specifies how the packets should be reassembled back to
its original state. This prevents redundant packets to be sent through the network.

Congestion Control
Congestion control is one of the most important aspects in a Transfer Control Protocol.
TCP uses quite a number of ways to achieve optimum performance and to avoid congestion
collapse. A congestion collapse is a condition whereby the packet switched computer
network and there is little or no useful communication is occurring due to congestion.
These mechanisms that TCP uses in congestion control the rate of the data entering the
network so that the rate of the flowing data will not trigger collapse. By using
acknowledgment of data sent or lack of acknowledgment in network conditions between the
TCP sender and receiver and also followed by timers, TCP senders and receivers can change
the rate of the flow of data. This is called congestion control or congestion avoidance.
Senders of the data use a retransmission timer which is based on the estimated time taken
(commonly referred as RTT or round-trip time) for the data to be sent through the sender and
receiver. When a data is being sent through a network, it is being given a TTL counter when
that data hop through the router, to the destination the counter reduces.
4

When that data hops through the router but does not reach the destination, that data will
continue to hop through the router until the counter reaches 0. When the counter reaches 0, it
will be discarded by the router.

User Datagram Protocol Role


The user datagram protocol (UDP) plays an important role in our daily life and also in the
transport layer. The main reason why is because it is a very lightweight version compared to
the TCP. This is because there is no ordering of messages, no tracking connections.
Why this is a very important factor in data transmission is because it is much faster
compared to the TCP. The user datagram protocol does not have long processes instead its
the complete opposite of the TCP. Another feature that UDP provides is that it uses
datagrams whereby packets are by themselves and are checked for integrity after it has
arrived at the destination.
a.) Compare and contrast the fields in TCP and UDP frame.
Comparison between TCP and UDP
Transfer Control Protocol

User Datagram Protocol

Reliable TCP ensures the delivery of the

Unreliable UDP does not ensure the

message by managing message

delivery of the message so there is no way to

acknowledgment, retransmission and timeout know of the packet is lost along the way.
Ordered If there were two messages sent

Unordered If there were to messages sent

over a connection in sequence, the receiver

to the same recipient, the order of the

will receive it exactly in the same order. The

original message cant be predicted.

TCP will buffer the out-of-order data and


will then re-order it before it is delivered to
the application
Heavyweight TCP need three packets to set Lightweight The message is not sent in
up a socket connection and TCP handles the
5

order, nor does it track connections.

reliability and congestion control.


Streaming The data in TCP is read as a

Datagrams Packets are sent by themselves

byte stream and no indications are

and are checked for integrity only after it has

transmitted to set message boundaries.

arrived to the destination. Each packet has


boundaries.

b.) List 5 applications that use either TCP or UDP


Five applications that use UDP are P2P softwares, online multimedia streaming (music &
video), multiplayer online games, internet browsers use UDP to load websites, flash games,
images and many more.
c.) By using some of the examples of the network applications answered in part (c), discuss
why certain network applications use TCP instead of UDP and vice versa.
Different applications use different protocols because it serves different purposes. Lets
say for example, P2P software that uses UDP. The very feature of the user datagram protocol
allows the P2P to serve its purpose to the users. UDP is unreliable, lightweight and
unordered. Because of this, music, video, software, and images can be downloaded through
P2P software without being delayed. What if it were to use a TCP protocol? Then the data
being sent in the P2P client it will have to go through the processes to ensure messages are
being sent and if it does not sent the connection will timeout. If the connection times out then
the message wont be sent to the user that has requested for the download file (music, video,
and image). Because of this the most appropriate and useful protocol used for P2P software
would be the UDP.
However the applications that use TCP such as Microsoft Outlook which is most
commonly used for sending emails has to use TCP instead of UDP because of important role
that TCP provides that must be used in sending a email. Emails contain private information
and important messages that cant be afforded to be lost or send redundantly in the network.
Because of this email client such as Microsoft Outlook, Hotmail, Yahoo Mail, and Google

Mail has to implement the uses of TCP to ensure that every email sent by the sender is
received by the receiver.
In conclusion certain applications must use TCP while other applications must use UDP
is because of the features offered by each protocol caters for specific uses that can either be
for security or speed.

d.) How to close TCP and UDP ports to enhance security in Windows XP to prevent the
attackers to break into the computer systems?
Every time a message is being sent or received either by the TCP or UDP a port will be
opened, and these ports wait for a specific kind of communication. The more ports that are
opened, the risk of leaking information and the risk of being hacked is high making the
computer vulnerable to hackers. Because a hacker can gain access to these open ports and
take control over the computer by sending malicious rootkits or Trojans.
One of the ways to enhance security in Windows XP to prevent attackers is to use
firewalls that will only allow traffic through certain ports. Some firewall can monitor traffic
inbound and outbound of the computer and only allows legitimate or known applications to
send or receive data. Naturally, Windows XP comes with a built in firewall. However the
functionality of it is limited and basic. Hackers and attackers can compromise windows
firewall by sending backdoor Trojans that can open ports without the knowledge of the user.
It is a good practice to always run Windows Update monthly as Microsoft sends fixes to
ensure that the local firewall stays protected against changes made by the backdoor Trojans.
However it is recommended not to solely depend on built in firewalls but use 3rd party
firewalls such as Norton 360 and ZoneAlarm Internet Security. These firewalls offer extra
features and offer more security then a conventional Windows firewall.

Peter Packet is a fictional superhero made by Cisco and his job is to make sure the
messages he receives are delivered across the Internet. Peter is helping out by making sure his
7

important live saving tasks from Haiti, India and Zimbabwe are successfully sent. This colourful
action pack game is an exciting and it also provides knowledge about how data from senders are
transmitted through the Internet and problems as well as solution faced during his way.
In Haiti, people there are having trouble with clean drinking water. Peter must deliver the
email from Pierre to the LIFE is Clean Water centre and request help from them for their filtration
system. In this level you will control Peter through multiple obstacles and face several problems.
When your mission is complete, the email is sent and the representative from LIFE is Clean
Water arrives to Haiti and help out with the filtration system for only USD 20 and it can help out
5 families.
In India, girls are having problems with education and most of them are too poor to pay
for their school fees. Peter must deliver an email from Rashmi to the Working Together group in
order to obtain funds to build a working together centre in their area. With this fund, girls can pay
their 5 cent bus fees and also school necessities. When your mission is completed, an email from
Working Together approves the funding and girls in India will have a brighter future.
In Zimbabwe, spreading of aids/hiv has high probabilities. In 1 out of 4 people there are
diagnosed with that disease. This is because of the lack of education provided for it, Tendai lives
with his 5 mother, older siblings and cousins. 6 years ago his dad died due to AIDS and his
cousins parents had also died cause of AIDS. Peter must help Doctor Kapawa to send an email to
the People United For Schools to request help. Tendais current school is closing because his
teacher is infected with AIDS and is too sick to teach. Upon completion, People United For
Schools will send a representative to help out with guiding young ambitious people to guide them
to be a teacher.
During his delivery process or in the game known as mission, Peter meets many obstacles such as
viruses and also hackers; besides this he also meets other problem such as the faulty router and
also the wireless area.

When you start Peter Packet, users must choose either to play with Beginners difficulty or
Advance difficulty. After choosing as so, users will be brought to the main page where 3 countries are
given which are India, Zimbabwe and Haiti. Users are to choose either 1 of these 3 to begin their mission.
When the user clicks on either 1, the voice from that particular countrys resident will be played
informing the users on what is the problem which they faced in their country and what can Peter do to
8

help them. After the voice clip is over, Peter will meet the Server where the information will be given to
Peter informing him what he should do. After that all the packets will then enter the network and choose
their own path.

In the 1st stage, user must control peter through a straight course where he has to avoid bumping
into other packets, avoiding viruses and also hackers. In this stage, virus shield, also found in servers as
anti viruses is found randomly in the stage. When a user picks up this item a shield surrounds peter and he
can walk though the hackers net without being caught. Without this, he has to jump over the net. Besides
hacker, peter will meet the virus as well. In this stage, a spray is given to defeat the virus. When the user
picks up the virus spray, user has to press the spacebar button to spray the viruses and eventually kills it.
Without it, users must use Peter and jump across the viruses to avoid them.

After passing the 1st stage, Peter will have to go through the router part also known as routing
section. In this stage, the router has been working for a long time and its starting to spoil. In order to wait
for the new router to take control, users must control peter and gives out instruction to the old router on
which route the packets must take to reach their destination. 4 paths will be given to the user to choose, a,
b, c, d. Each path will have obstructions after every packet has passed by. For example, after the 1 st packet
uses route A, route A will be slow or it could be broken or it could be congested, so users must be wise to
pick which route the packet must pick to reach their destination the fastest. When this stage is completed,
a new router from Cisco will take over and the routing process will be back normal.

The last stage is the wireless space area. In this stage, users must control peter through a wireless
space area using a jetpack. With this jetpack, peter will float in mid air and has to pass by multiple
packets, hackers, security checkpoint and also interference. Users must keep clicking to keep Peter afloat
and he must pick up the security key in order to pass by the guard. Without the key he is not allowed to
pass and he must return to get the key again. Peter must also avoid the hacker and interference in game so
that his not slown down.

After the last stage is completed, Peter will reach its destination and there, the packets are
combined to fit the exact data sent and the information has finally been sent. When the data has
9

successfully been sent, a video is played showing the information has been sent and how users have
helped that particular country. After that video, the previous server will now show the users several
options whether users would want to learn more about how they can help the country or back to the game
to play a different stage.

Peter Packet has taught me and my group members many things. To begin with, overall Peter
Packet has taught us how when a data from the sender is sent to the receiver via the network. In class, we
learnt how the packet is sent via 4 steps, addressing, encapsulation, routing and decapsulation but in this
game we learnt it in a much better state and we could understand it much better.

During the addressing and encapsulation state, we learnt that Peter Packet will receive several
information by the server before he was sent out to deliver the information. He received: - ID number,
Piece of Data, Origin IP, Destination IP and also Checksum. This information is crucial when a packet
wants to deliver the data to from the sender to receiver, without this it would mean the packet is some sort
blind.
During the routing state, Peter entered the 2nd stage where he meets the faulty router. We have
learnt that the job of the router is to find the fastest way for the data to transfer throughout the network.
We also learn that the router will have multiple tasks to do and a data does not control which route it will
use. A slow router will also cause congestion and multiple other problems.

10

During the decapsulation process, which is also the last final stage, when Peter reaches its
destination, we learnt that the packet sent will then reassemble to the original data and will be received by
the user. When the data is not completed, the packet will be resent until its all completed.
Peter packet has taught us more than the sending and receiving process. It has also taught us more
about hackers, encryption, viruses and also meanings of internet, servers, wireless and how important and
vast is the network.

11

12

References
1.) WIKIPEDIA The Free Encyclopedia 2009. Transmission Control Protocol
[Online] (Updated: 22 July 2009)
Available at: http://en.wikipedia.org/wiki/Transmission_Control_Protocol
[Accessed: July 20th 2009]
2.) WIKIPEDIA The Free Encyclopedia 2009. User Datagram Protocol
[Online] (Updated: 23rd July 2009)
Available at: http://en.wikipedia.org/wiki/User_Datagram_Protocol
[Accessed: July 20th 2009]
3.) School on Internet Asia Project 2007. TCP Role
[Online] (Updated: not specified)
Available at: http://www.soi.asia/pkg2/01/62.html
[Accessed: July 20th 2009]
4.) 3WayHandshake.com. The three way or 3 way handshake is necessary for reliable TCP
communication.
[Online] (Updated: April 4th 2007)
Available at: http://www.3wayhandshake.com/
[Accessed: July 20th 2009]
5.) Network Working Group. TCP Congestion Control
[Online] (Updated: April 1999)
Available at: http://www.ietf.org/rfc/rfc2581.txt
[Accessed: July 20th 2009]
6.) Toms hardware. Closing a TCP/UDP port
[Online] (Updated: March 2nd 2008)
Available at: http://www.tomshardware.com/forum/138786-45-closing-port
[Accessed: July 20th 2009]

Appendices
13

14

You might also like