Académique Documents
Professionnel Documents
Culture Documents
of EEE
Duties…
• The transport layer is responsible for process-
process-to
to--process
delivery—
delivery —the delivery of a packet, part of a message, from
one process to another.
TRANSPORT LAYER
Example 1 Example 2
port addresses
network addresses
physical address
3 4
S.Muralidharan 1
CS65-Computer Networks Dept. of EEE
5 6
• Data link layer protocol need to know which two computers N Layer
peer-to-peer protocol
within a network are communicating. Service N layer N layer
user entity entity
• Network level protocol need to know which two computers
Protocol Data Unit
within an internet are communicating.
• Transport level protocol need to know which upper layer N PDU N Layer PDU N PDU
SAP
protocols are communicating through Service Access
Points(SAP).
Service N-1 layer N-1 layer
provider entity entity
Service Data Unit
7 8
S.Muralidharan 2
CS65-Computer Networks Dept. of EEE
• To implement process-to-process communication, client- • Client and server will interact to using special packet to
server paradigm is easier. know the port address, they want to communicate. But
• Both client and server process have the same name. requires more overhead.
– For eg. To get the day and time from remote machine, we need a
Daytime client process running on the local host and a Daytime
• To avoid this, internet uses universal port numbers for
server process running on a remote machine. servers called “well-known port numbers”.
• Like MAC address at Data link layer, IP address at Network • Every client process knows the well-known port number of
layer , Transport layer uses Port number to identify a corresponding server process.
process.
• In the internet model, port numbers are 16-bit integers
between 0 & 65,535.
• The client program defines a port number chosen randomly
by the transport layer protocol running on it. This is called Shortlived/Brief well-known
“Ephemeral Port Number” port number port number
9 10
11 12
S.Muralidharan 3
CS65-Computer Networks Dept. of EEE
13 14
15 16
S.Muralidharan 4
CS65-Computer Networks Dept. of EEE
• Transport layer service can be reliable or unreliable. If the • ISO has defined three types of network services :
higher layer (application layer) needs reliability, we use a – Type A : network connections with acceptable residual error rate
reliable transport layer by employing flow and error control. and acceptable rate of signaled failures. (Reliable)
• Error is defined as a lost or duplicated network protocol data – Type B : network connections with acceptable residual error rate
unit. but unacceptable rate of signaled failure. (Unreliable)
• If the error is caught and corrected by the network service in – Type C : network connections with residual error rate not
a fashion that is transparent to the transport entity, no acceptable to the transport service user. (Unreliable)
damage is done.
• If the network service detects an error, cannot recover, and
signals the transport entities, this is known as a signaled
failure.
• Those which are not corrected and for which the transport
entity is not notified is called residual error.
17 18
Position of UDP, TCP, and SCTP in TCP/IP suite Transmission Control Protocol (TCP)
• User Datagram Protocol (UDP) is connectionless and unreliable ; • TCP is a connection-
connection-oriented protocol
Transmission Control Protocol (TCP) and Stream Control Transmission
Protocol (SCTP) are connection oriented and reliable. • It creates a virtual connection between two TCPs to send
data. In addition, TCP uses flow and error control
mechanisms at the transport level.
• Services provided by TCP are
– Process-to-process communication
– Stream Delivery service
– Sending and receiving buffer
– Segments
– Full duplex communication
– Connection oriented service
– Reliable service
19 20
S.Muralidharan 5
CS65-Computer Networks Dept. of EEE
21 22
23 24
S.Muralidharan 6
CS65-Computer Networks Dept. of EEE
Others services….
• TCP offers Full Duplex Communication
• TCP offers Connection oriented service
• TCP offers Reliable service
25 26
27 28
S.Muralidharan 7
CS65-Computer Networks Dept. of EEE
29 30
• Flags (6 bits)
• Window — Specifies the size of the sender’s receive window (that is,
the buffer space available for incoming data).
• Urgent Pointer — Points to the first urgent data byte in the packet.
31 32
S.Muralidharan 8
CS65-Computer Networks Dept. of EEE
• Connection establishment
– By “Three way handshake”
– Between pairs of ports
– One port can connect to multiple destinations
– Server program informs its TCP that it is ready to accept any
connection. This is called “Passive open”. But a server cannot initiate
any connection.
– A client program issues a request for an “active open”
– Malicious attacker may send a large number of SYN segments to the
server, pretending that each of them is coming from a different client
by faking the source. Without knowing this server may started
allocating its resources, which sometimes lead to server crash. This
attack is called “SYN flooding attack” and to manage this situation
server may restrict the number of connections or avoid requests from
unwanted sources.
33 34
35 36
S.Muralidharan 9
CS65-Computer Networks Dept. of EEE
• Connection termination
– Graceful close
– TCP users issues CLOSE primitive
– Transport entity sets FIN flag on last segment sent
– Abrupt termination by ABORT primitive
• Entity abandons all attempts to send or receive data
• RST segment transmitted
37 38
FIN segment
consumes one
sequence number
if it does not carry
data
The FIN+ACK
segment
consumes one
sequence
number if it
does not carry
data
39 40
S.Muralidharan 10
CS65-Computer Networks Dept. of EEE
Client
Server
41 42
43 44
S.Muralidharan 11
CS65-Computer Networks Dept. of EEE
45 46
47
S.Muralidharan 12