Network Protocols Andy Wang Operating Systems COP 4610 / CGS 5765.

Slides:



Advertisements
Similar presentations
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Advertisements

© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
CSCI 4550/8556 Computer Networks
Transmission Control Protocol (TCP)
Guide to TCP/IP, Third Edition
CISCO NETWORKING ACADEMY PROGRAM (CNAP)
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Chapter 7 – Transport Layer Protocols
Network Protocols Mark Stanovich Operating Systems COP 4610.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
CS162 Operating Systems and Systems Programming Lecture 22 Networking II November 16, 2005 Prof. John Kubiatowicz
Network Protocols Sarah Diesburg Operating Systems CS 3430.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
1 More on Distributed Coordination. 2 Who’s in charge? Let’s have an Election. Many algorithms require a coordinator. What happens when the coordinator.
Ch 23 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
Process-to-Process Delivery:
Gursharan Singh Tatla Transport Layer 16-May
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Process-to-Process Delivery:
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
26-TCP Dr. John P. Abraham Professor UTPA. TCP  Transmission control protocol, another transport layer protocol.  Reliable delivery  Tcp must compensate.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
University of the Western Cape Chapter 12: The Transport Layer.
3: Transport Layer 3a-1 8: Principles of Reliable Data Transfer Last Modified: 10/15/2015 7:04:07 PM Slides adapted from: J.F Kurose and K.W. Ross,
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion.
23.1 Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
COSC 3407: Operating Systems Lecture 21: Network Protocols.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
Distributed systems (NET 422) Prepared by Dr. Naglaa Fathi Soliman Princess Nora Bint Abdulrahman University College of computer.
ECE 4110 – Internetwork Programming
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Networks, Part 2 March 7, Networks End to End Layer  Build upon unreliable Network Layer  As needed, compensate for latency, ordering, data.
CS/EE 145A Reliable Transmission over Unreliable Channel II Netlab.caltech.edu/course.
1 Version 3.1 Module 10 Intermediate TCP/IP (Layer 4)
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
Computer Networking Lecture 16 – Reliable Transport.
Ch 3. Transport Layer Myungchul Kim
Ch 3. Transport Layer Myungchul Kim
Chapter 9 The Transport Layer The Internet Protocol has three main protocols that run on top of IP: two are for data, one for control.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
5. End-to-end protocols (part 1)
Process-to-Process Delivery, TCP and UDP protocols
PART 5 Transport Layer Computer Networks.
Introduction of Transport Protocols
Sarah Diesburg Operating Systems COP 4610
Chapter 5 TCP Control Flow
Advanced Computer Networks
Andy Wang Operating Systems COP 4610 / CGS 5765
CPEG514 Advanced Computer Networkst
Computer Networks Protocols
Transport Layer 9/22/2019.
Presentation transcript:

Network Protocols Andy Wang Operating Systems COP 4610 / CGS 5765

Protocol An agreement between two parties as to how information is to be transmitted A network protocol abstracts packets into messages

Physical Reality vs. Abstraction Physical reality: packetsAbstraction: messages Limited sizeArbitrary size UnorderedOrdered UnreliableReliable Machine-to-machineProcess-to-process Only on local area networkRouted anywhere AsynchronousSynchronous InsecureSecure

Arbitrary-Size Messages Can be built on top of limited-size ones By splitting a message into fix-sized packets Checksum can be computed on each fragment or the whole message

Internet Protocol (IP) Provides unreliable, unordered, machine-to-machine transmission of arbitrary-size messages

Process-to-Process Communications Built on top of machine-to-machine communications through the use of port addresses Each message contains the destination port to talk to the correct process

Unreliable Data Protocol (UDP) Provides unreliable, unordered, user-to- user communication Built on the top of IP

Ordered Messages Built on top of unordered ones Use sequence numbers to indicate the order of arrival Specific to a connection If packet 3 arrives before packet 2, wait for packet 2. Always deliver packets in order, to user applications

Reliable Message Delivery Built on top of unreliable delivery Problem: Network infrastructure can garble messages Packets can be dropped if network buffers are full

Solution Checksum each message At a receiver, discard messages with mismatching checksums A receiver acknowledges if a packet is received properly A sender resends the same message after not hearing the acknowledgment for some time (a timeout period)

A Minor Problem A sender may send twice, if the first acknowledge is lost The receiver needs to discard duplicate packets

Implications A sender needs to buffer messages that are not yet acknowledged The receiver must track messages that could be duplicates

Transmission Control Protocol (TCP) Provides a reliable byte stream between two processes on different machines over the Internet sequence number: 1 checksum: fa73cd10

Transmission Control Protocol Fragments the byte stream into packets and hands them to IP

TCP Message Categories Sender Sent and acknowledged Sent and not acknowledged Not yet sent Receiver Forwarded to application Received and buffered Not yet received

More on the Sequence Number Need a way to recycle sequence numbers Each TCP packet has a time-to-live field If the packet is not delivered in X seconds The packet is dropped Sequence numbers can be reused An epoch number used to identify which set of sequence numbers is being used Incremented at each boot Stored on disk

Congestion Implications of timeout period at a sender Too long  unnecessary waiting Too short  a message is transmitted when an acknowledgement is in transit Network congestion  delayed acknowledgement  timeout  data retransmission  more congestion

TCP Solution Slow start: TCP starts by sending a small amount of data If no timeout, more data is sent If timeout, TCP reduces the amount of data being sent

The Byzantine Generals’ Problem Two generals are on the tops of two mountains… They communicate only through messengers… They need to coordinate the attack… If they attack at the same time, they win… If they attack at different times, they will…die…

The Byzantine Generals’ Problem Question: can they guarantee a synchronized attack?

The Byzantine Generals’ Problem Illustrated General X 11am OK? So, 11am it is. General Y 11am sounds good Yeah, what if you don’t get this ack?

The Byzantine Generals’ Problem Over an unreliable network, we cannot guarantee that two computers will synchronize

Distributed Transaction Multiple machines agree to do something atomically, but not necessarily at exactly the same time Mechanism: two-phase commit

Two-Phase Commit Account XAccount Y Phase 1: ask if each can commit 1. Begin transaction Ask Y for $1 Enough cash 2. Write “Y = Y - $1” Ready to commit Phase 2: commit 3. Write “X = X + $1” 4. Commit Ask Y to commit 5. Commit

Scenarios If X crashes between 1 and 2 Y will wake up and do nothing X will timeout and abort the transaction If X crashes before step 4 X will wake up and abort the transaction If X crashes between 4 and 5 Y will timeout and ask X for the transaction

Scenarios If Y crashes between 2 and 5 Y will wake up and check the log When X sends Y the commit message, Y will commit Y can also timeout and ask X the current status