+ All Categories
Home > Technology > Unit 6 transport layer

Unit 6 transport layer

Date post: 15-May-2015
Category:
Upload: chintan-patel
View: 1,303 times
Download: 2 times
Share this document with a friend
Description:
The transport layer...TCP VS IP , TCP HEADER , UDP , And transport layer functionalists............
Popular Tags:
80
Prof. CHINTAN PATEL [email protected] MEFGI , Rajkot
Transcript
Page 1: Unit 6 transport layer

Prof. CHINTAN PATEL

[email protected]

MEFGI , Rajkot

Page 2: Unit 6 transport layer
Page 3: Unit 6 transport layer

Flow control

Error control

Multiplexing and de-multiplexing

Segmentation and Reassembly

Service point addressing

Page 4: Unit 6 transport layer

• Service provided to upper layer.

• Transport service primitives

• Transport layer protocols : TCP and UDP

Page 5: Unit 6 transport layer
Page 6: Unit 6 transport layer
Page 7: Unit 6 transport layer
Page 8: Unit 6 transport layer

• Transport entity to make efficient use of network services.

• Many services of transport layer and network layers are similar but

• “ The transport codes runs entirely on user machine , butnetwork layer mostly runs on the routers”

• User does not have control over network layer so only possibility isto put on top of the network layer another layer that improvesquality of services.

• Transport service provider : Physical layer

Data link layer

Network layer

Transport layer

• Transport service users : Application , presentation and session layer.

Page 9: Unit 6 transport layer
Page 10: Unit 6 transport layer

The nesting of TPDUs, packets, and frames.

Page 11: Unit 6 transport layer

• A network socket is an endpoint of an inter-process communicationflow across a computer network. Today, most communication betweencomputers is based on the Internet Protocol; therefore most networksockets are Internet sockets.

• A socket API is an application programming interface(API), usually providedby the operating system, that allows application programs to control anduse network sockets. Internet socket APIs are usually based onthe Berkeley sockets standard.

• A socket address is the combination of an IP address and a port number,much like one end of a telephone connection is the combination of a phonenumber and a particular extension. Based on this address, internet socketsdeliver incoming data packets to the appropriate application processor thread.

Page 12: Unit 6 transport layer
Page 13: Unit 6 transport layer
Page 14: Unit 6 transport layer

• Addressing

• Connection Establishment

• Connection Release

• Flow Control and Buffering

• Multiplexing

• Crash Recovery

Page 15: Unit 6 transport layer

(a) Environment of the data link layer.

(b) Environment of the transport layer.

Page 16: Unit 6 transport layer

The transport layer is responsible for

process-to-process delivery.

Note:

Page 17: Unit 6 transport layer
Page 18: Unit 6 transport layer

Normally servers must have a known port number, while clients can have

ephemeral(temporary) port numbers

(Port numbers 0..2^16-1 = 0..65,535)

Page 19: Unit 6 transport layer
Page 20: Unit 6 transport layer
Page 21: Unit 6 transport layer

IP addresses versus port numbers

Page 22: Unit 6 transport layer
Page 23: Unit 6 transport layer
Page 24: Unit 6 transport layer

• There are two styles of terminating a connection:asymmetric release and symmetric release.

• asymmetric release is the way the telephone systemworks: when one party hangs up, the connection isbroken

• symmetric release treats the connection as twoseparate unidirectional connections and requires eachone to be released separately.

• asymmetric release may result in loss of data:

Page 25: Unit 6 transport layer
Page 26: Unit 6 transport layer
Page 27: Unit 6 transport layer

The two-army problem.

Page 28: Unit 6 transport layer

(c) Response lost. (d) Response lost and subsequent DRs lost.

Page 29: Unit 6 transport layer
Page 30: Unit 6 transport layer

(a) Chained fixed-size buffers. (b) Chained variable-sized buffers.

(c) One large circular buffer per connection.

Page 31: Unit 6 transport layer

• Introduction to UDP

• Remote Procedure Call

• The Real-Time Transport Protocol

Page 32: Unit 6 transport layer

UDP is a connectionless, unreliable protocol

that has no flow control and error control

(except checksum calculation).

•If packet loss during transmission it can not

recover by UDP . It can recover error only in

arrived packet using check sum

•It uses port numbers to multiplex data from

the application layer.

Note:

Page 33: Unit 6 transport layer
Page 34: Unit 6 transport layer

Popular ApplicationPort Protocol Description

7 Echo Echoes a received datagram back to the sender

9 Discard Discards any datagram that is received

11 Users Active users

13 Daytime Returns the date and the time

17 Quote Returns a quote of the day

19 Chargen Returns a string of characters

53 Nameserver Domain Name Service

67 Bootps Server port to download bootstrap information

68 Bootpc Client port to download bootstrap information

69 TFTP Trivial File Transfer Protocol

111 RPC Remote Procedure Call

123 NTP Network Time Protocol

161 SNMP Simple Network Management Protocol

162 SNMP Simple Network Management Protocol (trap)

Page 35: Unit 6 transport layer
Page 36: Unit 6 transport layer
Page 37: Unit 6 transport layer
Page 38: Unit 6 transport layer

Steps in making a remote procedure call. The stubs are shaded.

Page 39: Unit 6 transport layer

• RPC : When a process on M/C 1 calls a procedure on M/C 2, the callingprocess on 1 is suspended and execution of the called procedure takesplace on 2.

• Calling procedure is known as a Client.

• Called procedure is known as a server.

• Client stub : Represents server procedure in client address space.

• Server stub : Represent reply to client in server address space.

• 1: client calling client stub(Local procedure call).

• 2 : Marshaling : Client stub packing the parameter in message andmaking a system call to send a message.

• 3: Kernel sends a message from a client m/c to server stub.

• 4: Kernel passing in coming parameter to server stub.

• 5 : server stub calls server procedure with unmarsheled parameter.

Page 40: Unit 6 transport layer
Page 41: Unit 6 transport layer
Page 42: Unit 6 transport layer
Page 43: Unit 6 transport layer
Page 44: Unit 6 transport layer
Page 45: Unit 6 transport layer
Page 46: Unit 6 transport layer
Page 47: Unit 6 transport layer
Page 48: Unit 6 transport layer
Page 49: Unit 6 transport layer
Page 50: Unit 6 transport layer
Page 51: Unit 6 transport layer
Page 52: Unit 6 transport layer
Page 53: Unit 6 transport layer
Page 54: Unit 6 transport layer
Page 55: Unit 6 transport layer
Page 56: Unit 6 transport layer

(a) A fast network feeding a low capacity receiver.

(b) A slow network feeding a high-capacity receiver.

Page 57: Unit 6 transport layer

• TCP has a mechanism for congestion control. The mechanism is implemented at the sender

• The window size at the sender is set as follows:

where

• flow control window is advertised by the receiver

• congestion window is adjusted based on feedback from the network

Send Window = MIN (flow control window, congestion window)

Page 58: Unit 6 transport layer

Add one packet

each RTT

Source Destination

Page 59: Unit 6 transport layer
Page 60: Unit 6 transport layer

• Too slow.

• Reacts aggressively.

• Wastage of bandwidth at initial stage.

• Congestion is detected when time out occurs.

Page 61: Unit 6 transport layer

• The sender has two additional parameters:

Congestion Window (cwnd) Initial value is 1 MSS(=maximum segment size) counted as bytes

Slow-start threshold Value (ssthresh) Initial value is theadvertised window size)

• Congestion control works in two modes:

Slow start (cwnd < ssthresh)

Congestion avoidance (cwnd >= ssthresh)

Page 62: Unit 6 transport layer

Slow start, exponential increase

Page 63: Unit 6 transport layer

In the slow start algorithm, the size of the

congestion window increases exponentially

until it reaches a threshold.

Note

Page 64: Unit 6 transport layer
Page 65: Unit 6 transport layer

In the congestion avoidance algorithm the

size of the congestion window

increases additively until

congestion is detected.

Note

Page 66: Unit 6 transport layer
Page 67: Unit 6 transport layer
Page 68: Unit 6 transport layer
Page 69: Unit 6 transport layer
Page 70: Unit 6 transport layer
Page 71: Unit 6 transport layer
Page 72: Unit 6 transport layer
Page 73: Unit 6 transport layer

Window management in TCP.

Page 74: Unit 6 transport layer
Page 75: Unit 6 transport layer

• When a segment is sent, a retransmission timer isstarted.

• If the segment is acknowledged before the timerexpires, the timer is stopped.

• If, on the other hand, the timer goes off before theacknowledgement comes in, the segment isretransmitted (and the timer os started again).

Page 76: Unit 6 transport layer

• It is designed to prevent the following deadlock.

• The receiver sends an acknowledgement with awindow size of 0, telling the sender to wait. Later, thereceiver updates the window, but the packet with theupdate is lost. Now the sender and the receiver areeach waiting for the other to do something.

• When the persistence timer goes off, the sendertransmits a probe to the receiver. The response to theprobe gives the window size. If it is still 0, thepersistence timer is set again and the cycle repeats. If itis nonzero, data can now be sent.

Page 77: Unit 6 transport layer

• When a connection has been idle for a long time, thekeep-alive timer may go off to cause one side to checkwhether the other side is still there.

• If it fails to respond, the connection is terminated.

Page 78: Unit 6 transport layer

• It runs for twice the maximum packet lifetime to makesure that when a connection is closed, all packetscreated by it have died off.

Page 79: Unit 6 transport layer
Page 80: Unit 6 transport layer

Recommended