UDP & TCP Where would we be without them!. UDP User Datagram Protocol.

Slides:



Advertisements
Similar presentations
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Advertisements

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
TCP 與 UDP 協定分析 第 22 組 b 陳贊羽 b 馬家驤 b 林怡賢 b 王奕棠.
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.
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.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
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
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.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
CSCE 515: Computer Network Programming TCP Details Wenyuan Xu Department of Computer Science and Engineering.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
1 CCNA 2 v3.1 Module Intermediate TCP/IP CCNA 2 Module 10.
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
Module A Panko and Panko Business Data Networks and Security, 9 th Edition © 2013 Pearson.
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
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.
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.
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
Transmission Control Protocol
More on TCP Acknowledgements Sequence Number Field Initial Sequence Number Acknowledgement Number Field.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
© 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.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
01_NF_Ch04 – OSI Transport Layer ( 傳輸層 ) Source: CCNA Exploration.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
Cisco I Introduction to Networks Semester 1 Chapter 7 JEOPADY.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 Transmission Control Protocol (TCP) RFC: Introduction The TCP is intended to provide a reliable process-to-process communication service in a.
Two Transport Protocols Available Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Provides unreliable transfer Requires minimal – Overhead.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
5. End-to-end protocols (part 1)
Transport Layer.
Process-to-Process Delivery
TCP.
TCP - Part I Karim El Defrawy
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
TRANSMISSION CONTROL PROTOCOL
Chapter 5 Transport Layer Introduction
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Lecture 21 and 22 5/29/2019.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Transport Layer 9/22/2019.
TCP Connection Management
Presentation transcript:

UDP & TCP Where would we be without them!

UDP User Datagram Protocol

UDP (1 of 5)  How does it work? Connectionless Provides only checksum Provides delivery to port number No detection of lost packets

UDP (2 of 5)  Why use it? Designed for apps that do not need to put sequences of packets together. Speed  No acknowledgments are required Multicast applications? Definitely!

UDP (3 of 5)  Source Port (2 Bytes) UDP port used by the sender Defines that application that is sending the packet May be all zeros (very rare)  Destination Port (2 Bytes) Defines the destination application to receive the packet

UDP (4 of 5)  Header Length (2 Bytes) Defines the length of the packet from the UDP header to the end of UDP data  Checksum (2 Bytes) Different from other headers Performed on contents of UDP header, less the checksum field itself, the data and a pseudo- header derived from the IP header. Pseudo-header is derived from the IP Source address, destination address, protocol, and UDP length fields.

UDP (5 of 5)  Data (variable length) Contains the payload of the packet E.g. DHCP

TCP Transmission Control Protocol

TCP Header

 Source & Destination Ports – 16 bits Specify source and destination applications for encapsulated data Assigned ports are numbered from 0 – 1023  Example: TFTP is port 69, Doom is 666 Any private application uses port numbers above 1023  Sequence Numbers – 32 bits Identifies where encapsulated data fits in data stream from sender  Example: if sequence # of segment is 1234 and segment contains 512 bytes of data, next segment should have sequence # of 1747 ( )

 Acknowledgement Number – 32 bits Identifies sequence number source expects to receive from destination  I.e: if last segment sent had sequence number of 101, expects to see 613 ( ) here  Header Length – 4 bits Length of TCP header in 32-bit words  Reserved – 6 bits For future use (?) – set to all 0’s.

 Flags – 6 bits Used for data flow and connection control  Urgent (URG), Acknowledgement (ACK), Push (PSH), Reset (RST), Synchronize (SYN), Final (FIN)  Window Size – 16 bits Used for flow control Specifies number of bytes that can be sent without waiting for acknowledgement Can be used for OS fingerprinting

 Checksum – 16 bits Covers both header and encapsulated data, providing error detection  Urgent Pointer – 16 bits Used only when flag set to URG indicating end of urgent data  Options and Padding – 32 bits (optional) Only really used for setting Maximum Segment Size informing receiver of max. size segment source is willing to accept Padding is used to fill in 0’s to make sure header length is multiple of 32 bits

TCP  TCP Flags A, ACK- (Acknowledge) The receiver will send an ACK that equals the senders sequence number plus the Len, or amount of data, at the TCP layer. SYN, and FIN flags count as 1 byte. The ACK can also be thought of as the sequence number of the next octet the receiver expects to receive. S, SYN- Synchronize is used during session setup to agree on initial sequence numbers. Sequence numbers are random. F, FIN- Finish is used during a graceful session close to show that the sender has no more data to send. R, RST- Reset is an instantaneous abort in both directions (abnormal session disconnection). P, PSH- Push forces data delivery without waiting for buffers to fill. This is used for interactive traffic. The data will also be delivered to the application on the receiving end with out buffering. U, URG- Urgent- Data is sent out of band.

TCP  What is it? Designed to address several issues not addressed by IP.  Packets arriving out of sequence  Packets not arriving at all  Recipient not acknowledging receipt  Excessive traffic flow Packets arrive too fast for recipient to process  Packets too large for recipient

TCP  What is it? (cont.) Addresses these issues  Ensures packets reach their destination  Retransmitting lost packets  Tracks packet sequence numbers for reassembly in right order  Manages traffic flow via a windowing process

TCP  How does it work? Ensures reliable communication between sender and recipient Establishes this via a Three-Way- Handshake process Via the TWH, negotiates a “socket” The socket remains open for duration of communication

TCP  Sockets are paired into sender and receiver sockets IP address of sender Port number of sender IP address of receiver Port number of receiver  Allows multiple connections between two systems by changing the above combinations

TCP 3 Way Handshake

TCP  Reliability TCP uses Sequencing to ensure that a datagram hasn’t gotten lost If the receiver determines something is wrong, it will notify the sender to resend the missing packet(s) The acknowledgement field assists by informing the sender what the next sequence number is expected to be  It is always one greater than the most recently received data byte.

TCP Sequencing example  Sequence number of last packet 100  Data offset (in Bytes) 256  Therefore = 357  Next expected sequence number 357

TCP TCP Sequencing with no errors

TCP TCP Sequencing with errors

TCP Flow Control  Flow control Sliding window  Amount of data sent to a host before expecting to get an ack.  Negotiated by the two systems during the 3-way handshake.  Primary reason is for congestion control.  Window size can be reduced to alleviate congestion

TCP Windowing

TCP End Communication

TCP Vulnerabilities  3-Way handshake Server will wait for a while after sending the SYN/ACK. Server will send another SYN/ACK Repeated 5-6 times. Each time, server waits twice as long to give client a better chance to connect. If server tries 6 times and starts with a 3 second delay, total wait time could be 189 seconds!

TCP Vulnerabilities  Denial of service SYN Flood  Attacking system sends SYN packets to server with invalid return address.  Server will try sending a SYN/ACK to the non-existent address.  End result is that the socket the attacker sent the SYN to is blocked temporarily.  1000’s of SYNs are sent, blocking all available sockets on the server.

TCP Vulnerabilities  Denial of service (cont.) SYN Flood  Many attempts have been made to stop this attack.  E.g. Sending RST to suspicious SYN packets Failed to stop attack due to volume of SYN packets.