TCP Connection Management

Slides:



Advertisements
Similar presentations
Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Advertisements

2: Transport Layer 31 Transport Layer 3. 2: Transport Layer 32 TCP Flow Control receiver: explicitly informs sender of (dynamically changing) amount of.
Transportation Layer (2). TCP full duplex data: – bi-directional data flow in same connection – MSS: maximum segment size connection-oriented: – handshaking.
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.
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July A note on the use.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
3-1 TCP Protocol r point-to-point: m one sender, one receiver r reliable, in-order byte steam: m no “message boundaries” r pipelined: m TCP congestion.
1 Chapter 3 Transport Layer. 2 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
1 Transport Layer Lecture 9 Imran Ahmed University of Management & Technology.
1 Reading Log Files. 2 Segment Format
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Layer3-1 Summary of Reliable Data Transfer Checksums help us detect errors ACKs and NAKs help us deal with errors If ACK/NAK has errors sender.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
Week 9 TCP9-1 Week 9 TCP 3 outline r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management.
Transmission Control Protocol (TCP) Basics
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: Objectives Part 1
TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number rcvr window size ptr.
TRANSPORT LAYER  Session multiplexing  Segmentation  Flow control (TCP)  Connection-oriented (TCP)  Reliability (TCP)
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Outline Definition Point-to-point network denial of service
EEC-484/584 Computer Networks Lecture 7 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
Chapter 3 Transport Layer
Transport Layer3-1 Data Communication and Networks Lecture 7 Transport Protocols: TCP October 21, 2004.
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 Ch. 7 : Internet Transport Protocols. Transport Layer Our goals: r understand principles behind transport layer services: m Multiplexing / demultiplexing.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
1 ELEN 602 Lecture 15 More on IP TCP. 2 byte stream Send buffer segments Receive buffer byte stream Application ACKs Transmitter Receiver TCP Streams.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Gursharan Singh Tatla Transport Layer 16-May
Transport Layer3-1 TCP sender (simplified) NextSeqNum = InitialSeqNum SendBase = InitialSeqNum loop (forever) { switch(event) event: data received from.
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
Transport Layer3-1 Transport Layer Our lives begin to end, the day we become silent about things that matter.
Slide #1 CIT 380: Securing Computer Systems TCP/IP.
7: TCP Last Modified: 4/26/2017 1:52:15 PM 3: Transport Layer.
Breno de MedeirosFlorida State University Fall 2005 The IP, TCP, UDP protocols A quick refresher.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Transport Layer1 TCP Connection Management Recall: TCP sender, receiver establish “connection” before exchanging data segments r initialize TCP variables:
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
09-Transport Layer: TCP Transport Layer.
DMET 602: Networks and Media Lab
Introduction to TCP/IP networking
Transport Layer.
Process-to-Process Delivery
TCP.
© 2003, Cisco Systems, Inc. All rights reserved.
CS1652 TCP Jack Lange University of Pittsburgh
Review: UDP demultiplexing TCP demultiplexing Multiplexing?
CS 5565 Network Architecture and Protocols
TCP - Part I Karim El Defrawy
The IP, TCP, UDP protocols
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
CS 5565 Network Architecture and Protocols
Lecture 12 Internet Protocols Internet resource allocation and QoS
7: TCP Last Modified: 4/10/ :16:43 AM 3: Transport Layer.
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
Transport Protocols: TCP Segments, Flow control and Connection Setup
Transport Layer 9/22/2019.
Chapter 3 Transport Layer
Presentation transcript:

TCP Connection Management Three way handshake: Step 1: client host sends TCP SYN segment to server specifies initial seq # no data Step 2: server host receives SYN, replies with SYNACK segment server allocates buffers specifies server initial seq. # Step 3: client receives SYNACK, replies with ACK segment, which may contain data Recall: TCP sender, receiver establish “connection” before exchanging data segments initialize TCP variables: seq. #s buffers, flow control info (e.g. RcvWindow) client: connection initiator Socket clientSocket = new Socket("hostname","port number"); server: contacted by client Socket connectionSocket = welcomeSocket.accept(); Transport Layer

TCP Connection Management (cont.) Closing a connection: client closes socket: clientSocket.close(); Step 1: client end system sends TCP FIN control segment to server Step 2: server receives FIN, replies with ACK. Closes connection, sends FIN. client FIN server ACK close closed timed wait Transport Layer

TCP Connection Management (cont.) Step 3: client receives FIN, replies with ACK. Enters “timed wait” - will respond with ACK to received FINs Step 4: server, receives ACK. Connection closed. Note: with small modification, can handle simultaneous FINs. client server closing FIN ACK closing FIN ACK timed wait closed closed Transport Layer

Acknowledgment Number TCP Packets TCP adds “sessions” or “connections” to the bare IP protocol: 15 16 31 Source Port Destination Port Sequence Number Acknowledgment Number Data Offset Flags Window Checksum Urgent Pointer Options Data Flags: URG: Urgent ptr valid RST: Reset flag ACK: ACK valid SYN: Synchronize seq #s PSH: Push function FIN: Finish of connection Transport Layer

(SYN|ACK, S-Seq, C-Seq+1) The 3-way handshake Labels below give (Flags, Seq#, Ack#): (SYN, C-Seq, 0) (SYN|ACK, S-Seq, C-Seq+1) (ACK, C-Seq+1, S-Seq+1) Server Client To establish connection, client must prove that it received the SYN|ACK packet! SYN|ACK packet routed to system with source address from first SYN packet Since based on routing, only secure back to the subnet of the source Note idea of a “nonce” to prove that these packets are part of this session Transport Layer

SYN Issues – Predictability Sequence numbers should be unpredictable Most systems today select random values that meet some necessary conditions Otherwise: To fake Src: (SYN|ACK, S-Seq, C-Seq+1) With fake Src: (SYN, C-Seq, 0) Conditions: Seq numbers must be basically increasing (ACK, C-Seq+1, Predict-S-Seq+1) Client Server Data pretending to come from fake Src Particularly dangerous when “fake Src” is a trusted IP address Transport Layer

SYN Issues – SYN Flooding Server Data Structures (SYN, C-Seq1, 0) (SYN|ACK, S-Seq1, C-Seq1+1) Half-open conn S-Seq1 (SYN, C-Seq2, 0) (SYN|ACK, S-Seq2, C-Seq2+1) Half-open conn S-Seq2 Client (SYN, C-Seq3, 0) (SYN|ACK, S-Seq3, C-Seq3+1) Half-open conn S-Seq3 . . . Server DoS isn’t due to traffic volume but to resource exhaustion (memory) in the server O.S. Early network stacks had a severely limited number of half-open structures available Can spoof SRC address with non-existent host Remember: Server must be able to verify whether the ACK from the 3rd part of the handshake is valid Transport Layer

TCP Limitations provides strict ordering of information result: Head of Line Blocking (HOL) problem what is needed in many cases, is only partial ordering of data byte oriented nature….inconvenience for telephony signaling no built-in support for multi-homed IP hosts vulnerability to SYN flooding attacks Transport Layer