COS 461: Computer Networks Spring 2008 (MW 1:30-2:50 in COS 105) Mike Freedman IP Packet Switching.

Slides:



Advertisements
Similar presentations
Switching Techniques In large networks there might be multiple paths linking sender and receiver. Information may be switched as it travels through various.
Advertisements

Introduction 2 1: Introduction.
Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IPv4 - The Internet Protocol Version 4
Fundamentals of Computer Networks ECE 478/578 Lecture #14: InternetWorking Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
COS 461: Computer Networks Spring 2011 Mike Freedman IP Packet Switching Reading: Sect
Intro (continued) and Design Principles Nick Feamster CS 3251: Computer Networking I Spring 2013.
1 EE 122: Designing IP Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson, Jennifer.
CPSC156a: The Internet Co-Evolution of Technology and Society Lecture 3: September 11, 2003 Internet Basics, continued Acknowledgments: R. Wang and J.
CPSC156: The Internet Co-Evolution of Technology and Society Lecture 2: January 18, 2007 Internet Basics, continued Acknowledgments: R. Wang and J. Rexford.
5/12/05CS118/Spring051 A Day in the Life of an HTTP Query 1.HTTP Brower application Socket interface 3.TCP 4.IP 5.Ethernet 2.DNS query 6.IP router 7.Running.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
Fundamentals of Computer Networks ECE 478/578 Lecture #2 Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University of Arizona.
Switching Techniques Student: Blidaru Catalina Elena.
Data Communications and Networking
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:
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
Chapter 4. After completion of this chapter, you should be able to: Explain “what is the Internet? And how we connect to the Internet using an ISP. Explain.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
CS162 Operating Systems and Systems Programming Lecture 13 Packet Switching March 7, 2011 Ion Stoica
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
UNIT IP Datagram Fragmentation Figure 20.7 IP datagram.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
Dr. John P. Abraham Professor UTPA
Chapter 81 Internet Protocol (IP) Our greatest glory is not in never failing, but in rising up every time we fail. - Ralph Waldo Emerson.
Computer Networks with Internet Technology William Stallings
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Don Montgomery, CSE 4344, School of Engineering, Southern Methodist UniversityChapter 4, slide 1 routing at the network layer, related topics 1. IP addressing,
CS 4396 Computer Networks Lab
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.
Lecture Topics: 11/27 Networks Layered Model Ethernet IP.
Lecture 2: Packet Switching Reading: Sections 3.1, 3.4 CMSC 23300/33300 Computer Networks ?
1 Computer Communication & Networks Lecture 19 Network Layer: IP and Address Mapping Waleed Ejaz.
1 IEX8175 RF Electronics Avo Ots telekommunikatsiooni õppetool, TTÜ raadio- ja sidetehnika inst.
Transport Protocols.
1 Transport Layer: Basics Outline Intro to transport UDP Congestion control basics.
1 Switching and Forwarding Sections Connecting More Than Two Hosts Multi-access link: Ethernet, wireless –Single physical link, shared by multiple.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
Computer Networks Chapter 8 – Circuit Switching versus Packet Switching.
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 Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Muhammad Waseem Iqbal Lecture # 20 Data Communication.
Introduction to TCP/IP networking
Switching Techniques In large networks there might be multiple paths linking sender and receiver. Information may be switched as it travels through various.
Transport Layer Unit 5.
Chapter 20 Network Layer: Internet Protocol
Network Core and QoS.
Process-to-Process Delivery:
Network Layer Mike Freedman COS 461: Computer Networks
Switching Techniques.
Net 323 D: Networks Protocols
COS 461: Computer Networks
Process-to-Process Delivery: UDP, TCP
ITIS 6167/8167: Network and Information Security
NET 323D: Networks Protocols
Network Core and QoS.
Unit – III Network Essentials
Presentation transcript:

COS 461: Computer Networks Spring 2008 (MW 1:30-2:50 in COS 105) Mike Freedman IP Packet Switching

Goals of Today’s Lecture Connectivity – Links and nodes – Circuit switching – Packet switching IP service model – Best-effort packet delivery – IP as the Internet’s “narrow waist” – Design philosophy of IP IP packet structure – Fields in the IP header – Traceroute using TTL field – Source-address spoofing 2

Simple Network: Nodes and a Link Node: computer – End host: general-purpose computer, cell phone, PDA – Network node: switch or router Link: physical medium connecting nodes – Twisted pair: the wire that connects to telephones – Coaxial cable: the wire that connects to TV sets – Optical fiber: high-bandwidth long-distance links – Space: propagation of radio waves, microwaves, … 3 NodeLinkNode

Network Components 4 Fibers Coaxial Cable LinksInterfacesSwitches/routers Ethernet card Wireless card Large router Telephone switch

Links: Delay and Bandwidth Delay – Latency for propagating data along the link – Corresponds to the “length” of the link – Typically measured in seconds Bandwidth – Amount of data sent (or received) per unit time – Corresponds to the “width” of the link – Typically measured in bits per second 5 bandwidth delay delay x bandwidth

Connecting More Than Two Hosts Multi-access link: Ethernet, wireless – Single physical link, shared by multiple nodes – Limitations on distance and number of nodes Point-to-point links: fiber-optic cable – Only two nodes (separate link per pair of nodes) – Limitations on the number of adapters per node 6 multi-access link point-to-point links

Beyond Directly-Connected Networks Switched network – End hosts at the edge – Network nodes that switch traffic – Links between the nodes Multiplexing – Many end hosts communicate over the network – Traffic shares access to the same links 7

Circuit Switching (e.g., Phone Network) Source establishes connection to destination – Node along the path store connection info – Nodes may reserve resources for the connection Source sends data over the connection – No destination address, since nodes know path Source tears down connection when done 8

Circuit Switching With Human Operator 9

Circuit Switching: Multiplexing a Link Time-division – Each circuit allocated certain time slots Frequency-division – Each circuit allocated certain frequencies 10 time frequency time

Advantages of Circuit Switching Guaranteed bandwidth – Predictable communication performance – Not “best-effort” delivery with no real guarantees Simple abstraction – Reliable communication channel between hosts – No worries about lost or out-of-order packets Simple forwarding – Forwarding based on time slot or frequency – No need to inspect a packet header Low per-packet overhead – Forwarding based on time slot or frequency – No IP (and TCP/UDP) header on each packet 11

Disadvantages of Circuit Switching Wasted bandwidth – Bursty traffic leads to idle conn during silent period – Unable to achieve gains from statistical multiplexing Blocked connections – Connection refused when resources are not sufficient – Unable to offer “okay” service to everybody Connection set-up delay – No communication until the connection is set up – Unable to avoid extra latency for small data transfers Network state – Network nodes must store per-connection information – Unable to avoid per-connection storage and state 12

Packet Switching (e.g., Internet) Data traffic divided into packets – Each packet contains a header (with address) Packets travel separately through network – Packet forwarding based on the header – Network nodes may store packets temporarily Destination reconstructs the message 13

Packet Switching: Statistical Multiplexing 14 Packets

IP Service: Best-Effort Packet Delivery 15 Packet switching – Divide messages into a sequence of packets – Headers with source and destination address Best-effort delivery – Packets may be lost – Packets may be corrupted – Packets may be delivered out of order source destination IP network

IP Service Model: Why Packets? Data traffic is bursty – Logging in to remote machines – Exchanging messages Don’t want to waste bandwidth – No traffic exchanged during idle periods Better to allow multiplexing – Different transfers share access to same links Packets can be delivered by most anything – RFC 1149: IP Datagrams over Avian Carriers … still, packet switching can be inefficient – Extra header bits on every packet 16

IP Service Model: Why Best-Effort? IP means never having to say you’re sorry… – Don’t need to reserve bandwidth and memory – Don’t need to do error detection & correction – Don’t need to remember from one packet to next Easier to survive failures – Transient disruptions are okay during failover … but, applications do want efficient, accurate transfer of data in order, in a timely fashion 17

IP Service: Best-Effort is Enough No error detection or correction – Higher-level protocol can provide error checking Successive packets may not follow the same path – Not a problem as long as packets reach the destination Packets can be delivered out-of-order – Receiver can put packets back in order (if necessary) Packets may be lost or arbitrarily delayed – Sender can send the packets again (if desired) No network congestion control (beyond “drop”) – Sender can slow down in response to loss or delay 18

Layering in the IP Protocols 19 Internet Protocol Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Telnet HTTP SONETATM Ethernet RTPDNS FTP

History: Why IP Packets? IP proposed in the early 1970s – Defense Advanced Research Project Agency (DARPA) Goal: connect existing networks – To develop an effective technique for multiplexed utilization of existing interconnected networks – E.g., connect packet radio networks to the ARPAnet Motivating applications – Remote login to server machines – Inherently bursty traffic with long silent periods Prior ARPAnet experience with packet switching – Previous DARPA project – Demonstrated store-and-forward packet switching 20

Other Main Driving Goals (In Order) Communication should continue despite failures – Survive equipment failure or physical attack – Traffic between two hosts continue on another path Support multiple types of communication services – Differing requirements for speed, latency, & reliability – Bidirectional reliable delivery vs. message service Accommodate a variety of networks – Both military and commercial facilities – Minimize assumptions about the underlying network 21

Other Driving Goals, Somewhat Met Permit distributed management of resources – Nodes managed by different institutions – … though this is still rather challenging Cost-effectiveness – Statistical multiplexing through packet switching – … though packet headers and retransmissions wasteful Ease of attaching new hosts – Standard implementations of end-host protocols – … though still need a fair amount of end-host software Accountability for use of resources – Monitoring functions in the nodes – … though this is still fairly limited and immature 22

IP Packet Structure 4-bit Version 4-bit Header Length 8-bit Type of Service (TOS) 16-bit Total Length (Bytes) 16-bit Identification 3-bit Flags 13-bit Fragment Offset 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload

IP Header: Version, Length, ToS Version number (4 bits) – Indicates the version of the IP protocol – Necessary to know what other fields to expect – Typically “4” (for IPv4), and sometimes “6” (for IPv6) Header length (4 bits) – Number of 32-bit words in the header – Typically “5” (for a 20-byte IPv4 header) – Can be more when “IP options” are used Type-of-Service (8 bits) – Allow packets to be treated differently based on needs – E.g., low delay for audio, high b/w for bulk transfer 24

IP Header: Length, Fragments, TTL Total length (16 bits) – Number of bytes in the packet – Maximum size is 63,535 bytes ( ) – … though underlying links may impose harder limits Fragmentation information (32 bits) – Packet identifier, flags, and fragment offset – Supports dividing a large IP packet into fragments – … in case a link cannot handle a large IP packet – … so why do we typically send max MTU packets? Time-To-Live (8 bits) – Used to identify packets stuck in forwarding loops – … and eventually discard them from the network 25

IP Header: More on Time-to-Live (TTL) Potential robustness problem – Forwarding loops can cause packets to cycle forever – Confusing if the packet arrives much later Time-to-live field in packet header – TTL field decremented by each router on the path – Packet is discarded when TTL field reaches 0… – …and “time exceeded” message is sent to the source 26

IP Header: Use of TTL in Traceroute Time-To-Live field in IP packet header – Source sends a packet with a TTL of n – Each router along the path decrements the TTL – “TTL exceeded” sent when TTL reaches 0 Traceroute tool exploits this TTL behavior 27 source destination TTL=1 Time exceeded TTL=2 Send packets with TTL=1, 2, … and record source of “time exceeded” message

Example Traceroute: Berkeley to CNN * * Hop number, IP address, DNS name inr-daedalus-0.CS.Berkeley.EDU soda-cr-1-1-soda-br-6-2 vlan242.inr-202-doecev.Berkeley.EDU gigE6-0-0.inr-666-doecev.Berkeley.EDU qsv-juniper--ucb-gw.calren2.net POS1-0.hsipaccess1.SanJose1.Level3.net ? pos8-0.hsa2.Atlanta2.Level3.net pop2-atm-P0-2.atdn.net ? pop1-atl-P4-0.atdn.net www4.cnn.com No response from router No name resolution

Try Running Traceroute Yourself On UNIX machine – Traceroute – E.g., “traceroute cnn.com” or “traceroute ”cnn.com On Windows machine – Tracert – E.g., “tracert cnn.com” or “tracert ”cnn.com Common uses of traceroute – Discover the topology of the Internet – Debug performance and reachability problems 29

IP Header Fields: Transport Protocol Protocol (8 bits) – Identifies the higher-level protocol E.g., “6” for the Transmission Control Protocol (TCP) E.g., “17” for the User Datagram Protocol (UDP) – Important for demultiplexing at receiving host Indicates what kind of header to expect next 30 IP header TCP headerUDP header protocol=6protocol=17

IP Header: Checksum on the Header Checksum (16 bits) – Sum of all 16-bit words in the IP packet header – If any bits of the header are corrupted in transit – … the checksum won’t match at receiving host – Receiving host discards corrupted packets Sending host will retransmit the packet, if needed = = 350 Mismatch!

IP Header: To and From Addresses Two IP addresses – Source IP address (32 bits) – Destination IP address (32 bits) Destination address – Unique identifier for the receiving host – Allows each node to make forwarding decisions Source address – Unique identifier for the sending host – Recipient can decide whether to accept packet – Enables recipient to send a reply back to source 32

Source Address: What if Source Lies? Source address should be the sending host – But, who’s checking, anyway? – You could send packets with any source you want Why would someone want to do this? – Launch a denial-of-service attack Send excessive packets to the destination … to overload the node, or the links leading to the node – Evade detection by “spoofing” But, the victim could identify you by the source address So, you can put someone else’s source address in the packets – Also, an attack against the spoofed host Spoofed host is wrongly blamed Spoofed host may receive return traffic from the receiver 33

Summary: Packet Switching Review Efficient – Can send from any input that is ready General – Multiple types of applications Accommodates bursty traffic – Addition of queues Store and forward – Packets are self contained units – Can use alternate paths – reordering Contention (i.e., no isolation) – Congestion – Delay 34

Next Lecture IP routers – Packet forwarding – Components of a router Reading for this week – Chapter 3: Sections 3.1 and 3.4 – Chapter 4: Sections Please subscribe to the course mailing list –