Date post: | 15-May-2015 |
Category: |
Technology |
Upload: | chintan-patel |
View: | 1,303 times |
Download: | 2 times |
Flow control
Error control
Multiplexing and de-multiplexing
Segmentation and Reassembly
Service point addressing
• Service provided to upper layer.
• Transport service primitives
• Transport layer protocols : TCP and UDP
• 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.
The nesting of TPDUs, packets, and frames.
• 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.
• Addressing
• Connection Establishment
• Connection Release
• Flow Control and Buffering
• Multiplexing
• Crash Recovery
(a) Environment of the data link layer.
(b) Environment of the transport layer.
The transport layer is responsible for
process-to-process delivery.
Note:
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)
IP addresses versus port numbers
• 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:
The two-army problem.
(c) Response lost. (d) Response lost and subsequent DRs lost.
(a) Chained fixed-size buffers. (b) Chained variable-sized buffers.
(c) One large circular buffer per connection.
• Introduction to UDP
• Remote Procedure Call
• The Real-Time Transport Protocol
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:
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)
Steps in making a remote procedure call. The stubs are shaded.
• 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.
(a) A fast network feeding a low capacity receiver.
(b) A slow network feeding a high-capacity receiver.
• 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)
Add one packet
each RTT
Source Destination
• Too slow.
• Reacts aggressively.
• Wastage of bandwidth at initial stage.
• Congestion is detected when time out occurs.
• 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)
Slow start, exponential increase
In the slow start algorithm, the size of the
congestion window increases exponentially
until it reaches a threshold.
Note
In the congestion avoidance algorithm the
size of the congestion window
increases additively until
congestion is detected.
Note
Window management in TCP.
• 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).
• 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.
• 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.
• It runs for twice the maximum packet lifetime to makesure that when a connection is closed, all packetscreated by it have died off.