Unit 4 - Transport Layer
Unit 4 - Transport Layer
Segment
• Addressing
• Connection Establishment
• Connection Release
• Flow Control and Buffering
• Multiplexing
• Crash Recovery
Transport Protocol
(a) Environment of the data link layer. (b) Environment of the transport layer.
Portmapper
Figure: TSAPs, NSAPs and transport connections.
Addressing
A possible scenario for a transport connection is as follows:
1. A mail server process attaches itself to TSAP 1522 on host 2 to wait
for an incoming call. How a process attaches itself to a TSAP is
outside the networking model and depends entirely on the local
operating system. A call such as our LISTEN might be used, for
example.
2. An application process on host 1 wants to send an email message, so it
attaches itself to TSAP 1208 and issues a CONNECT request. The
request specifies TSAP 1208 on host 1 as the source and TSAP 1522
on host 2 as the destination. This action ultimately results in a
transport connection being established between the application
process and the server.
3. The application process sends over the mail message.
4. The mail server responds to say that it will deliver the message.
5. The transport connection is released.
Addressing
Figure: How a user process in host 1 establishes a connection with a time-of-day server in host 2.
Each machine that wishes to offer services to remote users has a special
process server that acts as a proxy for less heavily used servers. This server
is called inetd on UNIX systems.
Addressing
Addressing: Port Numbers
Process-to-process communication is achieved through
the client-server paradigm.
A process on the local host, called a client, needs services
from a process usually on the remote host, called a server.
23.21
Addressing
A transport layer protocol needs both IP address and the port number,
at each end to make a connection.
The combination of an IP address and a port number is called a socket
address.
To use service we need a pair of socket addresses: the client socket
address and the server socket address of the transport layer in the
Internet.
Connection Establishment –
Three-way handshake
6-14, a, b
6-14, c,d
(c) Response lost. (d) Response lost and subsequent DRs lost.
Error Control and Flow Control
The solutions that are used at the transport layer(end-to-end)
are the same mechanisms used at the data link layer(link-to-
link).
1. A segment carries an error-detecting code (e.g., a CRC or checksum) that
is used to check if the information was correctly received.
2. A segment carries a sequence number to identify itself and is retransmitted
by the sender until it receives an acknowledgement of successful receipt
from the receiver. This is called ARQ (Automatic Repeat reQuest).
3. There is a maximum number of segments that the sender will allow to be
outstanding at any time, pausing if the receiver is not acknowledging
frames quickly enough. If this maximum is one packet the protocol is called
stop-and-wait. Larger windows enable pipelining and improve
performance on long, fast links.
4. The sliding window protocol combines these features and is also used to
support bidirectional data transfer.
Flow Control and Buffering
In line 16 above B allocated more buffers but the allocation segment (TPDU) was lost.
To prevent deadlocks like this, each host should periodically send control segments
giving the ack and buffer status on each connection .
Multiplexing
• Introduction to UDP
• Remote Procedure Call
• The Real-Time Transport Protocol
Introduction to UDP
UDP is a connectionless protocol for the Transport Layer
UDP (User Datagram Protocol) is a shim over IP
Header has ports (TSAPs), length and checksum.
(a) The position of RTP in the protocol stack. (b) Packet nesting.
The Real-Time Transport Protocol (2)
TCP Header.
The TCP Segment Header
1. Connection Establishment
a. Three-way Handshaking
b. SYN Flooding attack(problem in connection establishment)
2. Data Transfer
a. Pushing Data
b. Urgent Data
3. Connection Termination
a. Three-way Handshaking (Full-close):: Asymmetric Release)
b. Half - close :: Symmetric Release
TCP Connection Establishment
6-31
The states used in the TCP connection management finite state machine.
TCP Connection Management Modeling (2)
TCP connection
management finite state
machine.
The heavy solid line is
the normal path for a client.
The heavy dashed line is
the normal path for a
server.
The light lines are
unusual events. Each
transition is labeled by the
event causing it and the
action resulting from it,
separated by a slash.
TCP Transmission Policy
(a) Probability density of ACK arrival times in the data link layer.
(b) Probability density of ACK arrival times for TCP.
Wireless TCP and UDP
The fast path from sender to receiver is shown with a heavy line.
The processing steps on this path are shaded.
Fast TPDU Processing (2)
(a) TCP header. (b) IP header. In both cases, the shaded fields are taken
from the prototype without change.
Fast TPDU Processing (3)
A timing wheel.
Protocols for Gigabit Networks