5. the transport layer 5.1 role of transport layer it bridge the gab between applications and the...
DESCRIPTION
5.2 Addressing Transport layer addresses ports. when an application on one machine tries to communicate to an application on another machine, it must be able to specify which application it wants to talk. The process is done by channel number, also known as, Ports. For Instance: for web application service – port 80. Further, for every network application there might not be dedicated ports assigned, …hence PROCESS SERVERS comes to play role. Every client request have to pass through this Process Server, which helps client to communicate with desired application.TRANSCRIPT
5. The Transport Layer5.1 Role of Transport Layer
• It bridge the gab between applications and the network layer.
• Provides reliable cost-effective data transport from source machine to destination
machine independent of the underlying network and their topology.
Primary Task Performed by Transport Layer
• Opening a connection between two hosts.
• Managing the connection.
• Terminating an open connection.
The Transport Layer - Features-Segmentation
- Flow Control
- Connection establishment and breakdown.
- Error recovery
- connection multiplexing
- QoS (Quality of Service)
- Reliable and Unreliable connection
- Reliable connection – TCP (if packet is small)
- Unreliable connection – UDP (if packet is big)
Which protocol is used to transfer AUDIO OR VIDEO data,
why?
5.2 Addressing• Transport layer addresses ports.
• when an application on one machine tries to communicate to an application on another
machine, it must be able to specify which application it wants to talk.
• The process is done by channel number, also known as, Ports.
• For Instance: for web application service – port 80.
• Further, for every network application there might not be dedicated ports assigned, …
hence PROCESS SERVERS comes to play role.
• Every client request have to pass through this Process Server, which helps client to
communicate with desired application.
5.3 A Simple Transport Protocol
IDLE
PEND oPEND i
CONN
CR
TR
CC CC
TR
CR
TR TR
DATA DATA
Incoming Outgoing
Network to Transport
TransporttoApplication
Figure: State Diagram for Simple Transport Protocol Module
CR – connection Request
TR – Terminate RequestCC – Connection Confirmed
5.4 Setting up a Connection• Transport layer connects two computers using protocol that depends on “Number of
Handshakes.”.
• It is required, because the underlying network can lose or duplicate messages and the
transport layer modules could get stuck.
Scenario: If one host sends CR request, while the receiving host gets crashed, then the
sender would be stuck forever in the PEND o state.
• The situation of the sender host is also known as DEAD LOCK.
Past Year Questions from Chapter 51. State 3-way handshaking process with state diagrams or event diagram?
2. With aid of diagrams, describe differences between Event and State diagrams? (6m)
3. How Transport layer guarantee the data it sends will deliver if the underlying network
is unreliable? (2m)
4. With aid of diagrams, explain Deadlock and Live lock situation? (6m)
5. With aid of diagram, describe 3-way handshake process? (7m)
6. List the cases that have to be handled during terminating the connection? (3m)
7. Two approaches of congestion control is packet elimination and relying on flow
control, describe each. (4m)
8. How Selective Repeat Receiver enhances flow control compared to GO-BACK-N
scheme? (2m)
5.4.1.1 Two-way Handshake• Two-way handshake is the oldest process used by Transport layer during the
connection sessions between two hosts.
IDLE IDLE
CONN
CONN
CR
CC
Host A Host B
5.4.1.1 Two-way Handshake• Two-way Handshake Failure
IDLE IDLE
CONN
CR
CC
Host A Host B
Lost
Stays on IDLE state Stays on CONN state
This is also known as DEADLOCKED state
5.4.1.2 Naive Three-way Handshake• It is the process used by Transport layer to eradicate the problem found in Two-way
Handshake using Timer and Acknowledgement concepts.
IDLE IDLE
ACKCONN
CR
CC
Host A Host B
WACK oWACK i
CONN
5.4.1.2 Naive Three-way Handshake• Naïve Three-way Handshake Failure
IDLE IDLE
Host A Host B
WACK oWACK i
IDLE
WACK o
IDLE
WACK i
This Process could go on indefinitely, and is also known as LIVELOCK.
5.4.1.3 Three-way Handshake with Sequence Number• It eradicates all problems found in naive handshaking method with the use of
Sequence Numbers to differentiate between the request that is passed on.
Data (seq = x+1 ; ack = y)
CR (seq = x)
CC (seq = y ; ack = x)
Host A Host B
5.5 Terminating a ConnectionThere are three obvious cases that have to handled during connection termination.
• A issues a TR (Termination Request) message.
• A and B issue TR simultaneously.
• Transport Layer detects networks has problems and informs A and B.
5.5 Managing a Connection5.5.1 Buffering
• As underlying Network is unreliable it is good practice to adopt Buffering.
• Buffering means, to temporarily store the data that are be transmitted from the sender
until they are acknowledged by the receiver.
• As the traffic in the internet is very high, the storage requirement of buffer might
increase significantly, hence proper buffer management is required.
• Alternatively, a common buffer pool, or a per-connection buffer pool can be used.
• Further, the size of the buffer pool can also be varied as the traffic pattern changes.
5.5 Managing a Connection (contd)5.5.2 Flow Control
• It is required where a fast sender is sending to a slow receiver.
• Since, once the receiver buffers are full, additional messages sent are lost and is
required to send once again.
Sliding Window Protocol
• It uses sequence number from 0 to n to denote specific messages.
• The sender maintains list of consecutive sequence numbers corresponding to messages
it is permitted to send (THE SENDING WINDOW)
• While, the receiver maintains a list of messages it is prepared to accept (THE RECEIVING
WINDOW).
5.5 Managing a Connection (contd)Go-Back-N
• It also uses basic Sliding Window Protocol, where receiver will acknowledge each
message before sender will send next one.• It allows sender to send N-1 more packets before an acknowledge received for sent
packets.
Selective Repeat Receiver
• Unlike Go-Back-N, this method not all messages, rather buffer correct messages from
bad ones.
• Further, the sender will have to sent only the damaged message and receives an
acknowledgement for it.
• If the damaged message arrives at the receiver, it will trash all subsequent messages so
that sender has to sent all again.
5.5.3 MultiplexingUpwards Multiplexing
• A transport layer can reduce network costs by having several transport layer
connections share the same network layer connection.
Downwards Multiplexing
• If a transport user needs a high bandwidth connection, but each network connection is
of limited bandwidth, then the transport layer connection can be spread over several
network layer connections.
5.6.4 Network Crash Recovery – will be discussed in TCP chapter as it provides the
solution with half-open connection.