90 likes | 213 Views
TCP/IP protocol. Type Of service (8). P| P| P|D| T| R| 0| 0. Version – Allows for the evolution of the protocol IHL (Internet header length) – Length of header in 32 bit words. Minimum value is 5 (i.e., 20 bytes)
E N D
TCP/IP protocol Instructor: Sam Nanavaty
Type Of service (8) P| P| P|D| T| R| 0| 0 Version – Allows for the evolution of the protocol IHL (Internet header length) – Length of header in 32 bit words. Minimum value is 5 (i.e., 20 bytes) Type of Service (TOS) – Specifies reliability, throughput, delay and precedence Total length – total datagram length in bytes Identification: Seq. # taken together with source/dest addr and user protocol makes this datagram unique for the time it remains on the internet. Flags: 2 bits defined (more bit and don’t fragment bit) Fragment offset: Where in the datagram does this fragment belong (in 64 bit units) TTL: How long in seconds is this datagram allowed to live on the internet Instructor: Sam Nanavaty
Protocol: Identifies the next higher level protocol that must receive this datagram Header checksum: error checking (note that header values may change enroute and thereby routers would re-compute the checksum. Source IP address and Destination IP address: 4 byte address each. Options: Options specified by the sender Padding: ensure that datagram header is a multiple of 32 bit in length (4 bytes multiple) Data: Maximum length is 65535 that includes the header. Instructor: Sam Nanavaty
Well Known Ports <=1023 custom Defined Ports TELNET TFTP HTTP SNMP NNS FTP 21 23 80 69 137 161 TRANSMISSION CONTROL PROTOCOL Connection oriented USER DATAGRAM PROTOCOL Connectionless INTERNET PROTOCOL Instructor: Sam Nanavaty
SOURCE PORT (16) DESTINATION PORT(16) SEQUENCE NUMBER (32) ACKNOWLEDGEMENT NUMBER (32) Data Offset (4) Res (6) FLAGS (6) WINDOW (16) CHECKSUM (16) URGENT POINTER (16) OPTIONS + PADDING (VARIABLE) Sequence # - Seq # of first data octet in the segment Ack # - (used in piggybacked ack) Seq # of next data octet that TCP expects to receive Data Offset - number of 32 bit words in the TCP Header Instructor: Sam Nanavaty
SOURCE PORT (16) DESTINATION PORT(16) SEQUENCE NUMBER (32) ACKNOWLEDGEMENT NUMBER (32) Data Offset (4) Res (6) FLAGS (6) WINDOW (16) CHECKSUM (16) URGENT POINTER (16) OPTIONS + PADDING (VARIABLE) FLAGS (this is a 6 bit field): URG: When urgent data is present, this bit is set to notify receiving appln. ACK: Acknowledgment number valid flag PSH: Application may force TCP to send out existing data w/o further wait RST: abort connections SYN: Used to initiate a new connection FIN: Terminate connection Instructor: Sam Nanavaty
SOURCE PORT (16) DESTINATION PORT(16) SEQUENCE NUMBER (32) ACKNOWLEDGEMENT NUMBER (32) Data Offset (4) Res (6) FLAGS (6) WINDOW (16) CHECKSUM (16) URGENT POINTER (16) OPTIONS + PADDING (VARIABLE) Window: number of data bytes beginning with the one indicated in the acknowledgment # field which the sender of this segment is willing to accept Checksum: for Error checking Urgent Pointer: Points to last octet in the sequence of urgent data Options: Example, max segment size that will be acceptable Instructor: Sam Nanavaty
A B Initial Seq # IA SYN SYN/ACK Initial Seq # IB, ACK set Ack # = IA + 1 Seq # = IA+1, ACK set ACK Ack# = IB+1 TCP connection using 3 way handshake Instructor: Sam Nanavaty
UDP Header Source Port (16) Destination Port (16) Length (16) Check sum (16) Total length of UDP header is 8 octets UDP has no flow control mechanism UDP provides no error correction Instructor: Sam Nanavaty