You are on page 1of 43

TRANSPORT LAYER PROTOCOL

Laxmi
Balami

Smarika
Manandhar

Ayush
Rajbhandar
i

Karun
Shakya
Introducing Protocol
What is “Protocol”?

The standard rules and


regulations of the
networking system are
called protocols.

In client server
application, project
leaders, architects and
developers must
understand the protocols
available, what they mean
and how they differ in
features and capacity.
Some of the protocols

TCP/IP
 The Internet Protocol (IP)
is a data oriented protocol
XNS (Xerox Network System) used for communicating
data across a packet
IPX (Internetwork Packet switched internetwork.
Exchange)
 IP is a network layer

protocol in the internet


AppleTalk protocol
protocol suite.
 IP provides the service of
DECnet protocol communicable, unique,
global addressing among
System’s Network Architecture computers.
(SNA)
Packetization Reliability
• Data from an upper layer • IP provides an unreliable
protocol is encapsulated inside service.
one or more packets (datagram). • This means that the network
• No circuit set up is needed makes no guarantee about that
before a host tries to send packet transfer because of many
packets to another host, thus IP reasons like,
protocol is a connectionless • Data corruption,
protocol. • Out of order (packet A may be
• This is quite unlike public sent before packet B, but B
switched telephone networks can arrive before A),
that require the set up of a • Duplicate arrival,
circuit before a phone call is • Data lost or dropped.
made (a connection oriented
protocol).
IP addressing and routing
Perhaps the
most complex
aspects of IP
are IP
addressing and
routing.

Addressing
refers to how
end host are
assigned IP
addresses.

IP routing is
performed by
all hosts, but
most
importantly by
internetwork
routers.
Types of Routing

Transmission of
datagram from one
computer
directly to another
Direct on the same
Routing physical network.
Routing
Indirect
RoutingDestination
host is not on same
network.
Transmission Control Protocol (TCP)
What is TCP? Basically
Multiple
ItIt
TCP
is
can
Basically
in
Multiple
It
TCP
rea
is
can
It
the

information
in
large
different
rea
another
percent
remote
large
different
another
conversations
maintains
retransmits

toreliable
fit
goalwhat
is important
to be
magoing
ke sure
the
maintains
retransmits
ches
two
destination
remote be
ma is
from
to going
does ke
communication.
reliable
toches
two
destinationfrom
ma if
does
actually
to same
of that
anything

chines
if
sure
host
not reach
into
intact
fithost
into
communication.
percent does
to actually
same
TCP
onthat
does not reach to the
information goes
one
process
pla ce
chines
aone
not.
transmit
time.
plaone
process
intact
ce
not.
transmit
time.
between
conversations
goal what
internet
aanything
maimportant
one
packet
on to
goes
packet
with
that
and the
IPat
in
data
of to
TCP
that
plaisce
between
to
thea
packet
cent
internet
with
plaisce
data
condition
and what
IPat
in
a
tooto
data
what
. to
too
packet
cent
the
data. .
condition
.

The ability to handle this scenario is called


multiplexing and TCP provides a set of ports,
uniquely identified port numbers on a given
host through which various data are sent and
received in application.
Transmission Control Protocol
Beyond
There
This this,
portare a user
assigned
information process
TCP
together port
with
the information that the IP protocol
may
numbersindependently
for variousselect
uses to identify an individual machine
application
port
on thefor a conversation
internet,protocols (pre-
(user
forms TCP socket or
defined port
alternatively justnumbers).
number).
a socket.

All sockets are completely


unique on the internet.
TCP Connection

 To use TCP we must


connect a socket on the
local machine to a socket The socket on
on a remote machine. the local host
again
 This occurs in three steps: The remote
acknowledges
machine
.
acknowledges
the remote
TCP sends a socket sends
connect a response to
message from the local
the local socket.
socket.
TCP Connection

Bidirectional means both


A TCP This process of parties in a connection can send
connection is negotiating a and receive data.
then said to connection is
have been called
opened. handshaking.

Specifically the Once a connection


handshaking has been formed Because of the significance
method that TCP TCP can transmit
uses is called 3 data. TCP of establishing connections
way communication is in TCP it is referred to as a
handshaking. bidirectional. connection oriented
protocol.
Three way handshaking
 Established to maintain two machines or programs in
synchronization
 It is also called the three message handshake
 The Transmission Control Protocol (TCP) level of the
TCP/IP protocol is connection-oriented.
 Before a client attempts to connect with a server, the server
must first bind to a port to open it up for connections: this is
called a passive open.
 Once the passive open is established, a client may initiate an
active open.
 There are two scenarios where a three-way handshake
will take place:
 Establishing a connection (an active open)
 Terminating a connection (an active close)

 Three way handshaking technique is referred to as


“SYN-SYN-ACK”
 The three-way handshake is the method used to
establish and tear down network connections.
 The steps that are generated in three way
handshaking are:-
 The active open is performed by sending a SYN to the server.
 In response, the server replies with a SYN-ACK.
 Finally the client sends an ACK (usually called SYN-ACK-ACK)
back to the server.
Fig: 3way handshaking in TCP/IP
Client Public Server
SIDE networking SIDE

SYN=1
SEQ#10

CK#11
K =1A
C
N =1 A
SY

ACK=
1 AC K
#11
Establishing Connection
 Frame1

Client Public Server


SIDE networking SIDE

SYN=1
SEQ#10
 Frame2
Client Public Server
SIDE networking SIDE

SYN=1
SEQ#10

CK#11
K =1A
C
N =1 A
SY
 Frame 3

Client Public Server


SIDE networking SIDE

SYN=1
SEQ#10

CK#11
K =1A
A C
=1
SYN
TCP PORT NUMBER AND SOCKET
PAIRS
Port
End points for a network communication allow different
applications on the same computer to utilize network
resources without interfering with each other

For example, a person visits on the Internet and use a URL like the
following: http://www.mairie-metz.fr:8080/ the number 8080 refers to
the port number used by the Web browser to connect to the Web server
In IP networking, port
numbers can
theoretically range
from 0 to 65535.

A port can refer to a


physical connection point
for peripheral devices
such as serial, parallel,
and USB ports
SOME OF THE WELL KNOWN PORTS
NUMBERS
Service TCP Notes
HTTP 80 HyperText Transfer
Protocol * (e.g. for web
browsing). Currently
(2003-07-05) HTTP/1
MS NetMeeting LDAP or videoconferencing
ULP, dyn
>=1024,
1503,
H.323
HostCall,
MS ICCP
HTTPs 443 secure HTTP
(SSL) *

LPD / printer 515 printing * LPD


stands for Line
Printer Daemon.

MSN Messenger 1863 instant


messenging *.

Yahoo Messenger 5000-5001 voice chat


- Voice Chat
SOCKET PAIR
the exchange of data between a pair of devices consists of a
series of messages sent from a socket on one device to a
socket on the other

In the case of TCP, a connection is established for each pair


of devices for the duration of the communication session.

This is done using the pair of socket identifiers for each of


the two devices that are connected.
SO Communicating
local and remote socket pair is desc
rib
sockets are called by a unique 4-tuple ed
socket pairs structure (record)
consisting of sourc
e
and destination IP
addresses and port
numbers, i.e. of lo
cal
and remote socket
addresses.
Let's see an example

We are sending an HTTP request from our client at


177.41.72.6 to the Web site at 41.199.222.3. The server for that
Web site will use well-known port number 80, so its socket is
41.199.222.3:80, as we saw before. We have ephemeral(
temporary, transitory, fleeting, evanescent, momentary,
short-lived, short, volatile ) port number 3,022 for our Web
browser, so the client socket is 177.41.72.6:3022. The overall
connection between these devices can be described using this
socket pair:
(41.199.222.3:80, 177.41.72.6:3022)
 Unlike TCP, UDP is a connectionless protocol, so it
obviously doesn't use connections. The pair of
sockets on the sending and receiving devices can
still be used to identify the two processes
exchanging data, but since there are no connections
the socket pair doesn't have the significance that it
does in TCP.
TCP/IP Services

The theoretical operation of TCP/IP covers many layers of


the model is based on the the OSI model, and so it
concept of one layer collectively provides services
providing services to the of this sort as well in many
layers above it. ways.
we can divide TCP/IP services
into two groups:

Services Provided Services Provided


to other protocols to end user directly
Services Provided to other
protocols

Consists of the core Designed to actually Higher-layer protocols


accomplish the use these services,
functions implemented
allowing them to
by the main TCP/IP internetworking concentrate on what
protocols such functions of the they are intended to
as IP, TCP and UDP. protocol suite. accomplish.
Services Provided to end
user directly

These facilitate the WWW services are HTTP in turn uses services
operation of the provided through provided by lower-level
applications that users run the Hypertext Transfer protocols. All of these
to make use of the power Protocol (HTTP), a details are of course hidden
of the Internet and other TCP/IP application layer from the end users, which
TCP/IP networks. protocol. is entirely on purpose!
The TCP/IP Client/Server
Structural Model
An important defining characteristic of
TCP/IP services is that they primarily operate
in the client/server structural model.

This term refers to a system where a relatively


small number of (usually powerful) server
machines is dedicated to providing services to
a much larger number of client hosts.
Just as client/server networking applies to hardware,
this same concept can be applied to software and
protocols, and this is exactly what was done in the
design of TCP/IP protocols and applications.

TCP/IP protocols are not set up so that two machines


that want to communicate use identical software.

Instead, a conscious decision was made to make


communication function using matched,
complementary pairs of client and server software.
The client initiates communication
by sending a request to a server for
data or other information. The server
then responds with a reply to the
client, giving the client what it
requested, or else an alternative
response such as an error message or
information about where else it might
find the data.
TCP/IP Client/Server Operation
Understanding TCP/IP Client
and Server Roles
HARDWARE ROLES: 

A “server” is usually a
very high-powered
machine dedicated to
A “client” computer is responding to client
usually something like a requests, sitting in a
PC or Macintosh computer room
The terms “client” and computer used by an somewhere that nobody
“server” usually refer to individual, and but its administrator
the primary roles played primarily initiates ever sees. 
by networked hardware. conversations by
sending requests.
Software Roles: 
Client software
is usually found
As mentioned on client
earlier, TCP/IP A Web browser hardware and
uses different is a piece of server software
pieces of client software, on server
software for while Web hardware,
many protocols server software but not always.
to implement is completely Some devices
“client” and different. may run both
“server” roles. client and
server
software. 
Transactional Roles: 
In any exchange of
information, the client is
normally the device that
initiates communication or
sends a query; the server
responds, usually providing
information. Again, usually the
client software on a client
device initiates the transaction,
but this is not always the case.
 So, in a typical organization there will be many
smaller individual computers designated “clients”,
and a few larger ones that are “servers”. The
servers normally run server software, and the
clients run client software. But servers can also be
set up with client software, and clients with server
software.
Bye Bye

You might also like