Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multimedie- och kommunikationssystem Föreläsning 11 Kapitel 12: Transportprotokoll. Flödesstyrning och trafikstocknings­hantering. Sliding window.

Similar presentations


Presentation on theme: "Multimedie- och kommunikationssystem Föreläsning 11 Kapitel 12: Transportprotokoll. Flödesstyrning och trafikstocknings­hantering. Sliding window."— Presentation transcript:

1 Multimedie- och kommunikationssystem Föreläsning 11 Kapitel 12: Transportprotokoll. Flödesstyrning och trafikstocknings­hantering. Sliding window.

2

3 Transport layer duties

4 Figure 22.1 Types of data deliveries

5 Virtual Connection at the Transport Layer TCP, UDP IP Application Physical IP Physical IP Physical Router Host TCP, UDP IP Application Physical Protocol stack in the host Protocol stack in the router

6 Figure 22.5 Socket address A socket is a data flow between two processes that is identified by its socket address pair, i.e. a unique combination of: - Transport protocol (UDP or TCP). - Source IP address and port number. - Destination IP address and port number.

7 Figure 22.7 Connection establishment

8 Figure 22.8 Connection termination

9 Client-Server Paradigm qUsed most often in Internet process-to-process communication, for example, email, web, file transfer, etc. qThe client process initiates the communication. qThe server process waits for the client to initiate communication, and responds by sending the information required. Example: Web server, email server, ftp server, etc. qA firewall often stops external clients from accessing internal servers, except certain web qOpposite: Peer-to-peer communication, where a program can act both as client (taking initiative) and server (responding to other).

10 User Datagram Protocol (UDP) qUDP is a connectionless, unreliable protocol that has no flow and error control. qNo connection management. qIt solely provides a mechanism multiplexing data from the application layer and demultiplexing at the receiver end by means of port numbers. qUse predominantly by protocols that do no require the strict service guarantees offered by TCP (e.g. real-time multimedia protocols). qIt is also used for applications that provide flow and error control (e.g. LAN-services such as shared disk access) qAdditional intelligence built at the application layer if needed.

11 Figure 12.20 (a) UDP header fields The calculation of checksum and its inclusion in the user datagram are optional.

12 Table 22.1 Well-known ports used by UDP PortProtocolDescription 7EchoEchoes a received datagram back to the sender 9DiscardDiscards any datagram that is received 11UsersActive users 13DaytimeReturns the date and the time 17QuoteReturns a quote of the day 19ChargenReturns a string of characters 53NameserverDomain Name Service 67BootpsServer port to download bootstrap information 68BootpcClient port to download bootstrap information 69TFTPTrivial File Transfer Protocol 111RPCRemote Procedure Call 123NTPNetwork Time Protocol 161SNMPSimple Network Management Protocol 162SNMPSimple Network Management Protocol (trap)

13 Figure 12.19 (b) UDP socket primitives: and their use.

14 Transmission Control protocol (TCP) qProvides a connection-oriented end-to-end (user-to-user) reliable byte stream service in both directions (full duplex) qDivides a byte stream into a sequence of segments and sends them to the destination via IP qUses the destination port, source port to identify the application to which the segment is sent (multiplexing the sessions) qUses sliding window like scheme for flow control and congestion control

15 TCP Header Fields

16 Figure 22.15 Control field

17 Table 22.2 Well-known ports used by TCP PortProtocolDescription 7 EchoEchoes a received datagram back to the sender 9DiscardDiscards any datagram that is received 11UsersActive users 13DaytimeReturns the date and the time 17QuoteReturns a quote of the day 19ChargenReturns a string of characters 20FTP, DataFile Transfer Protocol (data connection) 21FTP, ControlFile Transfer Protocol (control connection) 23TELNETTerminal Network 25SMTPSimple Mail Transfer Protocol 53DNSDomain Name Server 67BOOTPBootstrap Protocol 79Finger 80HTTPHypertext Transfer Protocol 111RPCRemote Procedure Call

18 Figure 22.11 Stream delivery

19 Figure 22.12 Sending and receiving buffers

20 Figure 22.13 TCP segments

21 TCP Sliding Window segment 1 100 bytes of data numbered from 1 to 100 100 bytes of data numbered from 101 to 200, ack 801 acknowledge 801 segment 2 acknowledge 901 segment 3 acknowledge 201 segment 2 acknowledge 101 segment 1 100 bytes of data numbered from 701 to 800, ack 101 100 bytes of data numbered from 801 to 900, ack 201

22 The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number. Note:

23 The value of the sequence number field in a segment defines the number of the first data byte contained in that segment. Note:

24 Example 1 Imagine a TCP connection is transferring a file of 6000 bytes. The first byte is numbered 10010. What are the sequence numbers for each segment if data are sent in five segments with the first four segments carrying 1000 bytes and the last segment carrying 2000 bytes? Solution The following shows the sequence number for each segment: Segment 1 ==> sequence number: 10,010 (range: 10,010 to 11,009) Segment 2 ==> sequence number: 11,010 (range: 11,010 to 12,009) Segment 3 ==> sequence number: 12,010 (range: 12,010 to 13,009) Segment 4 ==> sequence number: 13,010 (range: 13,010 to 14,009) Segment 5 ==> sequence number: 14,010 (range: 14,010 to 16,009)

25 The value of the acknowledgment field in a segment defines the number of the next byte a party expects to receive. The acknowledgment number is cumulative. Note:

26 Connection Management qTwo way handshake protocol is not enough because of potential delays in either A’s request or B’s responce, as shown below. Possibility of confusion exists. time t1t1 A sends a connection request t2t2 t5t5 t4t4 t3t3 A sends connection request again B receives connection request B establishes a connection and sends an acknowledgement A B A receives the acknowledgement and establishes a connection A and B exchange data and eventually disconnect B receives connection request B establishes a connection and sends an acknowledgement

27 Three-way Handshake Protocol for Connection Establishment time t1t1 A sends a connection request with seq. no. x t2t2 t5t5 t4t4 t3t3 A sends connection request again with seq. no. y B sends acknowledgement y+1 and seq. no. z A B A receives the acknowledgement y+1 and sends acknowledgement z+1 B sends acknowledgement x+1 and seq. no. w A does not send an acknowledgement and no connection is established t6t6 The connection is established

28 Connection Establishment and Termination q3-way handshake used for connection establishment qRandomly chosen sequence number is conveyed to the other end qSimilar FIN, FIN+ACK exchange used for connection termination SYN SYN+ACK ACK DATA Server does passive open Accept connection request Send acceptance Start connection Active open Send connection request The three-way handshake TCP segments are labeled with SYN. The length of data in the first two is 0

29 Figure 22.16 Three-step connection establishment 1)Request. 2)Acknowledgement of the request. 3)Acknowledgement of the acknowledgement.

30 Window Management in TCP Sliding window scheme is used with variable window ○The window can change depending on the traffic in the network (TCP provides congestion control) The size of the window is expressed in bytes instead of packets The window size depends on the receiver’s capabilites and the congestion in the network

31 Figure 12.9 TCP sliding window.

32 In TCP, the sender window size is totally controlled by the receiver window value (the number of empty locations in the receiver buffer). However, the actual window size can be smaller if there is congestion in the network. Note:

33 Figure 12.11 TCP congestion window adjustments: (a) on receipt of duplicate ACKs;

34 Figure 12.11 TCP congestion window adjustments (b) on expiry of a retransmission timer.

35 Figure 23.6 Packet delay and network load

36 Figure 23.7 Throughput versus network load

37 If the cause of the lost segment is congestion, retransmission of the segment does not remove the cause—it aggravates it. Note:

38 TCP assumes that the cause of a lost segment is due to congestion in the network. Note:

39 Figure 23.8 Multiplicative decrease

40 Figure 12.10 TCP congestion control window procedure.

41 23.6 Techniques to Improve QoS Scheduling Traffic Shaping Resource Reservation Admission Control

42 Figure 23.12 Flow characteristics

43 Figure 23.13 FIFO queue

44 Figure 23.14 Priority queuing

45 Figure 23.15 Weighted fair queuing

46 Figure 23.16 Leaky bucket

47 Figure 23.17 Leaky bucket implementation

48 A leaky bucket algorithm shapes bursty traffic into fixed-rate traffic by averaging the data rate. It may drop the packets if the bucket is full. Note:

49 Figure 12.21 Real-time transport protocol (RTP) (a) usage A protocol for real-time traffic; used in conjunction with UDP.

50 Figure 12.21 Real-time transport protocol (RTP) (b) packet format.

51 Figure 12.22 Real-time transport control protocol (RTCP) usage. A companion protocol to RTP with messages that control the flow and quality of data and allow the recipient to send feedback to the source or sources.

52 Figure 23.5 Incoming packet

53 Figure 9.28 QoS support mechanisms: (a) RSVP principles; RSVP = Resource Reservation Protocol. A signalling protocol to help IP create a flow and improve QoS. Reserves resources in each router, for unicasting and multicasting traffic flows with guaranteed QoS.

54 DiffServ architecture. DiffServ = Differentiated services A class-based QoS model. Flows are aggregated into service classes. The IP header Type-of-service field is replaced by a DiffServ field. CR = core router I/ER = ingress/egress router MF = multifield BA = behavior aggregate PHB = per-hop behavior

55 Figure 14.4 Example showing the sequence of messages exchanged for a local name resolution.

56 Service classes CBR = Constant Bit Rate VBR = Variable Bit Rate ABR = Available Bit Rate UBR = Unspecified Bit Rate (best-effort)

57 Figure 23.28 Relationship of service classes to the total capacity


Download ppt "Multimedie- och kommunikationssystem Föreläsning 11 Kapitel 12: Transportprotokoll. Flödesstyrning och trafikstocknings­hantering. Sliding window."

Similar presentations


Ads by Google