Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad.

Similar presentations


Presentation on theme: "Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad."— Presentation transcript:

1 Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad

2 Computer Networks The Transport layer
Chapter 8 Computer Networks The Transport layer

3 Two broad categories Reliable Robust and stream like service
Retransmission and adapted retransmission time Ordered Delivery Optimum utilization of bandwidth Flow control Quality of delivery No frills service Real time delivery

4 Multiplexing and demultiplexing

5 Multiplexing at Transport layer

6 Demultiplexing at Transport layer

7 Other desirable services not provided by Internet Transport layers
End to end security End to end QOS Isochronous property Additional security measures Authentication Authorization Non repudiation

8 Process level Addressing

9 End to End solutions Flow control
Managing multiple connections Dynamically Timer management Retransmissions, RTT and Timout calculations Session Control

10 Retransmission RTT and Timeout
Estimated   RTT = [(1 − a) × previous estimate of RTT] + [(a × current RTT value)]  Estimated RTT = [(0.875 × previous estimate of RTT)] + [(0.125 × current RTT value)] Estimated deviation = [(1 − b) × previous estimate of deviation] + [(b × current deviation)] Estimated deviation = [(1 − b) × previous estimate of deviation] + [b × (previous estimation of RTT  − current actual value or RTT)]

11 Retransmission RTT and Timeout
Estimated deviation = (0.75 × old deviation) + (0.25 × current deviation) Timeout value = Estimated RTT + (4 × Estimated deviation) Timeout value = Estimated RTT + (h × Estimated deviation)

12 Other Timers Connection establishment Retransmission Delayed ACK
Persist Keepalive Fin-Wait-2 Time-Wait

13 Persist timer

14 Connection Management: Delayed duplicate problem
Time of reach the destination is variable A delayed segment can be assumed lost ACK can also be delayed The delayed duplicates and the problem

15 Solutions to delayed duplicates prolem
A unique sequence number for each segment TCP Sequence numbers Size of a sequence number field Keep a track of obsolete sequence numbers What if a machine goes down Choose a better sequence number Clock rate and speed of sending Desirable properties of a clock

16 Segment numbering

17 Ordering and defragmentation is possible with this numbering method

18 Setting the sequence number according to first byte in the sequence

19 Delayed duplicates and connection establishment

20 Delayed duplicates and connection establishment

21 Better connection establishment
Identify duplicate CRs and ACKs Assigning unique connection IDs Limiting the segment lifetime The three way handshake instead of two way handshake

22 Three way handshake

23 Delayed duplicates cannot be a problem

24 Delayed duplicates cannot be a problem

25 TCP Three way hand shake

26 TCP Three way hand shake

27 Symmetric connection close

28 Normal disconnection

29 DR Lost

30 Multiple DRs lost most critical case

31 ACK to DR is lost

32 The last Ack is lost

33 Congestion control Detecting congestion Implicit Explicit
No dependency on IP and other protocols Segment loss observation Explicit ECN Congestion experience and notification bits

34 Random early discard

35 Tail drop

36 Incorporating RED

37 RED process For each incoming packet, the average queue length is calculated. Weighted avg. when datagram N arrives = (1 – g) × Weighted avg. when datagram N−1 arrived + (g × Current queue length) If Avg is < Min, the packet is enqueued. If Avg is > Max, the packet is dropped.

38 RED process Otherwise the average falls between Min and Max, so p is calculated. A packet is dropped with probability p. The average value is saved to be used in calculating the average in the next iteration.

39 Fast Recovery

40 Fast Recovery Three duplicate ACK triggers retransmission

41 The slow start

42 Slow start with additive increase

43 AIMD with fast recovery

44 Fast retransmit

45 After fast recovery, a packet part of the window is resent when found not received

46 Flow Control Receiver window Window advertisement
Zero window advertisement

47 Comparison with Data link layer

48 DLL peers vs TL peers

49 Comparison with data link layer
Addressing Transmission and reception speed Finding timeout value Avoiding spurious connection Buffering

50 Sockets and client server interaction
Client End point = IP address of the client machine + Port number of client process Server End Point = IP address of the client machine + port number of server process Socket = Client end Point + server End point

51 The need for port number
Different operating systems assign different Process IDs. The process needs to be identified uniquely every time so the OS must start running it with the same ID. Process is to be identified uniquely automatically without the user’s intervention Well Known Ports are advantage

52 Server side activities

53 Client side activities

54 The state transition diagram

55 Sample Client Server Program
A trimmed version is presented in the book It is written in C but can also be written in many other languages BSD sockets are used TCP is assumed (UDP can as well be used)

56 Sample Client Server Program
Linux environment is assumed One client and one server program is presented Named pipes are used for IPC

57 Managing multiple connections dynamically: buffer management
Keep a single buffer for all layers Different strategies Decide optimum size Similar sized buffers Different sized buffers Circular buffer Decide when to buffer Different buffer for different connection

58 Window Advertisement

59 Zero window advertisement

60 Crash recovery A process may crash
There no way of knowing the status before crash No assumption about that state yields correct answer for every situation Best solution is to restart from scratch Checkpoints may help but adds overhead

61 Performance measures Sliding window Accurate measurement of RTT
Silly Window Syndrome Delayed ACK MSS option Window Scale factor SACK option

62 Silly Window Syndrome

63 Silly window syndrome

64 Solution: Nagle’s algorithm
Send the first character typed as its to the other end, wait for the acknowledgement collect all the bytes typed so far and send them collectively as soon as the acknowledgement is received

65 The SACK Option

66 The SACK Option and fast retransmit

67 Nonstandard performance measures
Pass by reference (all the segments) Avoid Context switching Predict headers (most of the segments) Timer management Using timing wheel

68 Timing wheel of length 8


Download ppt "Computer Networks Bhushan Trivedi, Director, MCA Programme, at the GLS Institute of Computer Technology, Ahmadabad."

Similar presentations


Ads by Google