Lecture 2: Packet Switching Reading: Sections 3.1, 3.4 CMSC 23300/33300 Computer Networks ?

Slides:



Advertisements
Similar presentations
Network and Application Attacks Contributed by- Chandra Prakash Suryawanshi CISSP, CEH, SANS-GSEC, CISA, ISO 27001LI, BS 25999LA, ERM (ISB) June 2006.
Advertisements

Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
CCNA – Network Fundamentals
COS 461: Computer Networks Spring 2011 Mike Freedman IP Packet Switching Reading: Sect
1 EE 122: Designing IP Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson, Jennifer.
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.
CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
Internet Control Message Protocol (ICMP). Introduction The Internet Protocol (IP) is used for host-to-host datagram service in a system of interconnected.
CPSC156a: The Internet Co-Evolution of Technology and Society Lecture 3: September 11, 2003 Internet Basics, continued Acknowledgments: R. Wang and J.
1 CCNA 2 v3.1 Module 8. 2 TCP/IP Suite Error and Control Messages CCNA 2 Module 8.
COS 461: Computer Networks Spring 2008 (MW 1:30-2:50 in COS 105) Mike Freedman IP Packet Switching.
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.
1 ICMP : Internet Control Message Protocol Computer Network System Sirak Kaewjamnong.
Data Communications and Networking
Process-to-Process Delivery:
CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College
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.
Page 19/13/2015 Chapter 8 Some conditions that must be met for host to host communication over an internetwork: a default gateway must be properly configured.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
Internet Control Message Protocol (ICMP). Objective l IP and ICMP l Why need ICMP? l ICMP Message Format l ICMP fields l Examples: »Ping »Traceroute.
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.
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.
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
1 An Error Reporting Mechanism (ICMP). 2 IP Semantics IP is best-effort Datagrams can be –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
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.
Cisco 2 - Routers Perrine. J Page 112/19/2015 Chapter 8 TCP/IP Error Message Some of the conditions that must be met in order for host to host communication.
ICMPv6 Error Message Types Informational Message Types.
1 Computer Communication & Networks Lecture 19 Network Layer: IP and Address Mapping Waleed Ejaz.
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.
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:
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 8 TCP/IP Suite Error and Control Messages.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Muhammad Waseem Iqbal Lecture # 20 Data Communication.
The Transport Layer Implementation Services Functions Protocols
Introduction to TCP/IP networking
21-2 ICMP(Internet control message protocol)
Network Core and QoS.
Process-to-Process Delivery:
CS 457 – Lecture 11 More IP Networking
Network Layer Mike Freedman COS 461: Computer Networks
Net 323 D: Networks Protocols
COS 461: Computer Networks
Process-to-Process Delivery: UDP, TCP
ITIS 6167/8167: Network and Information Security
Internet Control Message Protocol
NET 323D: Networks Protocols
Network Core and QoS.
Presentation transcript:

Lecture 2: Packet Switching Reading: Sections 3.1, 3.4 CMSC 23300/33300 Computer Networks ?

2 Class Logistics l Slides online at u l Sign up for the course list u sc33300

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

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

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

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

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

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

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

10 Circuit Switching With Human Operator

11 Circuit Switching: Multiplexing a Link l Time-division u Each circuit allocated certain time slots l Frequency-division u Each circuit allocated certain frequencies time frequency time

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

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

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

15 Packet Switching: Statistical Multiplexing Packets

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

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

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

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

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

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

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

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

24 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

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

26 IP Packet Header Fields (Continued) l Total length (16 bits) u Number of bytes in the packet u Maximum size is 63,535 bytes ( ) u … though underlying links may impose harder limits l Fragmentation information (32 bits) u Packet identifier, flags, and fragment offset u Supports dividing a large IP packet into fragments u … in case a link cannot handle a large IP packet l Time-To-Live (8 bits) u Used to identify packets stuck in forwarding loops u … and eventually discard them from the network

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

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

29 IP Packet Header (Continued) l Two IP addresses u Source IP address (32 bits) u Destination IP address (32 bits) l Destination address u Unique identifier for the receiving host u Allows each node to make forwarding decisions l Source address u Unique identifier for the sending host u Recipient can decide whether to accept packet u Enables recipient to send a reply back to source

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

31 Error Reporting l Examples of errors a router may see u Router doesn’t know where to forward a packet u Packet’s time-to-live field expires l Router doesn’t really need to respond u Best effort means never having to say you’re sorry u So, IP could conceivably just silently drop packets l But, silent failures are really hard to diagnose u IP includes basic feedback about network problems u Internet Control Message Protocol (ICMP)

32 Internet Control Message Protocol l ICMP runs on top of IP u In parallel to TCP and UDP u Though still viewed as an integral part of IP l Diagnostics u Triggered when an IP packet encounters a problem l E.g., time exceeded or destination unreachable u ICMP packet sent back to the source IP address l Includes the error information (e.g., type and code) l … and an excerpt of the original data packet for identification u Source host receives the ICMP packet l Inspects the excerpt of the packet (e.g., protocol and ports) l … to identify which socket should receive the error

33 Example: Time Exceeded hostDNS... host DNS... router host l Host sends an IP packet u Each router decrements the time-to-live field l If time-to-live field reaches 0 u Router generates an ICMP message u Sends a “time exceeded” message back to the source Time exceeded

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

35 Ping: Echo and Reply l ICMP includes a simple “echo” function u Sending node sends an ICMP “echo” message u Receiving node sends an ICMP “echo reply” l Ping tool u Tests the connectivity with a remote host u … by sending regularly spaced echo commands u … and measuring the delay until receiving the reply l Pinging a host u “ping or “ping ” u Used to test if a machine is reachable and alive u (However, some nodes have ICMP disabled…  )

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

37 Next Lecture l IP routers u Packet forwarding u Components of a router l Read Sections of Chapter 4