10. UDP/TCP WWW page: Text book: Mastering Networks (Chapter 10) Network IP protocol is routes the data.

Slides:



Advertisements
Similar presentations
TCP/IP Christopher Zacky. lolwut Decimal Numbers.
Advertisements

Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
CISCO NETWORKING ACADEMY Chabot College ELEC Transport Layer (4)
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
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.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
Configuring a Router with RIP Basic Configuration and Show Commands.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
Networks I Transmission Control Protocol Instituto Tecnológico y de Estudios Superiores de Monterrey Campus Estado de México Prof. MSc. Ivan A. Escobar.
Instructor: Sam Nanavaty TCP/IP protocol. Instructor: Sam Nanavaty Version – Allows for the evolution of the protocol IHL (Internet header length) – Length.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
Chapter 7 – Transport Layer Protocols
TELE202 Lecture 14 TCP/UDP (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »TCP/UDP (1) »Source: chapter 17 ¥This Lecture »TCP/UDP (2) »Source: chapter.
TRANSPORT LAYER  Session multiplexing  Segmentation  Flow control (TCP)  Connection-oriented (TCP)  Reliability (TCP)
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
Kazi Spring 2008 CSCI 6901 CSCI-690 Computer Networks Khurram Kazi.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Transport Layer TCP and UDP IS250 Spring 2010
Chapter 4 OSI Transport Layer
Gursharan Singh Tatla Transport Layer 16-May
Process-to-Process Delivery:
1 Transport Layer Computer Networks. 2 Where are we?
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
ES Module 4 Transport Layer Protocols. Last Lecture(s) Routing and IP Addressing Domain Name System.
6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts.
Chapter 5 Transport layer With special emphasis on Transmission Control Protocol (TCP)
1 LAN Protocols (Week 3, Wednesday 9/10/2003) © Abdou Illia, Fall 2003.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
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.
CSCI 465 D ata Communications and Networks Lecture 27 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
Hour 6 The Transport Layer 1. What You'll Learn in This Hour Connections oriented and connectionless protocols Ports and sockets TCP UDP 2.
Transport Protocols.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
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).
Cisco I Introduction to Networks Semester 1 Chapter 7 JEOPADY.
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
Ch 3. Transport Layer Myungchul Kim
1 Transmission Control Protocol (TCP) RFC: Introduction The TCP is intended to provide a reliable process-to-process communication service in a.
Ch 3. Transport Layer Myungchul Kim
Two Transport Protocols Available Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Provides unreliable transfer Requires minimal – Overhead.
The Transport Layer Implementation Services Functions Protocols
Process-to-Process Delivery, TCP and UDP protocols
TCP.
Process-to-Process Delivery
TCP.
PART 5 Transport Layer Computer Networks.
TCP - Part I Karim El Defrawy
Process-to-Process Delivery:
PART V Transport Layer.
PART 5 Transport Layer.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Process-to-Process Delivery: UDP, TCP
Transport Layer 9/22/2019.
Presentation transcript:

10. UDP/TCP WWW page: Text book: Mastering Networks (Chapter 10) Network IP protocol is routes the data packet through the network Application 1 Application 1 Application 2 Application 2 Application 3 Application 3 Application 1 Application 1 Application 2 Application 2 Application 3 Application 3 Socket IP TCP Higher-level protocol

10.1 TCP (Transmission Control Protocol) Data Transfer. Data is transmitted between two applications by packaging the data within TCP packets. This data is buffered and forwarded whenever necessary. A push function can be used when the data is required to be sent immediately. Reliability. TCP uses sequence numbers and positive acknowledgements (ACK) to keep track of transmitted packets. Thus, it can recover from data that is damaged, lost, duplicated, or delivered out of order, such as: Time-outs. The transmitter waits for a given time (the timeout interval), and if it does not receive an ACK, the data is retransmitted. Sequence numbers. The sequence numbers are used at the receiver to correctly order the packets and to delete duplicates. Error detection and recovery. Each packet has a checksum, which is checked by the receiver. If it is incorrect the receiver discards it, and can use the acknowledgements to indicate the retransmission of the packets. Data Transfer. Data is transmitted between two applications by packaging the data within TCP packets. This data is buffered and forwarded whenever necessary. A push function can be used when the data is required to be sent immediately. Reliability. TCP uses sequence numbers and positive acknowledgements (ACK) to keep track of transmitted packets. Thus, it can recover from data that is damaged, lost, duplicated, or delivered out of order, such as: Time-outs. The transmitter waits for a given time (the timeout interval), and if it does not receive an ACK, the data is retransmitted. Sequence numbers. The sequence numbers are used at the receiver to correctly order the packets and to delete duplicates. Error detection and recovery. Each packet has a checksum, which is checked by the receiver. If it is incorrect the receiver discards it, and can use the acknowledgements to indicate the retransmission of the packets. Flow Control. TCP returns a window with every ACK. This window indicates a range of acceptable sequence numbers beyond the last segment successfully received. This window also indicates the number of bytes that the sender can transmit before receiving further acknowledgements. Multiplexing. To support multiple connections to a single host, TCP provides a set of ports within each host. This, along with the IP addresses of the source and destination, makes a socket. Each connection is uniquely identified by a pair of sockets. Ports are normally associated with various services and allow service programs to listen for defined port numbers. Connections. A connection is defined by the sockets, sequence numbers and window sizes. Each host must maintain this information for the length of the connection. When the connection is closed, all associated resources are freed. As TCP connections can be made with unreliable hosts and over unreliable communication channels, TCP uses a handshake mechanism with clock-based sequence numbers to avoid inaccurate connection initialisation. Precedence and Security. TCP allows for different security and precedence levels. Flow Control. TCP returns a window with every ACK. This window indicates a range of acceptable sequence numbers beyond the last segment successfully received. This window also indicates the number of bytes that the sender can transmit before receiving further acknowledgements. Multiplexing. To support multiple connections to a single host, TCP provides a set of ports within each host. This, along with the IP addresses of the source and destination, makes a socket. Each connection is uniquely identified by a pair of sockets. Ports are normally associated with various services and allow service programs to listen for defined port numbers. Connections. A connection is defined by the sockets, sequence numbers and window sizes. Each host must maintain this information for the length of the connection. When the connection is closed, all associated resources are freed. As TCP connections can be made with unreliable hosts and over unreliable communication channels, TCP uses a handshake mechanism with clock-based sequence numbers to avoid inaccurate connection initialisation. Precedence and Security. TCP allows for different security and precedence levels. Transport Network TCP IP TCP Higher-level protocol

10.2 TCP operation Operation When a host wishes to make a connection, TCP sends out a request message to the destination machine that contains unique numbers called a socket number, and a port number. The port number has a value which is associated with the application (for example a TELNET connection has the port number 23 and an FTP connection has the port number 21). The message is then passed to the IP layer, which assembles a datagram for transmission to the destination. When the destination host receives the connection request, it returns a message containing its own unique socket number and a port number. The socket number and port number thus identify the virtual connection between the two hosts. After the connection has been made the data can flow between the two hosts (called a data stream). Operation When a host wishes to make a connection, TCP sends out a request message to the destination machine that contains unique numbers called a socket number, and a port number. The port number has a value which is associated with the application (for example a TELNET connection has the port number 23 and an FTP connection has the port number 21). The message is then passed to the IP layer, which assembles a datagram for transmission to the destination. When the destination host receives the connection request, it returns a message containing its own unique socket number and a port number. The socket number and port number thus identify the virtual connection between the two hosts. After the connection has been made the data can flow between the two hosts (called a data stream). Sending Port Number (such as 21 for FTP) Unique Sending Socket Number Unique Receiving Socket Number Receiving Port Number (typically the same as sender’s) Data transfer using ports and sockets (data stream)

10.3 TCP and IP Network IP protocol routes the data packets through the network Application 1 Application 1 Application 2 Application 2 Application 3 Application 3 Application 1 Application 1 Application 2 Application 2 Application 3 Application 3 TCP protocol is responsible for a data stream between application programs Socket IP TCP Higher-level protocol

10.4 TCP header contents Main fields Source and destination port number – which are 16- bit values that identify the local port number (source number and destination port number or destination port). Sequence number – which identifies the current sequence number of the data segment. This allows the receiver to keep track of the data segments received. Any segments that are missing can be easily identified. The sequence number of the first data byte in this segment (except when SYN is present). If SYN is present the sequence number is the initial sequence number (ISN) and the first data octet is ISN+1. Acknowledgement number – when the ACK bit is set, it contains the value of the next sequence number the sender of the packet is expecting to receive. This is always set after the connection is made. Data offset – which is a 32-bit value that identifies the start of the data. It is defined as the number of 32-bit words in the header (as the TCP header always has a multiple number of 32-bit words). Flags – the flag field is defined as UAPRSF, where U is the urgent flag (URG), A the acknowledgement flag (ACK), P the push function (PSH), R the reset flag (RST), S the sequence synchronise flag (SYN) and F the end-of- transmission flag (FIN). Main fields Source and destination port number – which are 16- bit values that identify the local port number (source number and destination port number or destination port). Sequence number – which identifies the current sequence number of the data segment. This allows the receiver to keep track of the data segments received. Any segments that are missing can be easily identified. The sequence number of the first data byte in this segment (except when SYN is present). If SYN is present the sequence number is the initial sequence number (ISN) and the first data octet is ISN+1. Acknowledgement number – when the ACK bit is set, it contains the value of the next sequence number the sender of the packet is expecting to receive. This is always set after the connection is made. Data offset – which is a 32-bit value that identifies the start of the data. It is defined as the number of 32-bit words in the header (as the TCP header always has a multiple number of 32-bit words). Flags – the flag field is defined as UAPRSF, where U is the urgent flag (URG), A the acknowledgement flag (ACK), P the push function (PSH), R the reset flag (RST), S the sequence synchronise flag (SYN) and F the end-of- transmission flag (FIN). Window – which is a 16-bit value and gives the number of data bytes that the receiving host can accept at a time, beginning with the one indicated in the acknowledgement field of this segment. Checksum – which is a 16-bit checksum for the data and header. It is the 1’s complement of the 1’s complement sum of all the 16-bit words in the TCP header and text. The checksum is assumed to be a zero when calculating the checksum. Window – which is a 16-bit value and gives the number of data bytes that the receiving host can accept at a time, beginning with the one indicated in the acknowledgement field of this segment. Checksum – which is a 16-bit checksum for the data and header. It is the 1’s complement of the 1’s complement sum of all the 16-bit words in the TCP header and text. The checksum is assumed to be a zero when calculating the checksum. IP TCP Higher-level protocol

10.5 UDP Source port. This is an optional field and is set to a zero if not used. It identifies the local port number which should be used when the destination host requires to contact the originator. Destination. Port to connect to on the destination. Length. Number of bytes in the datagram, including the UDP header and the data. Checksum. The 16-bit 1’s complement of the 1’s complement sum of the IP header, the UDP header, the data (which, if necessary, is padded with zero bytes at the end, to make an even number of bytes). Source port. This is an optional field and is set to a zero if not used. It identifies the local port number which should be used when the destination host requires to contact the originator. Destination. Port to connect to on the destination. Length. Number of bytes in the datagram, including the UDP header and the data. Checksum. The 16-bit 1’s complement of the 1’s complement sum of the IP header, the UDP header, the data (which, if necessary, is padded with zero bytes at the end, to make an even number of bytes). UDP sends data packets that are not acknowledged. It is thus unreliable, as the sender cannot tell if the data has been received and the receiver does not know if there has been a loss of packets. There is also no connection, so the sender does even know if the receive is even receiving data TCP sends back acknowledgements to accept data that has been sent. The receiver can also tell if there are any lost packets, or if the remote computer has crashed, and has been restarted. Connection and ACK’s Data stream IP UDP Higher-level protocol

10.6Server applications listening for TCP ports Input TCP packets with port number TELNET server listens for port 23 FTP server listens for port 21 HTTP server listens for port 80 SMTP server listens for port 161 Server

Port Service Comment Port ServiceComment 1TCPmux7echo 9discardNull11systatUsers 13daytime15netstat 17qotdQuote18mspMessage send protocol 19chargenttytst source21ftp 23telnet25smtpMail 37timeTimserver39rlpResource location 42nameserverIEN 11643whoisNicname 53domainDNS57mtpDeprecated 67bootpsBOOTP server67bootps 68bootpcBOOTP client69tftp 70gopherInternet Gopher77rjeNetrjs 79finger80wwwWWW HTTP 87linkTtylink88kerberosKerberos v5 95supdup101hostnames 102iso-tsapISODE105csnet-nsCSO name server 107rtelnetRemote Telnet109pop2POP version 2 110pop3POP version 3111sunrpc 113authRap ID115sftp 117uucp-path119nntpUSENET 123ntpNetwork Timel137netbios-nsNETBIOS Name Service 138netbios-dgmNETBIOS139netbios-ssnNETBIOS session 143imap2161snmpSNMP 162snmp-trapSNMP trap163cmip-manISO management over IP 164cmip-agent177xdmcpX Display Manager 178nextstepNeXTStep 179bgpBGP 191prospero194ircInternet Relay Chat 199smuxSNMP Multiplexer201at-rtmpAppleTalk routing Port Service Comment Port ServiceComment 1TCPmux7echo 9discardNull11systatUsers 13daytime15netstat 17qotdQuote18mspMessage send protocol 19chargenttytst source21ftp 23telnet25smtpMail 37timeTimserver39rlpResource location 42nameserverIEN 11643whoisNicname 53domainDNS57mtpDeprecated 67bootpsBOOTP server67bootps 68bootpcBOOTP client69tftp 70gopherInternet Gopher77rjeNetrjs 79finger80wwwWWW HTTP 87linkTtylink88kerberosKerberos v5 95supdup101hostnames 102iso-tsapISODE105csnet-nsCSO name server 107rtelnetRemote Telnet109pop2POP version 2 110pop3POP version 3111sunrpc 113authRap ID115sftp 117uucp-path119nntpUSENET 123ntpNetwork Timel137netbios-nsNETBIOS Name Service 138netbios-dgmNETBIOS139netbios-ssnNETBIOS session 143imap2161snmpSNMP 162snmp-trapSNMP trap163cmip-manISO management over IP 164cmip-agent177xdmcpX Display Manager 178nextstepNeXTStep 179bgpBGP 191prospero194ircInternet Relay Chat 199smuxSNMP Multiplexer201at-rtmpAppleTalk routing 10.7Standard TCP ports