UDP, TCP/IP, and IP Multicast COM S 414 Sunny Gleason, Vivek Uppal Tuesday, October 23 rd, 2001.

Slides:



Advertisements
Similar presentations
1 Transport Protocols & TCP CSE 3213 Fall April 2015.
Advertisements

CCNA – Network Fundamentals
© 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)
Intermediate TCP/IP TCP Operation.
Guide to TCP/IP, Third Edition
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
TELE202 Lecture 14 TCP/UDP (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »TCP/UDP (1) »Source: chapter 17 ¥This Lecture »TCP/UDP (2) »Source: chapter.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
CS335 Networking & Network Administration Tuesday, April 20, 2010.
1 CCNA 2 v3.1 Module Intermediate TCP/IP CCNA 2 Module 10.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
CS514: Intermediate Course in Operating Systems Professor Ken Birman Ben Atkin: TA Lecture 5: Sept. 7.
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:
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 3: TCP/IP Architecture.
Lecture 2 TCP/IP Protocol Suite Reference: TCP/IP Protocol Suite, 4 th Edition (chapter 2) 1.
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
1 Chapter Overview TCP/IP DoD model. 2 Network Layer Protocols Responsible for end-to-end communications on an internetwork Contrast with data-link layer.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
Huda AL_Omairl - Network 71 Protocols and Network Software.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
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)
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Networked & Distributed Systems TCP/IP Transport Layer Protocols UDP and TCP University of Glamorgan.
Chapter 6-2 the TCP/IP Layers. The four layers of the TCP/IP model are listed in Table 6-2. The layers are The four layers of the TCP/IP model are listed.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
The Transport Layer application transport network data link physical application transport network data link physical application transport network data.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
TCP/IP Honolulu Community College Cisco Academy Training Center Semester 2 Version 2.1.
Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
Networking Basics CCNA 1 Chapter 11.
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.
Institute of Technology Sligo - Dept of Computing Chapter 12 The Transport Layer.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
Transport Protocols.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
© 2002, Cisco Systems, Inc. All rights reserved..
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 3: Transport.
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).
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
The Transport Layer Implementation Services Functions Protocols
Introduction to TCP/IP networking
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
5. End-to-end protocols (part 1)
Magda El Zarki Professor, ICS UC, Irvine
Introduction of Transport Protocols
Transport Layer Unit 5.
Transport Layer Our goals:
Process-to-Process Delivery:
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Presentation transcript:

UDP, TCP/IP, and IP Multicast COM S 414 Sunny Gleason, Vivek Uppal Tuesday, October 23 rd, 2001

In This Lecture We will build on understanding of IP (Internet Protocol) –UDP: User Datagram Protocol Unreliable, packet-based protocol –TCP: Transmission Control Protocol Reliable, connection-oriented, stream-based protocol –IP Multicast (if time allows…) Facilities for delivering datagrams to multiple recipients –We won’t discuss ICMP (Internet Control Message Protocol), but you can look it up if you want

Where To Find More Info For More “Practical” Information –Network Programming in Java The Java Custom Networking Trail –Network Programming in C Books by W. Richard Stevens [HIGHLY recommended!] –“TCP/IP Illustrated” Series –UNIX Network Programming, Vol. 1 –Kernel Source – “Real” Protocol Stacks Linux TCP/IP Stack – OpenBSD TCP/IP Stack –ftp://ftp.openbsd.org/pub/OpenBSD/src/sys/netinet/ftp://ftp.openbsd.org/pub/OpenBSD/src/sys/netinet/

Where to Find More Info Papers, Lecture Notes and RFC’s –TCP Congestion Control Van Jacobson, “Congestion Avoidance and Control”, 1988 Internet RFC Series: –CS514 - Fall 2000 Lecture Notes –Birman, Kenneth. Building Secure and Reliable Network Applications

First, some definitions… Keep the OSI Layers in mind! Address –An identifier, following an addressing convention, which allows a machine to be uniquely identified MAC Address, or Hardware Address –Numeric address used by Ethernet (data-link layer) –Might look like: “00:02:2D:08:68:F8” IP Address –Numeric address used by IP (network layer) –Might look like: “ ”

First, some definitions… Packet, or Datagram –self-contained unit of information –consists of a header and body Packet Header –For now, realize that it includes source address, destination address –With layered model, “nesting” of headers

First, some definitions… Local Area Network (LAN) –Group of machines sharing a common communications medium (such as Ethernet) –High data rates, “private wires”, shorter distances Wide Area Network (WAN) –spans a greater geographic area, may depend on publicly available network structures (telephone system, leased lines, satellites…)

First, some definitions… Router –Machine that moves packets from one network to a network that is closer to the destination –(Based on a routing table, which may change) Bridge –A machine that “indiscriminantly” replicates packets between two LANs –typically “not as smart” but faster than a router Gateway –A machine that routes packets from the LAN to the WAN (What is a Firewall?)

First, some definitions… Port –In UDP and TCP, a number which the kernel uses to deliver datagrams to the appropriate application –For instance: HTTP is port 80, SMTP is port 25, Telnet is port 23, DNS is port 53, FTP is port 21 In this model, receivers agree to wait for datagrams on a specified port Socket: {address, port}

The Internet A network based on the Internet Protocol (IP) = Router

The Internet Routes IP Datagrams from point A to point B … [unreliably] = Router A: B:

Unreliably? What good is that? Packet loss rate is extremely low (<< 1%) Packets usually dropped by overloaded routers (as we’ll see later) This is good enough for us to build the User Datagram Protocol (UDP)

UDP For applications where IP guarantees of reliability are good-enough –Streaming multimedia, stock quotes… Extends IP packet with source port, destination port In addition, provides fragmentation (and checksum)

Fragmentation in UDP Very simple: splits large UDP datagram into multiple IP datagrams, each with a sequence number Marks “fragmented” bit in the UDP header If one fragment is lost, the whole UDP packet is discarded UDP datagrams are discarded if checksum fails

The UDP API No-frills! Basically, you: –Create a socket {address, port} –Send data to a remote socket –Receive data on a given socket No guarantees about reliability, or even the ordering in which datagrams are received How can we get around this?

Adding Reliability to UDP Timeouts & Acknowledgements –Receiver sends acks of received datagrams –If sender does not receive ack within a certain time, retransmit the packet Sequence Numbers –Sender marks datagrams with sequence numbers –Receiver uses sequence numbers to restore order to the datagrams, and ignore duplicates What if we have 100 or more concurrent applications? Is this efficient?

TCP A TCP connection is defined by: –{ src_addr, src_port, dst_addr, dst_port } –Note symmetry at both ends of connection –Thus, sender is a receiver and vice-versa The goal: a reliable, stream-based, connection-oriented protocol –Reliable: data gets through [or connection breaks] –Stream-based: imagine reading a file in-order –Connection-oriented: point-to-point How is it all done?

Vivek Presents … The inner workings of the TCP protocol… Any questions before we move on?

TCP TCP – Stream Protocol 3-way Handshake Closing a connection Acknowledgments Sliding Window Flow Control RED

TCP -- Stream Protocol Connection oriented like a telephone connection Needs set up before the transfer starts. Reliable, point to point communication. In order delivery No loss or duplication. Flow Control and error correction Duplex connections

3 Way Hand Shake TCP is connection Oriented Connection initiated by a 3 - way handshake Takes 3 packets Protection against duplicate Syn Packets A B Syn Syn, Ack Of Syn Ack Of Syn

Basic 3 Way Handshake TCP A TCP B SEQ ACK CTL 1. CLOSED LISTEN 2. SYN-SENT   SYN-RECV 3. ESTABLISH   SYN-RECV 4. ESTABLISH   ESTABLISH

Duplicate Recovery TCP A TCP B SEQ ACK CTL 1. CLOSED LISTEN 2. SYN-SENT  (duplicate)...  SYN-RECV 4.   (duplicate) 5.   LISTEN   SYN-RECV 7. SYN-SENT   SYN-RECV 8. ESTABLISH   ESTABLISH

3 Way Handshake It ensures that both sides are ready to transmit data, and that both ends know that the other end is ready before transmission actually starts. It allows both sides to pick the initial sequence number to use.

Closing a Connection Fin, Ack Ack of Fin AB Send a Fin packet before tearing the connection Both processes must send Fin packets separately for closing the connection in that direction

Closing a Connection TCP A TCP B SEQ ACK CTL 1. ESTABLISHED ESTABLISHED 2. (Close) FIN   5.   CLOSED 3. FIN  CLOSE-WAIT 4. (Close)  LAST-ACK

Acknowledgements Receiver acks only the last in-order packet received Send nacks for out-of-order packets Sender resends the first unacknowledged packet timeout typically set to 1.5 * round trip times

Sliding Window Initially Empty The sender window has k segments (buffers)

Sliding Window m[i] Empty Send message m[i] m[i]

Sliding Window m[i] m[i+1] … … m[i+k] m[i] m[i+1] ack

Sliding Window m[i+2] m[i+3] … … m[i+k+1] m[i+2] m[i+3] ack m[i] m[i+1] Have been acked

TCP Congestion Control Dynamically adjust window size Sender should not swamp the receiver – both sides advertise maximum window size Linear increase -- When packets are getting through, increment the window size by 1. When a packet is dropped, halve the window size, and double the retransmission timeouts -- exponential backoff. Also called TCP fairness/friendliness

TCP Slow start Might take some time to get to the maximum possible window size Optimization: Exponential increase to start with. Then follow the linear increase exponential back off when the first packet is lost

RED Random Early Detection Idea is very simple Router senses that load is increasing It simply notices that it has less available memory for buffering This is because packets are entering faster than they can be forwarded

RED … Picks a packet at random and discards it Even though perhaps it could be forwarded Receiver detects the loss and sends a NACK The network isn’t completely overloaded yet so the NACK gets through Sender chokes back

Sunny Presents IP Multicast … Any questions before we move on? Note: Slides were stolen from CS514 FA2000 Web site

Unicast to multiple hosts

Multicast to multiple hosts “to group”

Why do multicast? Send to a group, not to individual hosts –Reduces overhead in sender –Reduces bandwidth consumption in network –Reduces latency seen by receivers (all receive “at the same time”, in theory)

Logical addressing Multicast groups “handled by network” Senders, receivers do not need to know each others’ identities Group persists as long as it has at least one member a “rendezvous” mechanism

Applications Teleconferencing Distance learning Multimedia streaming Directory service lookup...

Multicasting for resource location Expanding-ring search We want to find an instance of a resource (database, etc) which is close by Use multicast with IP time-to-live (TTL) values

Time-to-live and hop counts TTL is a counter in the packet header –Decrement at each “hop” through a router –When TTL reaches zero, the packet is dropped –special values for “global” and “regional” TTL (use with care!)

Expanding-ring search “Find me a database”, TTL=1

Expanding-ring search “Find me a database”, TTL=2 “I’m a database, what can I do for you?”

Multicast addresses Class D IP addresses for group – to Treated like any other IP address: can send from it or listen to it In practice, use UDP as well (more on this later)

Multicast at the LAN level Ethernet is a broadcast medium: all network cards see all packets Register the multicast address in the network card –only pass matching packets to OS –all other packets are ignored

Multicast beyond the LAN We would like to multicast between hosts on different LANs –LANs are joined together directly by bridges –or can be connected through the Internet by a sequence of routers –need an inter-LAN (WAN) protocol (in fact, this is rarely enabled!)

A naive approach We want to send multicasts everywhere where there are group members –use flooding to send multicast between routers –when we get to a LAN, use regular (Ethernet) multicast

Multicast by flooding non-membergroup memberrouter

Multicast by flooding non-membergroup memberrouter

Why simple flooding doesn’t work non-membergroup memberrouter

Why simple flooding doesn’t work non-membergroup memberrouter wasted!

Multicast flooding Not a scalable mechanism –every LAN sees every multicast –every WAN router sees every multicast: wastes bandwidth, CPU Requires a two-part solution –determining LAN group members –omitting WAN routers from multicast

Multicast trees Shortest-path tree to all multicast members, rooted at sender But must be computed independently by each router And must be dynamically adjusted for joins and leaves

A multicast tree

IGMP Internet Group Management Protocol (Deering and Cheriton) Developed from work in V distributed operating system –introduced notion of process groups (Cheriton and Zwaenepol) –groups for services, e.g. name resolution, remote paging

IGMP Detects if a multicast group has any members within a LAN Query and report messages –router sends query of group membership periodically –hosts report groups they’re in

IGMP Internet “Who is a member?”

IGMP Internet “I am”

IGMP Internet “I am”

Avoiding overloading Report packets may overload router –upon getting a query, each group member sets a timer –if it sees a report for its group before the timer expires, it suppresses its report –otherwise reports on expiration

THE END! Any questions? Slides will be put up on the web If interested, check out the sources for more information