Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 8: Internet Control Protocols Reading: Section 4.1 ? CMSC 23300/33300 Computer Networks

Similar presentations


Presentation on theme: "Lecture 8: Internet Control Protocols Reading: Section 4.1 ? CMSC 23300/33300 Computer Networks"— Presentation transcript:

1 Lecture 8: Internet Control Protocols Reading: Section 4.1 ? CMSC 23300/33300 Computer Networks http://dsl.cs.uchicago.edu/Courses/CMSC33300

2 2 Goals of Today’s Lecture l Bootstrapping an end host u Learning its own configuration parameters (DHCP) u Learning the link-layer addresses of other nodes (ARP) l IP routers u Line cards, switching fabric, and route processor u Error reporting and monitoring (with ICMP)

3 3 Thus Far in the Class HTTP TCP IP Ethernet interface HTTP TCP IP Ethernet interface IP Ethernet interface SONET interface SONET interface host router HTTP message TCP segment IP packet Ethernet interface

4 4 Thus Far in the Class… l Application protocols u Socket abstraction u HyperText Transfer Protocol, File Transfer Protocol l Transport services built on IP u TCP: reliable byte stream with congestion control u UDP: unreliable message delivery l Name/address translation u DNS: mapping host names to/from IP addresses l Internet Protocol (IP) u Best-effort packet delivery service u IP addresses and IP prefixes u Packet forwarding based on longest-prefix match

5 5 How To Bootstrap an End Host? l What IP address the host should use? l What local Domain Name System server to use? l How to send packets to remote destinations? l How to ensure incoming packets arrive? host DNS... host DNS... router 1.2.3.0/24 5.6.7.0/24 1.2.3.71.2.3.156 ??? 1.2.3.19 router

6 6 Avoiding Manual Configuration l Dynamic Host Configuration Protocol (DHCP) u End host learns how to send packets u Learn IP address, DNS servers, and gateway l Address Resolution Protocol (ARP) u Others learn how to send packets to the end host u Learn mapping between IP address and MAC address host DNS... host DNS... router 1.2.3.0/24 5.6.7.0/24 1.2.3.71.2.3.156 ??? 1.2.3.19 router

7 7 Key Ideas in Both Protocols l Broadcasting: when in doubt, shout! u Broadcast query to all hosts in the local area network u … when you don’t know how to identify the right one l Caching: remember the past for a while u Store the information you learn to reduce overhead u Remember your own address & other host’s addresses l Soft state: eventually forget the past u Associate a time-to-live field with the information u … and either refresh or discard the information u Key for robustness in the face of unpredictable change

8 8 Need Yet Another Kind of Identity l LANs are designed for arbitrary network protocols u Not just for IP and the Internet l Using IP address would require reconfiguration u Every time the adapter was moved or powered up l Broadcasting all data to all adapters is expensive u Requires every host on the LAN to inspect each packet Motivates separate Medium Access Control (MAC) addresses

9 9 MAC Address vs. IP Address l MAC addresses u Hard-coded in read-only memory when adaptor is built u Like a social security number u Flat name space of 48 bits (e.g., 00-0E-9B-6E-49-76) u Portable, and can stay the same as the host moves u Used to get packet between interfaces on same network l IP addresses u Configured, or learned dynamically u Like a postal mailing address u Hierarchical name space of 32 bits (e.g., 12.178.66.9) u Not portable, & depends on where the host is attached u Used to get a packet to destination IP subnet

10 10 MAC Addresses on a LAN = adapter 1A-2F-BB-76-09-AD 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 71-65-F7-2B-08-53 LAN

11 11 Bootstrapping Problem l Host doesn’t have an IP address yet u So, host doesn’t know what source address to use l Host doesn’t know who to ask for an IP address u So, host doesn’t know what destination address to use l Solution: shout to discover a server who can help u Broadcast a server-discovery message u Server sends a reply offering an address host... DHCP server

12 12 Broadcasting l Broadcasting: sending to everyone u Special destination address: FF-FF-FF-FF-FF-FF u All adapters on the LAN receive the packet l Delivering a broadcast packet u Easy on a “shared media” u Like shouting in a room – everyone can hear you u E.g., Ethernet, wireless, and satellite links

13 13 Response from the DHCP Server l DHCP “offer message” from the server u Configuration parameters (proposed IP address, mask, gateway router, DNS server,...) u Lease time (the time the information remains valid) l Multiple servers may respond u Multiple servers on the same broadcast media u Each may respond with an offer u The client can decide which offer to accept l Accepting one of the offers u Client sends a DHCP request echoing the parameters u The DHCP server responds with an ACK to confirm u … and the other servers see they were not chosen

14 14 Dynamic Host Configuration Protocol arriving client DHCP server 233.1.2.5 DHCP discover (broadcast) DHCP offer DHCP request DHCP ACK (broadcast)

15 15 Deciding What IP Address to Offer l Server as centralized configuration database u All parameters are statically configured in the server u E.g., a dedicated IP address for each MAC address u Avoids complexity of configuring hosts directly u … while still having a permanent IP address per host l Or, dynamic assignment of IP addresses u Server maintains a pool of available addresses u … and assigns them to hosts on demand u Leads to less configuration complexity u … and more efficient use of the pool of addresses u Though, it is harder to track the same host over time

16 16 Soft State: Refresh or Forget l Why is a lease time necessary? u Client can release the IP address (DHCP RELEASE) l E.g., “ipconfig /release” at the DOS prompt l E.g., clean shutdown of the computer u But, the host might not release the address l E.g., the host crashes (blue screen of death!) l E.g., buggy client software u & you don’t want the address to be allocated forever l Performance trade-offs u Short lease time: returns inactive addresses quickly u Long lease time: avoids overhead of frequent renewals

17 17 So, Now the Host Knows Things l IP address l Mask l Gateway router l DNS server l … l And can send packets to other IP addresses u But, how to learn the MAC address of the destination?

18 18 Sending Packets Over a Link l Adaptors only understand MAC addresses u Translate the destination IP address to MAC address u Encapsulate the IP packet inside a link-level frame host Web... 1.2.3.156 router 1.2.3.53 1.2.3.156 IP packet

19 19 Address Resolution Protocol Table l Every node maintains an ARP table u (IP address, MAC address) pair l Consult the table when sending a packet u Map destination IP address to destination MAC address u Encapsulate and transmit the data packet l But, what if the IP address is not in the table? u Sender broadcasts: “Who has IP address 1.2.3.156?” u Receiver responds: “MAC address 58-23-D7-FA-20-B0” u Sender caches the result in its ARP table l No need for network administrator to get involved

20 20 Example: A Sending a Packet to B How does host A send an IP packet to host B? A R B A sends packet to R, and R sends packet to B.

21 21 Host A Decides to Send Through R l Host A constructs an IP packet to send to B u Source 111.111.111.111, destination 222.222.222.222 l Host A has a gateway router R u Used to reach destinations outside of 111.111.111.0/24 u Address 111.111.111.110 for R learned via DHCP A R B

22 22 Host A Sends Packet Through R l Host A learns the MAC address of R’s interface u ARP request: broadcast request for 111.111.111.110 u ARP response: R responds with E6-E9-00-17-BB-4B l Host A encapsulates the packet and sends to R A R B

23 23 R Decides how to Forward Packet l Router R’s adaptor receives the packet u R extracts the IP packet from the Ethernet frame u R sees the IP packet is destined to 222.222.222.222 l Router R consults its forwarding table u Packet matches 222.222.222.0/24 via other adaptor A R B

24 24 R Sends Packet to B l Router R’s learns the MAC address of host B u ARP request: broadcast request for 222.222.222.222 u ARP response: B responds with 49-BD-D2-C7-56-2A l Router R encapsulates the packet and sends to B A R B

25 IP Routers

26 26 Inside a High-End Router Switching Fabric Processor Line card

27 27 Router Physical Layout Juniper T series Cisco 12000 Crossbar Linecards

28 28 Line Cards (Interface Cards, Adaptors) l Interfacing u Physical link u Switching fabric l Packet handling u Packet forwarding u Decrement time-to-live u Buffer management u Link scheduling u Packet filtering u Rate limiting u Packet marking u Measurement to/from link to/from switch lookup Receive Transmit

29 29 Switching Fabric l Deliver packet inside the router u From incoming interface to outgoing interface u A small network in and of itself l Must operate very quickly u Multiple packets going to same outgoing interface u Switch scheduling to match inputs to outputs l Implementation techniques u Bus, crossbar, interconnection network, … u Running at a faster speed (e.g., 2X) than links u Dividing variable-length packets into cells

30 30 Packet Switching R1 Link 1 Link 2 Link 3 Link 4 Link 1, ingressLink 1, egress Link 2, ingressLink 2, egress Link 3, ingressLink 3, egress Link 4, ingressLink 4, egress Choose Egress Choose Egress Choose Egress Choose Egress “4”

31 31 Router Processor l So-called “Loopback” interface u IP address of the CPU on the router l Control-plane software u Implementation of the routing protocols u Creation of forwarding table for the line cards l Interface to network administrators u Command-line interface for configuration u Transmission of measurement statistics l Handling of special data packets u Packets with IP options enabled u Packets with expired Time-To-Live field

32 32 Summary l Important control functions u Bootstrapping u Error reporting and monitoring l Internet control protocols u Dynamic Host Configuration Protocol (DHCP) u Address Resolution Protocol (ARP) u Internet Control Message Protocol (ICMP) [Lect. #2] l Components of an IP router u Line cards, switching fabric, and route processor l Next week: Middleboxes—Section 8.4


Download ppt "Lecture 8: Internet Control Protocols Reading: Section 4.1 ? CMSC 23300/33300 Computer Networks"

Similar presentations


Ads by Google