CP476 Internet Computing TCP/IP 1 Lecture 3. TCP / IP Objective: A in-step look at TCP/IP Purposes and operations Header specifications Implementations.

Slides:



Advertisements
Similar presentations
CE363 Data Communications & Networking Chapter 7 Network Layer: Internet Protocol.
Advertisements

TCP/IP Christopher Zacky. lolwut Decimal Numbers.
CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
CCNA – Network Fundamentals
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
Introduction1-1 message segment datagram frame source application transport network link physical HtHt HnHn HlHl M HtHt HnHn M HtHt M M destination application.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Instructor: Sam Nanavaty TCP/IP protocol. Instructor: Sam Nanavaty Version – Allows for the evolution of the protocol IHL (Internet header length) – Length.
Transmission Control Protocol (TCP) Basics
1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) Transmission Control Protocol (TCP) User Datagram Protocol.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7 – Transport Layer Protocols
Chapter 20 Network Layer: Internet Protocol Stephen Kim 20.1.
CS335 Networking & Network Administration Tuesday, May 11, 2010.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
Transmission Control Protocol Internet Protocol TCP/IP.
Process-to-Process Delivery:
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
Module 10. Internet Protocol (IP) is the routed protocol of the Internet. IP addressing enables packets to be routed from source to destination using.
1 Chapter Overview TCP/IP DoD model. 2 Network Layer Protocols Responsible for end-to-end communications on an internetwork Contrast with data-link layer.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
TCP/IP Basic Theory V1.2. Course Outline OSI model and layer function TCP/IP protocol suite Transfer Control Protocol Internet Protocol Address Resolution.
1 LAN Protocols (Week 3, Wednesday 9/10/2003) © Abdou Illia, Fall 2003.
10/13/20151 TCP/IP Transmission Control Protocol Internet Protocol.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
University of the Western Cape Chapter 12: The Transport Layer.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transmission Control Protocol
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Chapter 81 Internet Protocol (IP) Our greatest glory is not in never failing, but in rising up every time we fail. - Ralph Waldo Emerson.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
1 Kyung Hee University Chapter 8 Internet Protocol (IP)
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
Chapter 8 Internet Protocol (IP)
1 Computer Communication & Networks Lecture 19 Network Layer: IP and Address Mapping Waleed Ejaz.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University.
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Transmission Control Protocol (TCP) RFC: Introduction The TCP is intended to provide a reliable process-to-process communication service in a.
Process-to-Process Delivery:
Two Transport Protocols Available Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Provides unreliable transfer Requires minimal – Overhead.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Introduction to TCP/IP networking
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Process-to-Process Delivery, TCP and UDP protocols
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Net 323 D: Networks Protocols
PART 5 Transport Layer.
Process-to-Process Delivery: UDP, TCP
NET 323D: Networks Protocols
Transport Layer 9/22/2019.
Presentation transcript:

CP476 Internet Computing TCP/IP 1 Lecture 3. TCP / IP Objective: A in-step look at TCP/IP Purposes and operations Header specifications Implementations Internet protocol (IP) IP is an unreliable connectionless protocol for host-to-host datagram transmission. It includes rules for fragmentation and assembly of long datagram. It was first defined in RFC:791 (IPv4) Hosts are identified by fixed length IP addresses. 32 bits in IPv4. IP is called by local host protocol, it calls the local network protocol to carry the datagram to the next gateway or destination host. Gateways implement IP to forward datagram Operations –Addressing: insert the destination address in header –Routing: select path for transmission –Fragmenting: divide a datagram into some smaller units to accommodate the MTU of a data link –Services: type of service, time to live, options, header checksum

CP476 Internet Computing TCP/IP 2 An IP datagram consists of IP header and data. The maximum length of a datagram is 65,535 bytes. MTU is the maximum number of bytes that a data link protocol can encapsulate. MTU vary from data link to data link. IP headerData IP datagram The header format of IP datagram Total length 16 bits Identification 16 bits Header checksum 16 bits Source IP address Destination IP address Option Protocol 8 bits Time to live 8 bits Flag 3bits Fragmentation 13 bits Ver 4 bits HLEN 4 bits TS 8 bits

CP476 Internet Computing TCP/IP 3 The definition of each field –Version number (VER) – Head length (HLEN) – Types of Services (TS) 0-2: precedence; 3: delay; 4: throughout; 5: reliability, 6-7: future use – Identification: a datagram number assigned by IP process – Flag: first bit is reserved, second bit = 1: can not be fragmented third bit = 1, not the last fragment – Fragmentation offset: the offset of original datagram in 8 bytes (start from 0) – Time to live: time left in transmission – Protocol: higher layer protocols (ICMP), (IGMP), (TCP), (UDP), …

CP476 Internet Computing TCP/IP 4 –Checksum (16 bits) Calculated by sender, inserted in the header. Recalculated by receiver. If not correct, discard Sender: divide the datagram into k groups, each has 16 bits (take the checksum field as 0), then calculate the sum, the checksum is the one’s complements, the add th checksum to the checksum field Receiver: calculate the checksum. If the result is 0, accept, otherwise discard –Options Security option provides a way for hosts to hand restrictions by IP software Unclassified – Confidential PROG Restricted Secret Top Secret

CP476 Internet Computing TCP/IP 5 IP implementation –Header-adding module Receives data from an upper-layer protocol, along with IP the destination IP address. It encapsulates the data in an IP datagram by adding the IP header. –Processing module Receives datagram from the header-adding module. Check if it is a loopback packet, or it arrives its destination, if yes, then sends it to assembly module. If the node is a router, it decrements the time TTL by one, if TTL is less than one, discard the packets, ICMP message. If the TTL is bigger than one, then passes it to the routing module. –Routing module Receives an IP packet from processing module, find the IP address of the next station from the routing table, and pass to fragmentation module.

CP476 Internet Computing TCP/IP 6 –Fragmentation module Receives IP datagram from the routing module, consults the MTU table to find MTU for the specific interface. If the datagram is larger than the MTU, then fragments the datagram, adds a header to each fragment and sends them to ARP package for address resolution and delivery. –Reassembly module Receives datagram from processing module, that arrives in the final destination, reassemblies the fragments back to original datagram by reassembly table (a linked list) and finally pass the whole datagram to the upper level protocol.

CP476 Internet Computing TCP/IP 7 Transmission Control Protocol TCP is a connection-oriented, reliable protocol, transport layer protocol. It responsible for process-to-process communication. It is between a user application protocol and IP. TCP was first defined in RFC:793 What it does? It transfers packets between two processes in the two hosts. A data unit transferred between two processes is called a segment. It has bytes header, followed by a data segment from the application program. How is a process identified? A process is identified by a port number, which is set up when the process starts, and the IP address of its host. –A client process port number could be any number from 0 to –A sever side process port number is usually well-known. –The pair of IP address and the port number in either client or server is called a socket address.

CP476 Internet Computing TCP/IP 8 What operations it provides? – Connections – Reliability – Flow control: using slide window technique – Multiplexing – Precedence and security Source port 16 bitsDestination port 16 bits Sequence of number 32 bits Acknowledge number 32 bits Window size 16 bits Urgent pointer 16 bitsChecksum 16 bits Options and Padding HLEN 4 bits Reserved 4bits aclacl SynSyn pshpsh rstrst FinFin urgurg Data Segment syntax: header + data

CP476 Internet Computing TCP/IP 9 Semantics of the header –Source port: chosen by client TCP process Destination port: well-known or chosen by the server TCP process –Sequence of number: a random number generated to as the initial sequence number for the first byte of the data. Segment –Acknowledge number: if the receiver of the segment has successfully received byte number x from the other party, it defines x+1 as the acknowledge number. –Header length (HELN): The number of 4-byte words in the TCP header, can be between –Control field URG (urgent pointer is valid), ACK (=1, acknowledgement is valid) PSH: request for push RET: reset the connection SYN: synchronize the sequence number FIN: terminate the connection –Window size: the size of window in byte –Checksum: the similar to IP checksum. –Urgent pointer: work with urgent flag in control field. –Options: many

CP476 Internet Computing TCP/IP 10 The communication between two processes is realized by setting up a logical connection between them Connection establishment: three-way-handshaking 1. Host A (client) sends a (SYN) segment to announce its whish for connection and includes its initialization info. (source and destination port number, ISN, window size) about the traffic from A to B. 2. Host B (server) sends a (SYN and ACK) segment to acknowledge the request of A. And Host B sends a segment that includes its initialization info. (port number, window size) about the traffic from B to A. 3. Host A sends a segment to acknowledge the request of B ( initial sequence number, server window size). Connection termination: Four-way-handshaking 1. Host A (client) sends a FIN segment to B. 2. Host B (server) sends an ACK segment to acknowledge the request of A 3 Host B sends a FIN segment to A 4. Host A sends an ACK segment to confirm the receipt of the FIN.

CP476 Internet Computing TCP/IP 11 Reliability is achieved by sequence numbers, acknowledgments, and timer. –Acknowledgments –TCP timer Retransmission timer: when TCP sends a segment, it creates a retransmission timer for that particular segment. Two situation may occur: If an acknowledgement is received for this particular segment before the time goes off, the timer is destroyed. If the timer goes off before the acknowledgement arrives, the segment is retransmitted, and the timer is reset. The calculate of retransmission time: RT = 2 * RTT (the round-trip time). RT = alpha * previous RRT + (1-alpha)*current RRT Flow control: using slide window technique send k (window size) continuous segments, wait for ACK move the window to the Multiplexing security

CP476 Internet Computing TCP/IP 12 Main module Input processing module output processing module Time r Application layer message to and from applications TCP software IP layer TCB TCP implementation –The TCP/user interface provides for calls made by the user on the TCP to OPEN or CLOSE a connection, to SEND or RECEIVE data, or to obtain STATUS about a connection. These calls are like other calls from user programs on the operating system, for example, the calls to open, read from, and close a file. –The TCP/internet interface provides calls to send and receive datagram addressed to TCP modules in hosts anywhere in the internet system. These calls have parameters for passing the address, type of service, precedence, security, and other control information.

CP476 Internet Computing TCP/IP 13 –TCB (Transmission Control Blocks) is used for each connection. An array of TCBs is kept for a group of connections. –TCP Modules: Input processing module receives segment from the processing module, pass it to the main module Main module, invoked by an arriving TCP segment, it does different things according state of TCB and the information in the segment header. It can be modeled as an FSM, actions are taken by cases of states Output processing module