Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) Transmission Control Protocol (TCP) User Datagram Protocol.

Similar presentations


Presentation on theme: "1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) Transmission Control Protocol (TCP) User Datagram Protocol."— Presentation transcript:

1 1 Chapter 3 TCP and IP

2 Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) Transmission Control Protocol (TCP) User Datagram Protocol (UDP) User Datagram Protocol (UDP) Internet Protocol (IPv4) Internet Protocol (IPv4) IPv6 IPv6

3 Chapter 3 TCP and IP 3 TCP Defined in RFC 793, RFC 1122 Defined in RFC 793, RFC 1122RFC 793RFC 1122RFC 793RFC 1122 Provides the Internet’s primary reliable host-to-host delivery mechanism Provides the Internet’s primary reliable host-to-host delivery mechanism Services offered: Services offered: –basic data transfer –reliability (reliable data transfer) –flow control –multiplexing/de-multiplexing –connections (maintains state) –precedence and security

4 Chapter 3 TCP and IP 4 TCP Header

5 Chapter 3 TCP and IP 5 TCP Fields/Functions Source Port # (16 bits): source application (multiplexing) Source Port # (16 bits): source application (multiplexing) Destination Port # (16 bits): target application (de-multiplexing) Destination Port # (16 bits): target application (de-multiplexing) Sequence # (32 bits): number of the first data octet (reliable data transfer) Sequence # (32 bits): number of the first data octet (reliable data transfer) Acknowledgement # (32 bits): next data octet expected by receiver (reliable data transfer) Acknowledgement # (32 bits): next data octet expected by receiver (reliable data transfer) Data offset/header length (4 bits): number of 32bit words in the header (basic data transfer) Data offset/header length (4 bits): number of 32bit words in the header (basic data transfer)

6 Chapter 3 TCP and IP 6 TCP Fields/Functions Flags (6 or 8 bits): source application (precedence, connection management) Flags (6 or 8 bits): source application (precedence, connection management) Window size (16 bits): number data octets receiver is willing to accept (flow control) Window size (16 bits): number data octets receiver is willing to accept (flow control) Checksum (16 bits): error detection code (reliable data transfer) Checksum (16 bits): error detection code (reliable data transfer) Urgent pointer (16 bits): pointer to last data octet in sequence of urgent data (precedence) Urgent pointer (16 bits): pointer to last data octet in sequence of urgent data (precedence) Header length (variable): number of 32bit words in the header – indicates presence or absence of options (various) Header length (variable): number of 32bit words in the header – indicates presence or absence of options (various) more ->

7 Chapter 3 TCP and IP 7 TCP Fields/Functions (Flags) URG: urgent pointer field is significant URG: urgent pointer field is significant ACK: acknowledgement field is significant ACK: acknowledgement field is significant PSH: push function specified by app PSH: push function specified by app RST: reset the connection RST: reset the connection SYN: synchronize the sequence number SYN: synchronize the sequence number FIN: no more data from sender FIN: no more data from sender CWR: congestion warning acknowledgement CWR: congestion warning acknowledgement ECE: Explicit congestion notification ECE: Explicit congestion notification more -> RFC 3168 RFC 3168

8 Chapter 3 TCP and IP 8 TCP Data Flow Outgoing data is logically a stream of octets from an end user (SEND) Outgoing data is logically a stream of octets from an end user (SEND) Stream is broken into blocks of data, called segments Stream is broken into blocks of data, called segments TCP accumulates octets from user until segment is large enough, or data is marked with PUSH flag TCP accumulates octets from user until segment is large enough, or data is marked with PUSH flag User (i.e. the application) can mark data as URGENT User (i.e. the application) can mark data as URGENT

9 Chapter 3 TCP and IP 9 Similarly, incoming data is a stream of octets presented to user (application) Similarly, incoming data is a stream of octets presented to user (application) Data marked with PUSH flag triggers delivery of data to user, otherwise TCP decides when to deliver data (RECEIVE) Data marked with PUSH flag triggers delivery of data to user, otherwise TCP decides when to deliver data (RECEIVE) Data marked with URGENT flag causes user to be signaled Data marked with URGENT flag causes user to be signaled TCP Data Flow (cont.)

10 Chapter 3 TCP and IP 10 Options Maximum segment size (RFC793) Maximum segment size (RFC793) –specifies the maximum segment size in octets to be used in the connection (16 bits) –used during connection establishment Window scale factor Window scale factor –receiver window scale factor F (max. 14) –scales receiver window size by 2 F –used during connection establishment Timestamp Timestamp –used by TCP to monitor RTT –Timestamp… Timestamp Echo Reply

11 Chapter 3 TCP and IP 11 UDP RFC 768 RFC 768 RFC 768 RFC 768 Connectionless, unreliable Connectionless, unreliable Less overhead Less overhead Simply adds port addressing to IP Simply adds port addressing to IP Checksum is optional Checksum is optional

12 Chapter 3 TCP and IP 12 Appropriate Uses of UDP Inward data collection Inward data collection Outward data dissemination Outward data dissemination Request-response Request-response Real-time applications Real-time applications Examples? Examples? DNS DNS SNMP SNMP Streaming audio/video Streaming audio/video VoIP VoIP RIP RIP Timeliness/ timing of data criticalTimeliness/ timing of data critical Occasional loss or significant delay is acceptableOccasional loss or significant delay is acceptable

13 Chapter 3 TCP and IP 13 IP Defined in RFC 791 Defined in RFC 791RFC 791RFC 791

14 Chapter 3 TCP and IP 14 IPv4 Address Classes

15 Chapter 3 TCP and IP 15 Fragmentation and Reassembly Networks may have different maximum packet size (MTU) Networks may have different maximum packet size (MTU) Router may need to fragment datagrams before sending to next network Router may need to fragment datagrams before sending to next network Fragments may need further fragmenting in later networks Fragments may need further fragmenting in later networks Reassembly done only at final destination since fragments may take different routes Reassembly done only at final destination since fragments may take different routes

16 Chapter 3 TCP and IP 16 IPv4 Type of Service Field Defined in RFC 1349, updated in RFC 2474RFC 1349RFC 2474

17 Chapter 3 TCP and IP 17 IPv6 Increase IP address from 32 bits to 128 bits Increase IP address from 32 bits to 128 bits Accommodate higher network speeds, mix of data streams (graphics, video, audio) Accommodate higher network speeds, mix of data streams (graphics, video, audio) Fixed size 40-octet header for performance, followed by optional extension headers Fixed size 40-octet header for performance, followed by optional extension headers Longer header but fewer fields (8 vs 12), so routers should have less processing Longer header but fewer fields (8 vs 12), so routers should have less processing

18 Chapter 3 TCP and IP 18 IPv6 Header

19 Chapter 3 TCP and IP 19 IPv6 Header Version: 6 Version: 6 Traffic class: e.g. DSCP (more later) Traffic class: e.g. DSCP (more later) Flow label: identifies packets in a sequence from a particular source to destination that need special handling (more later) Flow label: identifies packets in a sequence from a particular source to destination that need special handling (more later) Payload length: total length of packet in octets, minus 40 octets (max 65535) Payload length: total length of packet in octets, minus 40 octets (max 65535) Next header: specifies how to interpret next field following the header Next header: specifies how to interpret next field following the header Hop limit: max number of hops for this packet, decremented field, discard at 0 Hop limit: max number of hops for this packet, decremented field, discard at 0 Source address: packet originator Source address: packet originator Destination address: intended recipient Destination address: intended recipient

20 Chapter 3 TCP and IP 20 IPv6 Addresses 128 bits 128 bits Longer addresses can have structure that assists routing Longer addresses can have structure that assists routing 3 types: 3 types: –Unicast: single address for a single interface –Anycast: aggregate address for any one of a related set of interfaces –Multicast: single address for all of a group of interfaces

21 Chapter 3 TCP and IP 21 IPv6 Packet & Extension Headers

22 Chapter 3 TCP and IP 22 Optional Extension Headers Hop-by-hop options: instructions for each router (RFCs 2675 and 2711) Hop-by-hop options: instructions for each router (RFCs 2675 and 2711) Routing: explicit list of intermediate nodes Routing: explicit list of intermediate nodes Fragment: only at source nodes Fragment: only at source nodes Authentication: (IPsec) packet integrity and authentication Authentication: (IPsec) packet integrity and authentication Encapsulating security payload: (IPsec) payload privacy Encapsulating security payload: (IPsec) payload privacy Destination options: examined only by destination node Destination options: examined only by destination node

23 Chapter 3 TCP and IP 23 IPv6 Extension Headers


Download ppt "1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) Transmission Control Protocol (TCP) User Datagram Protocol."

Similar presentations


Ads by Google