Presentation is loading. Please wait.

Presentation is loading. Please wait.

Module A Panko and Panko Business Data Networks and Security, 9 th Edition © 2013 Pearson.

Similar presentations


Presentation on theme: "Module A Panko and Panko Business Data Networks and Security, 9 th Edition © 2013 Pearson."— Presentation transcript:

1 Module A Panko and Panko Business Data Networks and Security, 9 th Edition © 2013 Pearson

2  TCP is reliable. ◦ IP packets carrying TCP segments may arrive out of order. ◦ TCP must put the TCP segments in order. 2 34215 © 2013 Pearson

3  TCP is reliable. ◦ Each correct TCP segment is acknowledged by the receiver. 3 Source Transport Process Source Transport Process Destination Transport Process Destination Transport Process TCP Segment ACK © 2013 Pearson

4  Each TCP segment sent by a side must have a sequence number. ◦ Simplest approach to sequence numbers: 1,2,3,4,5,6,7, and so on ◦ To detect lost or out-of-sequence messages ◦ (TCP uses a more complex approach than this, as we will see) 4 1 1 4 4 2 2 5 5 3? © 2013 Pearson

5  TCP header has a 32-bit sequence number field. 5 Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16) Options (if any)PAD Reserved (6) TCP Checksum (16)Urgent Pointer (16) Data Field © 2013 Pearson

6  Initial Sequence Number is randomly selected by the sender; say, 79.  Sent in the sequence number field of the first TCP segment. 6 79 TCP Data Field TCP Header Sequence Number Field with Initial Sequence Number (79) © 2013 Pearson

7  Data octets in data fields of all segments in a connection are viewed as a long string.  TCP Segment 179  TCP Segment 280 81 82  TCP Segment 383 84 7 3 Octets in Data Field 2 Octets in Data Field ISN © 2013 Pearson

8  Supervisory segments, which contain a header but no data, are treated as carrying a single octet of data.  TCP seg 1898 899  TCP seg 2900  TCP seg 3901 902 … 8 Supervisory Segment Carries Data © 2013 Pearson

9  Sequence number field gets the value of the first octet in the data field.  TCP 179  TCP 280 81 82  TCP 383 84 9 80 is SeqNum Field Value 83 is SeqNum Field Value 79 is SeqNum Field Value © 2013 Pearson

10  Acknowledgement must indicate which TCP segment is being acknowledged. 10 Source TCP Process Source TCP Process Destination TCP Process Destination TCP Process TCP Segment ACK © 2013 Pearson

11  TCP header contains a 32-bit Acknowledgement Number field to designate the TCP segment being acknowledged. 11 Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6)Window Size (16) Options (if any)PAD Reserved (6) TCP Checksum (16)Urgent Pointer (16) Data Field © 2013 Pearson

12  Acknowledgement Number field contains the next byte expected—the last byte of the segment being acknowledged, plus one.  TCP 179  TCP 280 81 82  TCP 383 84 12 83 is AckNum Field Value 85 is AckNum Field Value 80 is AckNum Field Value © 2013 Pearson

13  Quiz: A TCP segment contains the following data octets: ◦ 567, 568, 569, 570, 571, 572, 573, 574  What will be in the sequence number field of the TCP segment delivering the data?  What will be in the acknowledgement number field of the TCP segment acknowledging the TCP segment that delivers these octets? 13 © 2013 Pearson

14  Flow Control ◦ One TCP process transmits too fast. ◦ Other TCP process is overwhelmed. ◦ Receiver must control transmission rate. ◦ This is flow control. 14 TCP Process Too Much Data Flow Control Message © 2013 Pearson

15  A TCP segment has a Window Size field. ◦ Used in acknowledgements 15 Source Port # (16)Destination Port # (16) Sequence Number (32 bits) Acknowledgement Number (32 bits) Hdr Len (4) Flags (6) Window Size (16) Options (if any)PAD Reserved (6) TCP Checksum (16)Urgent Pointer (16) Data Field © 2013 Pearson

16  A TCP segment has a Window Size field. ◦ Tell how many more octets the sender can send beyond the segment being acknowledged 16 TCP Process Data Acknowledgement with Window Size Field © 2013 Pearson

17  Example ◦ TCP segment contained octets 45–89 ◦ Acknowledgement number for TCP segment acknowledging the segment is 90 ◦ If Window Size field value is 50, then ◦ Sender may send through octet 140 ◦ Must then stop unless the window has been extended in another acknowledgement 17 © 2013 Pearson

18  Each Acknowledgement extends the window of octets that may be sent. ◦ Called a sliding window protocol 18 1–4445 – 7980 – 419420 – 630 400 May send through 480 1 – 4445 – 7980 – 419420 – 630 500 May send through 920 © 2013 Pearson

19  TCP Segments have maximum data field sizes. ◦ (Size limit details are discussed later.) ◦ What if an application layer message is too large? 19 TCP HeaderTCP Data Field Max Application Layer Message © 2013 Pearson

20  Application layer message must be fragmented. ◦ Broken into several pieces ◦ Delivered in separate TCP segments 20 TCP HeaderTCP Data Field Max App Frag 1App Frag 2App Frag 3 © 2013 Pearson

21  Note that, in TCP fragmentation, the TCP segment is not fragmented. ◦ The application layer message is fragmented. 21 TCP HeaderTCP Data Field Max App Frag 1App Frag 2App Frag 3 © 2013 Pearson

22  Transport layer process on the source host does the fragmentation. ◦ Application layer on the source host is not involved ◦ Transparent to the application layer 22 Application Transport Internet Application Message TCP Segment © 2013 Pearson

23  Transport layer process on the destination host does the reassembly. ◦ Application layer on the destination host is not involved; gets original application layer message. 23 Application Transport Internet Application Message TCP Segment © 2013 Pearson

24  What is the maximum TCP data field size? ◦ Complex  Maximum Segment Size (MSS) ◦ Maximum size of a TCP segment’s data field ◦ NOT maximum size of the segment as its name would suggest!!! 24 © 2013 Pearson

25  MSS Default is 536 octets. ◦ Maximum IP packet size any network must support is 576 octets.  Larger IP packets MAY be fragmented ◦ IP and TCP headers are 20 octets each if there are no options. ◦ This gives the default MSS of 536. ◦ Smaller if there are options in the IP or TCP header. 25 © 2013 Pearson

26  MSS Default is 536 octets. ◦ Suppose the application layer process is 1,000 octets long. ◦ Two TCP segments will be needed to send the data. ◦ The first can send the first 536 octets. ◦ The second can carry the remaining 464 octets of the application layer message. 26 © 2013 Pearson

27  Each side may announce a larger MSS. ◦ An option usually used in the initial SYN message it sends to the other. ◦ If announces MSS of 2,048, this many octets of data may be sent in each TCP segment. ◦ 536 is only the default—the value to use if no other value is specified by the other side. 27 © 2013 Pearson

28 28 © 2013 Pearson


Download ppt "Module A Panko and Panko Business Data Networks and Security, 9 th Edition © 2013 Pearson."

Similar presentations


Ads by Google