TSIN02 - Internetworking

Similar documents
TSIN02 - Internetworking

TSIN02 - Internetworking

TSIN02 - Internetworking

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

OSI Transport Layer. objectives

Networking Technologies and Applications

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

05 Transmission Control Protocol (TCP)

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

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

Lecture 3: The Transport Layer: UDP and TCP

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

TCP /IP Fundamentals Mr. Cantu

IS370 Data Communications and Computer Networks. Chapter 5 : Transport Layer

Unit 2.

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

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

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

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

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

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

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. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

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

Chapter 24. Transport-Layer Protocols

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

Introduction to TCP/IP networking

Hands-On Ethical Hacking and Network Defense

ECE 650 Systems Programming & Engineering. Spring 2018

UDP, TCP, IP multicast

QUIZ: Longest Matching Prefix

CSCI-GA Operating Systems. Networking. Hubertus Franke

ICMP. Outline ICMP. ICMP oicmp is provided within IP which generates error. Internet Control Message Protocol. Ping Traceroute

4.0.1 CHAPTER INTRODUCTION

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols

User Datagram Protocol (UDP):

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

TCP/IP Networking. Part 4: Network and Transport Layer Protocols

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

Application. Transport. Network. Link. Physical

Transport Layer Protocols. Internet Transport Layer. Agenda. TCP Fundamentals

CCNA 1 v3.11 Module 11 TCP/IP Transport and Application Layers

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

UNIT V. Computer Networks [10MCA32] 1

NT1210 Introduction to Networking. Unit 10

6. The Transport Layer and protocols

ECE4110 Internetwork Programming. Introduction and Overview

EEC-682/782 Computer Networks I

NETWORK PROGRAMMING. Instructor: Junaid Tariq, Lecturer, Department of Computer Science

CMPE 80N: Introduction to Networking and the Internet

Lesson 5 TCP/IP suite, TCP and UDP Protocols. Chapter-4 L05: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

User Datagram Protocol

The Transmission Control Protocol (TCP)

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 25, 2018

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

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

CSC 634: Networks Programming

Chapter 5 End-to-End Protocols

UNIT IV TRANSPORT LAYER

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

9th Slide Set Computer Networks

ECE 435 Network Engineering Lecture 15

Transport Layer (TCP/UDP)

Linux Networking: tcp. TCP context and interfaces

Transport Layer TCP & UDP Week 7. Module : Computer Networks Lecturers : Lucy White Office : 324

CS 716: Introduction to communication networks th class; 7 th Oct Instructor: Sridhar Iyer IIT Bombay

Interconnecting Networks with TCP/IP. 2000, Cisco Systems, Inc. 8-1

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space that is provided.

Different Layers Lecture 21

Simulation of TCP Layer

CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. ** Slides are attributed to J. F.

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

Internet Applications and the Application Layer Material from Kurose and Ross, Chapter 2: The Application Layer

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

UNIT 2 TRANSPORT LAYER

TCP/IP THE TCP/IP ARCHITECTURE

Chapter 11. User Datagram Protocol (UDP)

EE 122: Transport Protocols. Kevin Lai October 16, 2002

Da t e: August 2 0 th a t 9: :00 SOLUTIONS

ITS323: Introduction to Data Communications

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

Introduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

Internet and Intranet Protocols and Applications

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

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

EE 610 Part 2: Encapsulation and network utilities

Computer Communication Networks Midterm Review

Connection-oriented (virtual circuit) Reliable Transfer Buffered Transfer Unstructured Stream Full Duplex Point-to-point Connection End-to-end service

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

Lenuta Alboaie Computer Networks

7. TCP 최양희서울대학교컴퓨터공학부

Transport Protocols and TCP

Interconnecting Networks with TCP/IP

The Transport Layer. Part 1

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

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

CS4700/CS5700 Fundamentals of Computer Networks

Computer Networks and Data Systems

CS457 Transport Protocols. CS 457 Fall 2014

Transcription:

Lecture 4: Transport Layer Literature: Forouzan: ch 11-12 2004 Image Coding Group, Linköpings Universitet

Lecture 4: Outline Transport layer responsibilities UDP TCP 2

Transport layer in OSI model Figure from Forouzan 3

Lower layer responsibilities The physical layer transmits signals representing individual bits on a channel The link layer provides reliable link communication through framing, physical addressing, flow- error- and access control The network layer provides end to end delivery of individual packets through logical addressing and routing support 4

End to end delivery of a packet Figure from Forouzan 5

The Transport Layer The transport layer is responsible for end to end delivery of messages. This is achieved through Service point addressing Segmentation and reassembly Connection control Flow control Congestion control Error control 6

End to end delivery of a message Figure from Forouzan 7

Addressing - Protocol Ports Port numbers are used as a process identifier. They are needed since computers can run multiple programs at the same time. IP addresses identify computers Port numbers identify processes An (IP address, port number) pair is called a socket. Messages must define source and destination sockets 8

Addresses and Ports Figure from Forouzan 9

Port Numbers Figure from Forouzan 10

Port Numbers The IANA has divided the port numbers into three ranges: Well known ports (0-1023) Assigned and controlled by IANA Registered ports (1024-49151) Ports in this range can be registered with IANA to prevent duplication. Dynamic ports (49152-65535) The ephemeral ports can be used by any process. 11

Some Well Known Ports Port number Application 20,21 FTP 22 SSH 23 Telnet 25 SMTP 53 DNS 80 HTTP 110 POP3 143 IMAP4 443 HTTPS 993 IMAP4/SSL 995 POP3/SSL 12

Transport layer protocols There are two transport layer protocols in the TCP/IP stack: UDP - User Datagram Protocol Connectionless unreliable service TCP - Transmission Control Protocol Connection-oriented reliable stream service TCP UDP IGMP ICMP IP ARP RARP Underlying networks 13

User Datagram Protocol UDP is a connectionless, unreliable transport protocol UDP provides process to process communication limited error checking UDP does not provide acknowledgment for received packets segmentation and reassembly flow control congestion control 14

User Datagram Protocol Why use UDP? 15

User Datagram Protocol UDP is suitable for processes that provide internal flow and error control mechanisms, eg TFTP multicasting and broadcasting management processes, eg SNMP some route updating protocols, eg RIP processes that only send short messages 16

User Datagram UDP packets (datagrams): 8 byte header max 65507 bytes of data (=IP length IP header UDP header) Figure from Forouzan 17

UDP Checksum The UDP checksum includes pseudo-header UDP header data from the application layer pad byte (if needed) 8 bits 8 bits Protocol All 0s (17) Source port address Source IP address... 8 bits 8 bits Destination IP address UDP total length Data UDP total length Destination port address UDP Checksum 18

Checksum example Figure from Forouzan 19

UDP Operation Messages are encapsulated in UDP datagrams Usually each port is associated with one or two queues UDP handles multiplexing and demultiplexing of messages. 20

Encapsulation Figure from Forouzan 21

Incoming and outgoing queues Figure from Forouzan 22

Multiplexing Figure from Forouzan 23

UDP Package Figure from Forouzan 24

Transmission Control Protocol TCP is a connection-oriented transport protocol TCP provides full duplex connections reliable stream service flow control congestion control error control 25

Position of TCP in TCP/IP stack 26

Stream Delivery of TCP 27

Buffers Sending and receiving buffers are used for storage. This makes it possible to handle differences in speed between the sending and receiving processes. Buffers are also used in flow, congestion and error control mechanisms. 28

Buffers Figure from Forouzan 29

TCP Segments Figure from Forouzan 30

Reliable Service TCP provides reliable service by breaking application data into suitably sized blocks called segments using an acknowledgment mechanism retransmission when errors occur providing flow and congestion control checksum control of header and data 31

TCP Segment Figure from Forouzan 32

Sequence number All bytes transmitted in a connection are numbered, starting from a random position 32 bits are used for numbering The value in the header is the number of the first byte of data contained in the segment. 33

Acknowledgement number This number is used to announce the sequence number of the next expected segment and thus acknowledging that all prior segments (with lower sequence numbers) have been received. 34

TCP Flags 6 flags can be used to determine the purpose of the segment (more than one can be set) URG - urgent pointer valid (set when sender wants the receiver to read a piece of data urgently and possibly out of order) ACK - acknowledgment number valid PSH - push data, receiver should immediately pass the data to the application (buffers should be emptied!) RST - reset the connection SYN - synchronize sequence numbers to initiate connection FIN - terminate the connection 35

TCP Handshake A three-way handshake is used to establish a connection Negotiation on initial sequence numbers Initial segment number (ISN) chosen so that each active connection has its own ISN Normally initiation is made by the client Figure from Forouzan 36

Connection Termination 4 segments needed to close a connection Figure from Forouzan 37

Maximum Segment Size MSS is the largest block of data TCP will send to the other side. MSS can be announced in the options field during connection establishment. Default MSS is 536 The larger the better (until fragmentation occurs) 38

TCP Options Up to 40 bytes of optional information can be included in the TCP header Used to convey additional information or to align other options Figure from Forouzan 39

Flow Control How much can a source send without receiving an ACK? The sliding window protocol is used in TCP offered window usable window A sliding window is used to make transmission more efficient as well as to control the flow of data so that the destination does not become overwhelmed with data. TCP s sliding windows are byte oriented. 40

Senders window Figure from Forouzan 41

Sliding window 42

Silly window syndrome Sender sends 1-byte segments because the application produces data slowly. Solution - Nagle's algorithm After sending one segment, wait until either an ACK is received or a full window can be transmitted. 1-byte windows are announced by the receiver because the application consumes data slowly. Solution - Clark's Send ACKs as soon as possible, but announce zero window size until a maximum size segment fits the buffer Solution - delayed ACK Wait with acknowledgments until there is room in the buffer 43

In TCP, the sender window size is totally controlled by the receiver window value. However, the actual window size can be smaller if there is congestion in the network. 44

Some Points about Sliding Windows The source does not have to send a full window's worth of data. The size of the window can be increased or decreased by the destination The destination can send an acknowledgment at any time. 45

Error control Figure from Forouzan 46

Lost Segment Figure from Forouzan 47

Lost Acknowledgement Figure from Forouzan 48

Congestion Control TCP assumes that the cause of a lost segment is due to congestion in the network. If the cause of the lost segment is congestion, retransmission of the segment will not help, it will make things worse. 49

Congestion Control Handles bottlenecks in the network Without congestion control the network will collapse! Solution: Congestion window (CWND) slow start Additive increase of CWND Multiplicative decrease of CWND Fast retransmit and Fast recovery 50

Congestion window size Figure from Forouzan 51

TCP Timers Retransmission timer how long should sender wait for an ACK? Persistence timer how long should sender wait if window size = 0? Keep-alive timer Prevents connections to live forever Time-Waited timer Each connection held in limbo before actually closed 52

State transistions Figure from Forouzan 53

TCP packet Figure from Forouzan 54

Summary Transport layer basics UDP - a fairly simple connectionless protocol TCP - a very complex protocol Reliability Connection management Flow control Congestion avoidance Timers 55