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

Transmission Control Protocol (TCP)
CISCO NETWORKING ACADEMY PROGRAM (CNAP)
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
Chapter 7 – Transport Layer Protocols
Network Protocols Mark Stanovich Operating Systems COP 4610.
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.
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.
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 Transport Layer Computer Networks. 2 Where are we?
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
University of the Western Cape Chapter 12: The Transport Layer.
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.
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.
Distributed systems (NET 422) Prepared by Dr. Naglaa Fathi Soliman Princess Nora Bint Abdulrahman University College of computer.
Networks and Distributed Systems Sarah Diesburg Operating Systems COP 4610.
Networks, Part 2 March 7, Networks End to End Layer  Build upon unreliable Network Layer  As needed, compensate for latency, ordering, data.
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Network Protocols Andy Wang Operating Systems COP 4610 / CGS 5765.
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
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
BASICS Gabriella Paolini (GARR) 27/05/11 - ICCU Roma 1 How INTERNET works !
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Ch23 Ameera Almasoud 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
Chapter 9: Transport Layer
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
Instructor Materials Chapter 9: Transport Layer
5. End-to-end protocols (part 1)
Process-to-Process Delivery, TCP and UDP protocols
CMPT 371 Data Communications and Networking
PART 5 Transport Layer Computer Networks.
TCP/IP Transmission Control Protocol / Internet Protocol
Chapter 6: Transport Layer (Part I)
Magda El Zarki Professor, ICS UC, Irvine
Process-to-Process Delivery:
Introduction of Transport Protocols
TCP - Part I Karim El Defrawy
Transport Layer Unit 5.
Sarah Diesburg Operating Systems COP 4610
The IP, TCP, UDP protocols
Process-to-Process Delivery:
CS4470 Computer Networking Protocols
Chapter 5 TCP Control Flow
Dr. John P. Abraham Professor UTPA
Switching Techniques.
CS4470 Computer Networking Protocols
Advanced Computer Networks
Dr. John P. Abraham Professor UTPA
CSC Advanced Unix Programming, Fall 2015
CPEG514 Advanced Computer Networkst
Net 323 D: Networks Protocols
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Introduction to Computer Networks
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Transport Layer 9/22/2019.
EEL 5718 Computer Communications
Presentation transcript:

Andy Wang Operating Systems COP 4610 / CGS 5765 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: packets Abstraction: messages Limited size Arbitrary size Unordered Ordered Unreliable Reliable Machine-to-machine Process-to-process Only on local area network Routed anywhere Asynchronous Synchronous Insecure Secure

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 X Account 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 If X crashes before step 4 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