Linux Networking: tcp. TCP context and interfaces

Similar documents
OSI Transport Layer. objectives

RSC Part III: Transport Layer 3. TCP

TCP : Fundamentals of Computer Networks Bill Nace

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Transport Layer. <protocol, local-addr,local-port,foreign-addr,foreign-port> ϒ Client uses ephemeral ports /10 Joseph Cordina 2005

TCP /IP Fundamentals Mr. Cantu

TSIN02 - Internetworking

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

TSIN02 - Internetworking

The Transport Layer: TCP & Reliable Data Transfer

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

CCNA R&S: Introduction to Networks. Chapter 7: The Transport Layer

CSCD 330 Network Programming

Application. Transport. Network. Link. Physical

TSIN02 - Internetworking

Transport Layer: outline

TSIN02 - Internetworking

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

CSCE 463/612 Networks and Distributed Processing Spring 2017

Networking Technologies and Applications

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

Internet and Intranet Protocols and Applications

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

CSE 4213: Computer Networks II

Chapter 3 Transport Layer

CS450 Introduc0on to Networking Lecture 14 TCP. Phu Phung Feb 13, 2015

10 minutes survey (anonymous)

TCP. TCP: Overview. TCP Segment Structure. Maximum Segment Size (MSS) Computer Networks 10/19/2009. CSC 257/457 - Fall

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

Transport Layer: Outline

User Datagram Protocol (UDP):

CS Lecture 1 Review of Basic Protocols

Transport Protocols. Raj Jain. Washington University in St. Louis

05 Transmission Control Protocol (TCP)

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods

6. The Transport Layer and protocols

CNT 6885 Network Review on Transport Layer

Chapter 3 Transport Layer

TCP = Transmission Control Protocol Connection-oriented protocol Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.

The Transport Layer Reliable data delivery & flow control in TCP. Transport Layer Protocols & Services Outline

Lenuta Alboaie Computer Networks

Chapter 3 Transport Layer

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

COMP 431 Internet Services & Protocols. Transport Layer Protocols & Services Outline. The Transport Layer Reliable data delivery & flow control in TCP

Unit 2.

ECE 650 Systems Programming & Engineering. Spring 2018

EEC-682/782 Computer Networks I

The Transport Layer Reliable data delivery & flow control in TCP. Transport Layer Protocols & Services Outline

User Datagram Protocol

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol)

I TCP 1/2. Internet TA: Connection-oriented (virtual circuit) Connectionless (datagram) (flow control) (congestion control) TCP Connection-oriented

Lecture 3 The Transport Control Protocol (TCP) Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CSCI Topics: Internet Programming Fall 2008

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016

EEC-484/584 Computer Networks. Lecture 16. Wenbing Zhao

CC451 Computer Networks

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

Transmission Control Protocol (TCP)

Chapter 3 Transport Layer

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

9th Slide Set Computer Networks

Chapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management

Lecture 3: The Transport Layer: UDP and TCP

Chapter 6 Transport Layer

Chapter III: Transport Layer

CS 4390 Computer Networks. Pointers to Corresponding Section of Textbook

Different Layers Lecture 21

Chapter 3 Transport Layer

Transport Layer Review

Introduction to Network. Topics

NT1210 Introduction to Networking. Unit 10

Transport Protocols and TCP

Different Layers Lecture 20

Lecture 11: Transport Layer Reliable Data Transfer and TCP

Lecture 5. Transport Layer. Transport Layer 1-1

Layer 4: UDP, TCP, and others. based on Chapter 9 of CompTIA Network+ Exam Guide, 4th ed., Mike Meyers

Computer Networking Introduction

CS457 Transport Protocols. CS 457 Fall 2014

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 9

CSC 401 Data and Computer Communications Networks

TCP/IP Protocol Suite 1

4.0.1 CHAPTER INTRODUCTION

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

CS4700/CS5700 Fundamentals of Computer Networks

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link.

TCP: Transmission Control Protocol RFC 793,1122,1223. Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC

The Transport Layer. Internet solutions. Nixu Oy PL 21. (Mäkelänkatu 91) Helsinki, Finland. tel fax.

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

Network Technology 1 5th - Transport Protocol. Mario Lombardo -

TCP. 1 Administrivia. Tom Kelliher, CS 325. Apr. 2, Announcements. Assignment. Read From Last Time

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

The Transport Layer. Part 1

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

ECE 435 Network Engineering Lecture 15

Transcription:

Linux Networking: tcp David Morgan TCP context and interfaces Computer A Computer B application process application process data data data data TCP process TCP process a network 1

TCP purposes and features Basic data transfer Process-to-process multiplexing Reliability Flow control Connections Transport purposes and features TCP UDP process-to-process data transfer reliability * flow control connections * discard, no recovery 2

Basic data transfer method Sending TCP blocks (segments) the data stream gives each block its own packet ( segment ) Receiving TCP reassembles the blocks into original stream Multiplexed process-to-process transfer processes given identifying numbers ( ports ) IP address/tcp port pair is a local socket pair of sockets, one on each of 2 machines, associated with a unique bilateral connection packets between machines belong to a particular one of the machines connections overall packet flow contains separate flow for each connection 3

Reliability problems with data damaged lost duplicated delivered out-of-order solution Sending TCP Receiving TCP number the data acknowledge good data require acknowledgement discard bad data resend unacknowledged reassemble by the numbers Flow control Problem sending TCP might overwhelm receiving TCP Solution constrain sender by requiring receiver s permission which data, by number range, may be transmitted 4

TCP connections relability/flow control require state info each TCP initializes/maintains it for each data stream connection ends, state info data structures freed TCP packet (segment) header 32 bits 5

Flag bits TCP flags field TCP Header URG = urgent ACK= acknowledgement PSH = push RST = reset SYN = synchronize FIN = finish Establishing a connection client sends packet with SYN bit set server returns packet with SYN & ACK set client sends packet with ACK set called 3-way handshake connection establishment s signature sequence 6

3-way handshake host1 host2 SYN=1 T i m e SYN=1, ACK=1 ACK=1 TCP - SYN Client Server SYN flag set indicates new connection request 7

TCP - SYN/ACK 1592481969 Ack = next expected Seq SYN and ACK Flags set TCP ACK Seq = 1592481969 ACK Flag 8

TCP is stream oriented data transmitted during connection viewed as one continuous stream bytes are consecutively numbered stream segmented into packets for transmittal File deconstruction into sequenced packets a 500,000-byte file data for 1 st packet data for 2 nd packet 0 1 1000 1999 499,999 byte numbers Packet s sequence number is the byte-stream number of the 1 st data byte in the packet. sequence number assignments: 1 st packet 0 2 nd packet 1000 3 rd packet 2000 etc 9

Sequence numbers Relative to byte stream, not packet series Initial sequence number randomly chosen during connection setup handshake actual byte count does not start from zero two number sequences TCP carries 2 flows (full-duplex) a separate sequence for each flow/direction Acknowlegement number also byte-stream relative is sequence number next-expected from partner acknowledges receipt of all prior bytes therefore called cumulative acknowlegement acknowlegements are piggybacked client-to-server acks ride with server-to-client data server-to-client acks ride with client-to-server data 10

Numbering example * : ( C keystroke in telnet) Starting SEQs: host1: 42 host2: 79 T i m e Host ACKs receipt of C host1 SEQ=42 ACK=79 Data= C SEQ=79, ACK=43 Data= C SEQ= 43 ACK=80 host2 Host ACKs receipt of C, echoes back C * Kurose & Ross, p. 234 Traffic control Flow control adapt rate to partner s capacity depends on spare room in partner s receive buffer Congestion control adapt rate to intervening path s capacity depends on just-about-anything 11

Flow control: receive window receive buffer (fixed size) receive window (variable size) data from IP spare room TCP data in buffer to application process Partner given willingness-to-accept spare room TCP data in buffer n bytes n 12

Congestion control cap sent-but-unacknowledged data amount congestion limit can exceed flow limit vary the cap per perceived network congestion cap more severely when packet loss rate rises relax cap when it drops TCP Socket Connection defined by socket pair Combination of IP address and port = socket Client IP = 10.100.13.138 Client Port = 32825 Client Socket = 10.100.13.138:32825 Server IP = 216.239.39.100 Server Port = 80 (HTTP Default) Server Socket = 216.239.39.100:80 13

well-known TCP ports 20 - FTP Control 21 - FTP Data 23 - Telnet 25 - SMTP (Simple Mail Transport Protocol) 80 - HTTP 110 - POP3 119 - Network News Transfer Protocol TCP connection teardown host1 host2 FIN=1, ACK=1 T i m e FIN=1, ACK=1 ACK=1 14

FIN/ACK Biblio Computer Networking, Kurose & Ross, Addison-Wesley, 2003; Chapter 3 Transport Layer Telnet Protocol Specification, RFC 854, 1983 15