CMSC 332 Computer Networks Transport Layer

Similar documents
CSC 4900 Computer Networks: Transport Layer

Chapter 3 Transport Layer

Chapter 3 Transport Layer

CSC 401 Data and Computer Communications Networks

Transport Layer. Chapter 3: Transport Layer

CS 4390 Computer Networks. Transport Services and Protocols

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

Input ports, switching fabric, output ports Switching via memory, bus, crossbar Queueing, head-of-line blocking

CSCE 463/612 Networks and Distributed Processing Spring 2018

Development of reliable protocol Sliding window protocols. C = channel capacity in bps I = interrupt/service time + propagation delay

Chapter III: Transport Layer

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

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

Announcement. Homework 1 due last night, how is that? Will discuss some problems in the lecture next week

CS 3516: Computer Networks

CSE 4213: Computer Networks II

COSC4377. Useful Linux Tool: screen

Lecture 9: Transpor Layer Overview and UDP

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

CSC358 Week 4. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Transport layer. Our goals: Understand principles behind transport layer services: Learn about transport layer protocols in the Internet:

Transport layer: Outline

CSCD 330 Network Programming

CMPE 80N: Introduction to Networking and the Internet

Chapter 3: Transport Layer Part A

CSC 8560 Computer Networks: Transport Layer

Application. Transport. Network. Link. Physical

Introduction to the Transport Layer

Transport Layer Overview

Transport services and protocols. Chapter 3 outline. Internet transport-layer protocols Chapter 3 outline. Multiplexing/demultiplexing

Chapter 6 Transport Layer

CC451 Computer Networks

CSE 3214: Computer Network Protocols and Applications Transport Layer (Part 2) Chapter 3 outline. UDP checksum. Port numbers

Lecture 5. Transport Layer. Transport Layer 1-1

Chapter 3 Transport Layer

Lecture 2 Communication services The Trasport Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Chapter 3: Transport Layer

Lecture 07 The Transport Layer (TCP & UDP) Dr. Anis Koubaa

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

CSCD 330 Network Programming

Internet transport-layer protocols. Transport services and protocols. Sending and receiving. Connection-oriented (TCP) Connection-oriented

Internet and Intranet Protocols and Applications

TDTS06: Computer Networks

CS 43: Computer Networks. 15: Transport Layer & UDP October 5, 2018

Chapter 3 Transport Layer

Chapter 3 Transport Layer

Chapter 6. The Transport Layer. Transport Layer 3-1

Computer Networking: A Top Down Approach

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

The Transport Layer Multiplexing, Error Detection, & UDP

Different Layers Lecture 20

Chapter 7 Transport Layer. 7.0 Introduction 7.1 Transport Layer Protocols 7.2 TCP and UDP 7.3 Summary

End-to-End Protocols: UDP and TCP. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

The Transmission Control Protocol (TCP)

Announcements Computer Networking. What was hard. Midterm. Lecture 16 Transport Protocols. Avg: 62 Med: 67 STD: 13.

Foundations of Telematics

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Computer Networks & Security 2016/2017

By Ossi Mokryn, Based also on slides from: the Computer Networking: A Top Down Approach Featuring the Internet by Kurose and Ross

LECTURE 3 - TRANSPORT LAYER

TSIN02 - Internetworking

CS101 Lecture 6: Internetworking: Internet Protocol, IP Addresses, Routing, DNS. John Magee 8 July Some images courtesy Wikimedia Commons

Course on Computer Communication and Networks. Lecture 4 Chapter 3; Transport Layer, Part A

OSI Transport Layer. objectives

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

Master Course Computer Networks IN2097

MIDTERM EXAMINATION #2 OPERATING SYSTEM CONCEPTS U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E

Chapter 3: Transport Layer

Different Layers Lecture 21

NT1210 Introduction to Networking. Unit 10

Lecture 3: The Transport Layer: UDP and TCP

Course on Computer Communication and Networks. Lecture 4 Chapter 3; Transport Layer, Part A

TSIN02 - Internetworking

Lecture 4: The Transport Layer and UDP

CN1047 INTRODUCTION TO COMPUTER NETWORKING CHAPTER 6 OSI MODEL TRANSPORT LAYER

Computer Communication Networks Midterm Review

TSIN02 - Internetworking

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

EE 122: IP Forwarding and Transport Protocols

Distributed Systems. 5. Transport Protocols

TSIN02 - Internetworking

Distributed Systems. 5. Transport Protocols. Werner Nutt

Our goals: understand d principles. behind transport layer protocols in the. Internet: layer services:

ECE 435 Network Engineering Lecture 15

Functionality Split Computer Networking. Transport Protocols. Overview. Multiplexing & Demultiplexing

CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing

Outline. Inter-Process Communication. IPC across machines: Problems. CSCI 4061 Introduction to Operating Systems

Announcements. IP Forwarding & Transport Protocols. Goals of Today s Lecture. Are 32-bit Addresses Enough? Summary of IP Addressing.

CS457 Transport Protocols. CS 457 Fall 2014

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

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

TCP /IP Fundamentals Mr. Cantu

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

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

Chapter 3 Transport Layer

CS 640: Introduction to Computer Networks. Today s Lecture. Page 1

Introduction to computer networking

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer

Master Course Computer Networks IN2097

Transcription:

CMSC 332 Computer Networks Transport Layer Professor Szajda

Announcements Project I - I ll test against various clients (still possibly an issue in spec). Project 2 will be posted soon (but first, I want to be sure the cluster has been configured correctly). Please check the website. 2

Chapter 3: Transport Layer Our goals: understand principles behind transport layer services: multiplexing/ demultiplexing reliable data transfer learn about transport layer protocols in the Internet: UDP: connectionless transport TCP: connection-oriented transport TCP congestion control flow control congestion control 3

Chapter 3 Outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer 3.5 Connection-oriented transport: TCP segment structure reliable data transfer flow control connection management 3.6 Principles of congestion control 3.7 TCP congestion control 4

Transport services and protocols provide logical communication between app processes running on different hosts transport protocols run in end systems send side: breaks app messages into segments, passes to layer rcv side: reassembles segments into messages, passes to app layer more than one transport protocol available to apps Internet: TCP and UDP application transport logical end-end transport application transport 5

Transport vs. Network layer layer: logical communication between hosts transport layer: logical communication between processes relies on, enhances, layer services Household analogy: 12 kids sending letters to 12 kids processes = kids app messages = letters in envelopes hosts = houses transport protocol = Ann and Bill -layer protocol = postal service 6

Layers of Networks? You can view each layer that we have discussed thus far as an abstract : Application Layer Networks: P2P, Social Networks, etc Transport Layer Networks: Communicating processes Network Layer Networks: Networks of Hosts Link Layer Networks: One-Hop Networks Physical Layer Networks: Wires 7

Internet transport-layer protocols reliable, in-order delivery (TCP) congestion control flow control connection setup unreliable, unordered delivery: UDP no-frills extension of besteffort IP services not available: delay guarantees application transport logical end-end transport application transport bandwidth guarantees 8

Chapter 3 Outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer 3.5 Connection-oriented transport: TCP segment structure reliable data transfer flow control connection management 3.6 Principles of congestion control 3.7 TCP congestion control 9

Multiplexing/demultiplexing Demultiplexing at rcv host: delivering received segments to correct socket = socket = process Multiplexing at send host: gathering data from multiple sockets, enveloping data with header (later used for demultiplexing) application P3 P 1 P1 application P2 P4 application transport transport transport link link link host 1 host 2 host 3 10

How demultiplexing works host receives IP datagrams each datagram has source IP address, destination IP address each datagram carries 1 transport-layer segment each segment has source, destination port number host uses IP addresses & port numbers to direct segment to appropriate socket 32 bits source port # dest port # other header fields application data (message) TCP/UDP segment format 11

Connectionless demultiplexing Create sockets with port numbers: addr1.sin_port = htons(12534); addr2.sin_port = htons(12535); UDP socket identified by twotuple: (dest IP address, dest port number) When host receives UDP segment: checks destination port number in segment directs UDP segment to socket with that port number IP datagrams with different source IP addresses and/or source port numbers directed to same socket 12

Connectionless demux (cont) P2 P3 P 1 P1 SP: 6428 DP: 9157 SP: 6428 DP: 5775 SP: 9157 SP: 5775 client IP: A DP: 6428 server IP: C DP: 6428 Client IP:B SP provides return address 13

Connection-oriented demux TCP socket identified by 4-tuple: source IP address source port number dest IP address dest port number recv host uses all four values to direct segment to appropriate socket Server host may support many simultaneous TCP sockets: each socket identified by its own 4-tuple Web servers have different sockets for each connecting client non-persistent HTTP will have different socket for each request 14

Connection-oriented demux (cont) P1 P4 P P5 P6 P2 1 P3 SP: 5775 DP: 80 S-IP: B D-IP:C SP: 9157 SP: 9157 client IP: A DP: 80 S-IP: A D-IP:C server IP: C DP: 80 S-IP: B D-IP:C Client IP:B 15

Connection-oriented demux: Threaded Web Server P1 P4 P2 P 1 P3 SP: 5775 DP: 80 S-IP: B D-IP:C SP: 9157 SP: 9157 client IP: A DP: 80 S-IP: A D-IP:C server IP: C DP: 80 S-IP: B D-IP:C Client IP:B 16

Chapter 3 Outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer 3.5 Connection-oriented transport: TCP segment structure reliable data transfer flow control connection management 3.6 Principles of congestion control 3.7 TCP congestion control 17

UDP: User Datagram Protocol [RFC 768] no frills, bare bones Internet transport protocol best effort service, UDP segments may be: lost delivered out of order to app connectionless: no handshaking between UDP sender, receiver each UDP segment handled independently of others Why is there a UDP? no connection establishment (which can add delay) simple: no connection state at sender, receiver small segment header no congestion control: UDP can blast away as fast as desired 18

UDP: more often used for streaming multimedia apps loss tolerant rate sensitive other UDP uses DNS SNMP reliable transfer over UDP: add reliability at application layer application-specific error recovery! Length, in bytes of UDP segment, including header 32 bits source port # dest port # length Application data (message) checksum UDP segment format 19

UDP checksum Goal: detect errors (e.g., flipped bits) in transmitted segment Sender: treat segment contents as sequence of 16-bit integers checksum: addition (1 s complement sum) of segment contents How is this different than 2 s complement? sender puts checksum value into UDP checksum field Receiver: compute checksum of received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected. But maybe errors nonetheless? More later. 20

Internet Checksum Example Note When adding numbers, a carryout from the most significant bit needs to be added to the result Example: add two 16-bit integers 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 wraparound 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 sum checksum 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 21

Port Scanning Technique used by black- and white-hat communities alike. Attempts to connect to a large number (usually all) of ports on a machine. Successful responses mean that a process is running. If you know what processes are running, you will be able to select the right exploit to launch. Most firewalls offer some protection against this. This is happening all the time on the Internet. The bad guys are constantly looking for a way in... 22

Port Scanning Tools nmap is the most popular tool for port scanning....and it is free... By seeing which ports are active, nmap can tell a lot about your machine. For instance, what OS you are running... Be careful to check with admins before running this! Most admins will automatically shut you down if you run it... 23