Lecture Topics: 11/29 IP UDP TCP DNS. Homework 9 Write a simple web server –not as hard as it sounds Specification out tonight Skeleton code out by tomorrow.

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

CCNA – Network Fundamentals
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Internet -- network of networks –network delivers packets (& locates nodes) –router (gateway) moves packets between networks –IP interoperability on top.
Network Architectures Week 3 Part 2. Comparing The Internet & OSI.
Computer Networks Transport Layer. Topics F Introduction  F Connection Issues F TCP.
1 Reliability & Flow Control Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
Networking. Protocol Stack Generally speaking, sending an message is equivalent to copying a file from sender to receiver.
Gursharan Singh Tatla Transport Layer 16-May
Lecture 8 Modeling & Simulation of Communication Networks.
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.
The Transport Layer.
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
University of Calgary – CPSC 441.  UDP stands for User Datagram Protocol.  A protocol for the Transport Layer in the protocol Stack.  Alternative to.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
Operating Systems Lesson 10. Networking Communications protocol is the set of standard rules for ◦ Data representation ◦ Signaling ◦ Authentication ◦
Network Services Networking for Home & Small Business.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
TCP/IP Transport and Application (Topic 6)
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
1 CS 4396 Computer Networks Lab TCP/IP Networking An Example.
Transport Layer COM211 Communications and Networks CDA College Theodoros Christophides
Networking Fundamentals. Basics Network – collection of nodes and links that cooperate for communication Nodes – computer systems –Internal (routers,
Multimedia and Networks. Protocols (rules) Rules governing the exchange of data over networks Conceptually organized into stacked layers – Application-oriented.
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.
Lecture Topics: 11/27 Networks Layered Model Ethernet IP.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
Transport Protocols.
1 Transport Layer: Basics Outline Intro to transport UDP Congestion control basics.
Networks, Part 2 March 7, Networks End to End Layer  Build upon unreliable Network Layer  As needed, compensate for latency, ordering, data.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
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).
Ch. 23, 25 Q and A (NAT and UDP) Victor Norman IS333 Spring 2015.
Communication Networks NETW 501 Tutorial 2
Computer Networking Lecture 16 – Reliable Transport.
Process-to-Process Delivery:
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.
The Transport Layer Implementation Services Functions Protocols
Chapter 9: Transport Layer
Introduction to TCP/IP networking
Instructor Materials Chapter 9: Transport Layer
PART 5 Transport Layer Computer Networks.
TCP Transport layer Er. Vikram Dhiman LPU.
Subject Name: Computer Communication Networks Subject Code: 10EC71
Introduction of Transport Protocols
Topic 5: Communication and the Internet
Multimedia and Networks
Process-to-Process Delivery:
Advanced Computer Networks
CPEG514 Advanced Computer Networkst
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Presentation transcript:

Lecture Topics: 11/29 IP UDP TCP DNS

Homework 9 Write a simple web server –not as hard as it sounds Specification out tonight Skeleton code out by tomorrow morning Base implementation (80%) –return a requested file –report a few errors –<100 lines of code

Simple Web Server HTTP/ OK Date: Wed, 29 Nov :14:10 GMT Server: Apache/1.1.1 Content-Length: 183 Content-Type: text/html Connection: close 410 Web Page 410 is my favorite class. GET /index.html HTTP/1.0 Web Client Request:: Web Server Reply:

Homework 9 Continued Additional features (25%) do some of the following –generate an HTML index file based on the contents of a directory –create a web log that stores all accesses –keep “hit” counters for each file that are reported when the user accesses /hits –many more options You will need to learn how to use sockets –there will be links on the homework page and sample programs –not too hard You may need to read a little on HTTP and HTML –links on the web page

Open Issues What happens to the L1 cache on system calls? –the OS uses the L1 cache as usual –it only replaces invalid entries –user code will have to What is hub? –a hub logically only connects the wires between multiple computers or networks –a packet received on any wire is immediately forwarded to every other wire –it increases the size of the collision domain What is a switch? –a switch is like a hub except it only forwards packets towards the destination –it learns where other computers are by listening to where they send their packets from

Hubs vs. Switches Hubs forward packets everywhere (broadcast) –cheap –work best if the network is small Switches only forward toward the destination –more expensive –self-configuring –good for large networks C3 HUB C4 C1 C2 C5 C3 SWITCH C4 C1 C2 C5

Protocol Stack These layers comprise the protocol stack Each layer of the stack adds extra info to the packet Application Data IP HeaderApplication DataTCP Header Ethernet Header Ethernet Checksum Ethernet Frame IP HeaderApplication DataTCP Header IP Datagram Application DataTCP Header TCP Segment Application layer Transport layer Network layer Data link layer

IP Ethernet allows packets to be sent between nodes on the same network Internet Protocol (IP) allows packets to be sent between nodes on different networks Key idea: some machines (i.e. routers) are on multiple networks Ethernet is still used to send packets between routers

IP Routers R R R R R HH H H H R R H R Routers send packet to next closest point H: Hosts R: Routers YOU CNN

IP Addresses IP addresses are 4 bytes (e.g ) –part of the address designates the network (e.g ) –the rest of the address designates the machine on the network (e.g ) A router sends the packet to the correct network, and the network sends the packet to the correct node –this greatly reduces the information a router must store

How do routers know where to send packets? Forwarding tables at each router –Network == , then send to router X Original Internet: manual update Now: automatic update based on “cost” –exchange tables with neighbors –use neighbor with smallest hop count –what if node says zero cost to everywhere?

Setting up Routing Tables Graph theory to compute “shortest path” –routers = nodes –links = edges –delay, hops = cost Need dynamic computation to adapt to changes in topology –if a router goes down, might need to find another path

IP Routing Protocols There are two basic kinds of routing protocols Distance Vector –exchange routing tables with neighbors –no one knows complete topology –now used between admin domains (i.e. AT&T and MCI Link state –tell everyone who your neighbors are –everyone computes shortest path –now used within admin domains (within AT&T)

IP Service Model IP's service model is best-effort unreliable data-gram delivery IP does it's best to get a message from source to destination But it makes no guarantees that –the packet will arrive –the packets will arrive in order –the contents of the packet won't be changed –only one copy of the packet will arrive Aren't you glad the designers of IP don't design cars?

What IP can do Some are uncommon, but they all happen INTERNET HelloWorldHelloWorld Arrive in order INTERNET HelloWorld Lose a packet INTERNET HelloWorld Hello Reorder packets INTERNET HelloWorldHello World Duplicate packets INTERNET HelloWorldGoodbyeWorld Corrupt Packets

Checksum chksum hash Sent Data & Checksum Data to Send Received Data & Checksum chksum hash Calculated and stored checksum differ, so data is corrupt INTERNET Corrupted bits

User Datagram Protocol (UDP) UDP is basically IP with a data checksum and ports The checksum ensures that corrupted data isn't accepted Ports allow multiple connections to be de- multiplexed (TCP has ports too) –a port is a number between 0 and –common applications such as web servers run on "well-known ports" so web browsers know which port to contact –a UDP/TCP "connection" is determined by the Source IP address, Source port number, Destination IP address and Destination port number

UDP UDP characteristics (similar to IP) –unreliable (no guarantees the packet arrives) –packets could be reordered or duplicated –corrupted packets are discarded, but not retransmitted Who would ever want this? –common for low-latency applications where loss is tolerable (streaming media, games) –because reliable protocols (TCP) can be slower

Transmission Control Protocol TCP is what you usually want –reliable (messages guaranteed to eventually arrive) –dropped packets are retransmitted –duplicate packets are discarded –reordered packets are unreordered TCP is a bi-directional (i.e. full-duplex) stream based protocol –Both nodes can send and receive –Don't explicitly send packets, instead send a stream of bytes

Ensuring Packets Arrive w/ UDP Will you marry me? INTERNET ? No Answer--Did she get my proposal? Was the packet lost or corrupted? I better send it again Will you marry me? INTERNET ? Will you marry me? INTERNET ? Will you marry me? INTERNET ? Stalker!

Reliability with TCP With TCP, the receiver is obligated to send an acknowledgment (ACK), when it receives a packet The receiver is not obligated to respond with an answer, only an acknowledgement of receipt If the sender does not receive an ACK, it eventually retransmits the packet –can the receiver ever receive two copies of a packet? Will you marry me? INTERNET Will you marry me? Got your message

Timing Out Packet ACK Timeout Packet ACK Timeout Packet Timeout Packet ACK Timeout Packet ACK Timeout Packet ACK Timeout ACK lostPacket lost Early timeout Time SenderReceiverSenderReceiverSenderReceiver

Eliminating Duplicate Packets Problem: The receiver can still receive duplicate packets (either due to the Internet or a retransmission) –how do we distinguish a duplicate from another packet with the same contents? Solution: Send a sequence number with each packet –1st packet gets sequence number 0 –2nd packet gets sequence number 1 –retransmitted 1st packet has sequence number 0

Sequence Numbers Each new packet gets a new sequence number Don't send the next packet until the previous packet is acknowledged Pkt 0 ACK 0 Pkt 0 ACK 1 Pkt 1 ACK 0 Discard Duplicate

Sending Multiple Packets Sending one packet at a time is too slow –round trip time is 100ms –network has enough buffer space to hold several packets Idea: send lots of packets at once –receiver acknowledges the packets they receive –retransmit only unacked packets

Sending Multiple Packets Sender sends multiple packets at once Each packet that was not acknowledged is retransmitted Problem: –retransmit packets even if only ACKs are lost (e.g. packet 2) ACK 0 ACK 1 ACK 4 ACK 3 ACK 2

TCP Sending Packets In TCP, the receiver sends an acknowledgement after every packet The receiver acknowledges up to the last consecutive packet it received –receive "0" send "ack 0" I've received 0-0 –receive "1" send "ack 1" I've received 0-1 –receive "2" send "ack 2" I've received 0-2 –receive "4" send "ack 2" I've received 0-2 –receive "5" send "ack 2" I've received 0-2 It's okay if ACKs get lost –e.g. "ack 1" can be lost because "ack 2" covers it The sender can recognize if a packet was lost –Mmmmm? I've received 3 "ack 2"s, maybe packet 3 got lost

TCP ACKing The receiver acknowledges up to the last consecutive packet it received Packet 3 was lost, so the receiver sends an "ACK 2" when it receives packet 4, not an "ACK 4" The receiver must remember which packets it has received –it sends an "ACK 4" when it receives packet 3 because it received packet 4 earlier

Handling Reordered Packets TCP ensures that the data stream is delivered in-order Packets may arrive out- of-order TCP must buffer out-of- order packets until the missing packets arrive Packets are delivered to the application in the order they were sent, not the order they arrived ACK 0 ACK 1 ACK 2 ACK 4 Deliver Packet 0 Deliver Packet 1 Deliver Packet 2 Save Packet 4 Deliver Packets 3-4

Receive Window From the receiver's perspective there are three types of packets –packets received and acked –packets received out of order –packets not yet received The first missing packet through the highest received packet is known as the receive window –the receiver only has to buffer packets in the receive window Packet # Received?XXXXX Acknowledged?XXX Receive Window

Send Window From the sender's perspective there are three types of packets –packets sent and acked –packets sent and unacked –packets not yet sent All sent and unacked packets make up the send window –the sender must buffer all sent and unacked packets and all packets not yet sent Packet # Sent?XXXXXXX Received ack?XX Send Window

Sliding Window TCP is known as a sliding window protocol As packets are sent/received/ acknowledged, the sender and receiver windows slide through sequence numbers

Domain Name Service (DNS) IP must use IP addresses, e.g You want to type not DNS handles making this translation If the local DNS server doesn't know the translation, it asks one of the 13 root name- servers, which have known IP addresses Local DNS server ( ) What’s the IP address for Your computer ( ) Oh, you can find it at