Computer Networking. TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

Similar documents
Transport Layer and Data Center TCP

Computer Networks. Chapter 5 Transport Protocols

Transport Layer Protocols

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Chapter 5. Transport layer protocols

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

TCP Flow Control. TCP Receiver Window. Sliding Window. Computer Networks. Lecture 30: Flow Control, Reliable Delivery

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

TCP/IP Optimization for Wide Area Storage Networks. Dr. Joseph L White Juniper Networks

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

Higher Layer Protocols: UDP, TCP, ATM, MPLS

q Connection establishment (if connection-oriented) q Data transfer q Connection release (if conn-oriented) q Addressing the transport user

Computer Networks UDP and TCP

Transport Layer. Chapter 3.4. Think about

La couche transport dans l'internet (la suite TCP/IP)

La couche transport dans l'internet (la suite TCP/IP)

CSE331: Introduction to Networks and Security. Lecture 9 Fall 2006

Ethernet. Ethernet. Network Devices

The Transport Layer and Implica4ons for Network Monitoring. CS 410/510 Spring 2014

[Prof. Rupesh G Vaishnav] Page 1

This sequence diagram was generated with EventStudio System Designer (

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Defending Computer Networks Lecture 6: TCP and Scanning. Stuart Staniford Adjunct Professor of Computer Science

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

TCP in Wireless Mobile Networks

TCP Performance Management for Dummies

How do I get to

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Mobile Communications Chapter 9: Mobile Transport Layer

Computer Networks - CS132/EECS148 - Spring

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

First Midterm for ECE374 03/09/12 Solution!!

Data Communications & Networks. Session 6 Main Theme Reliable Data Transfer. Dr. Jean-Claude Franchitti

Computer Networks. Data Link Layer

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

Transport layer protocols for ad hoc networks

TCP/IP Networking for Wireless Systems. Integrated Communication Systems Group Ilmenau University of Technology

What is a DoS attack?

Final for ECE374 05/06/13 Solution!!

15-441: Computer Networks Homework 2 Solution

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

Multipath TCP in Practice (Work in Progress) Mark Handley Damon Wischik Costin Raiciu Alan Ford

Lecture 5: Network Attacks I. Course Admin

Configuring TCP Intercept (Preventing Denial-of-Service Attacks)

First Midterm for ECE374 03/24/11 Solution!!

Visualizations and Correlations in Troubleshooting

Network Security: Workshop. Dr. Anat Bremler-Barr. Assignment #2 Analyze dump files Solution Taken from

Networks: IP and TCP. Internet Protocol

Data Communication & Networks G

Access Control: Firewalls (1)

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

Компјутерски Мрежи NAT & ICMP

First Midterm for ECE374 02/25/15 Solution!!

IP - The Internet Protocol

IP address format: Dotted decimal notation:

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network

8-bit Microcontroller. Application Note. AVR460: Embedded Web Server. Introduction. System Description

Voice over IP. Demonstration 1: VoIP Protocols. Network Environment

Advanced Computer Networks Project 2: File Transfer Application

Internet Protocols. Background CHAPTER

Computer Networks. Examples of network applica3ons. Applica3on Layer

1 An application in BPC: a Web-Server

The present and the future of TCP/IP

Introduction to TCP/IP

Architecture and Performance of the Internet

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

Application Level Congestion Control Enhancements in High BDP Networks. Anupama Sundaresan

Transport Layer Services Mul9plexing/Demul9plexing. Transport Layer Services

2 TCP-like Design. Answer

Computer Networks Practicum 2015

Recent advances in transport protocols

TCP for Wireless Networks

Route Discovery Protocols

Lecture 2-ter. 2. A communication example Managing a HTTP v1.0 connection. G.Bianchi, G.Neglia, V.Mancuso

Host Fingerprinting and Firewalking With hping

2.1 Introduction. 2.2 Voice over IP (VoIP)

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

Exercises TCP/IP Networking. Solution. With Solutions

Protocols and Architecture. Protocol Architecture.

A Transport Protocol for Multimedia Wireless Sensor Networks

TCP Adaptation for MPI on Long-and-Fat Networks

Project 4: (E)DoS Attacks

Data Networks Summer 2007 Homework #3

Stop And Wait. ACK received; transmit frame 2 CS 455 3

CYBER ATTACKS EXPLAINED: PACKET CRAFTING

Overview of TCP/IP. TCP/IP and Internet

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

Pig Laboratory. Additional documentation for the laboratory. Exercises and Rules. Tstat Data

Computer Networks Homework 1

QUIC. Quick UDP Internet Connections. Multiplexed Stream Transport over UDP. IETF-88 TSV Area Presentation

Secure SCTP against DoS Attacks in Wireless Internet

Chapter 8 Security Pt 2

Transcription:

Computer Networking Connec1on- Oriented Transport: : Overview RFCs: 793, 1122, 1323, 2018, 2581 point- to- point: one sender, one receiver reliable, in- order byte steam: no message boundaries pipelined: conges1on and flow control set window size send & receive buffers full duplex data: bi- direc1onal data flow in same connec1on MSS: maximum segment size connec1on- oriented: handshaking (exchange of control msgs) init s sender, receiver state before data exchange flow controlled: sender will not overwhelm receiver 1

segment structure URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection estab (setup, teardown commands) Internet checksum (as in UDP) 32 bits source port # dest port # head len sequence number acknowledgement number not used checksum U A P R S F Receive window Urg data pointer Options (variable length) application data (variable length) counting by bytes of data (not segments!) # bytes rcvr willing to accept Seq. # s: byte stream number of first byte in segment s data ACKs: seq # of next byte expected from other side cumula1ve ACK Q: how receiver handles out- of- order segments A: spec doesn t say, - up to implementer seq. # s and ACKs User types C host ACKs receipt of echoed C Host A Host B Seq=42, ACK=79, data = C Seq=79, ACK=43, data = C Seq=43, ACK=80 simple telnet scenario host ACKs receipt of C, echoes back C time 2

Round Trip Time and Timeout Q: how to set 1meout value? longer than RTT but RTT varies too short: premature 1meout unnecessary retransmissions too long: slow reac1on to segment loss Q: how to es1mate RTT? SampleRTT: measured 1me from segment transmission un1l ACK receipt ignore retransmissions SampleRTT will vary, want es1mated RTT smoother average several recent measurements, not just current SampleRTT reliable data transfer creates rdt service on top of IP s unreliable service pipelined segments cumula1ve ACKs uses single retransmission 1mer retransmissions are triggered by: 1meout events duplicate ACKs ini1ally consider simplified sender: ignore duplicate ACKs ignore flow control, conges1on control 3

data rcvd from app: create segment with seq # seq # is byte- stream number of first data byte in segment start 1mer if not already running (think of 1mer as for oldest unacked segment) expira1on interval: TimeOutInterval sender events: 1meout: retransmit segment that caused 1meout restart 1mer ACK rcvd: if acknowledges previously unacked segments update what is known to be ACKed start 1mer if there are outstanding segments : retransmission scenarios Host A Host B Host A Host B timeout SendBase = 100 time X loss ACK=100 ACK=100 lost ACK scenario Sendbase = 100 SendBase = 120 SendBase = 120 Seq=92 timeout Seq=92 timeout time Seq=100, 20 bytes data ACK=100 ACK=120 ACK=120 premature timeout 4

retransmission scenarios (more) Host A Host B timeout Seq=100, 20 bytes data X loss ACK=100 SendBase = 120 ACK=120 time Cumulative ACK scenario ACK genera1on [RFC 1122, RFC 2581] Event at Receiver Arrival of in-order segment with expected seq #. All data up to expected seq # already ACKed Arrival of in-order segment with expected seq #. One other segment has ACK pending Arrival of out-of-order segment higher-than-expect seq. #. Gap detected Arrival of segment that partially or completely fills gap Receiver action Delayed ACK. Wait up to 500ms for next segment. If no next segment, send ACK Immediately send single cumulative ACK, ACKing both in-order segments Immediately send duplicate ACK, indicating seq. # of next expected byte Immediate send ACK, provided that segment starts at lower end of gap 5

Fast Retransmit 1me- out period oaen rela1vely long: long delay before resending lost packet detect lost segments via duplicate ACKs. sender oaen sends many segments back- to- back if segment is lost, there will likely be many duplicate ACKs for that segment If sender receives 3 ACKs for same data, it assumes that segment aaer ACKed data was lost: fast retransmit: resend segment before 1mer expires receive side of connec1on has a receive buffer: Flow Control flow control sender won t overflow receiver s buffer by transmicng too much, too fast IP datagrams (currently) unused buffer space data (in buffer) application process speed- matching service: matching send rate to receiving applica1on s drain rate app process may be slow at reading from buffer 6

Flow control: how it works IP datagrams (currently) unused buffer space rwnd RcvBuffer data (in buffer) application process (suppose receiver discards out- of- order segments) unused buffer space: = rwnd = RcvBuffer-[LastByteRcvd - LastByteRead] receiver: adver1ses unused buffer space by including rwnd value in segment header sender: limits # of unacked bytes to rwnd guarantees receiver s buffer doesn t overflow Connec1on Management Recall: sender, receiver establish connec1on before exchanging data segments ini1alize variables: seq. #s buffers, flow control info (e.g. RcvWindow) client: connec1on ini1ator Socket clientsocket = new Socket("hostname","port number"); server: contacted by client Socket connectionsocket = welcomesocket.accept(); Three way handshake: Step 1: client host sends SYN segment to server specifies ini1al seq # no data Step 2: server host receives SYN, replies with SYNACK segment server allocates buffers specifies server ini1al seq. # Step 3: client receives SYNACK, replies with ACK segment, which may contain data 7

Connec1on Management (cont.) Closing a connec1on: client server client closes socket: clientsocket.close(); close FIN Step 1: client end system sends FIN control segment to server ACK FIN close Step 2: server receives FIN, replies with ACK. Closes connec1on, sends FIN. timed wait closed ACK Connec1on Management (cont.) Step 3: client receives FIN, replies with ACK. Enters 1med wait - will respond with ACK to received FINs Step 4: server, receives ACK. Connec1on closed. closing client FIN ACK FIN server closing Note: with small modifica1on, can handle simultaneous FINs. timed wait ACK closed closed 8

Connec1on Management (cont) server lifecycle client lifecycle 9