Goals of Today s Lecture Transla'ng ddresses Three different kinds of addresses Host names (e.g., www.cnn.com) IP addresses (e.g., 64.236.16.20) MC addresses (e.g., 00-15- C5-49- 04-9) Protocols for transla'ng between addresses Domain Name System (DNS) Dynamic Host Configura'on Protocol (DHCP) ddress esolu'on Protocol (P) Two main topics Decentralized management of the name space oot- strapping an end host that awaches to the net 1 2 Separa'ng Names and IP ddresses Names are easier (for us!) to remember www.cnn.com vs. 64.236.16.20 IP addresses can change underneath Move www.cnn.com to 173.15.201.39 E.g., renumbering when changing providers Name could map to mul'ple IP addresses www.cnn.com to mul'ple replicas of the Web site Map to different addresses in different places ddress of a nearby copy of the Web site E.g., to reduce latency, or return different content Mul'ple names for the same address E.g., aliases like ee.mit.edu and cs.mit.edu 3 Separa'ng IP and MC ddresses LNs are designed for arbitrary network protocols Not just for IP (e.g., IPX, ppletalk, X.25, ) Though now IP is the main game in town Different LNs may have different addressing schemes Though now Ethernet address is the main game in town host may move to a new loca'on So, cannot simply assign a sta'c IP address Since IP addresses depend on host s posi'on in topology Instead, must reconfigure the adapter To assign it an IP address based on its current loca'on Must iden'fy the adapter during bootstrap process Need to talk to the adapter to assign it an IP address 4 1
Three Kinds of Iden'fiers Host name (e.g., www.cnn.com) Mnemonic name appreciated by humans Provides liwle (if any) informa'on about loca'on Hierarchical, variable # of alpha- numeric characters IP address (e.g., 64.236.16.20) Numerical address appreciated by routers elated to host s current loca'on in the topology Hierarchical name space of 32 bits MC address (e.g., 00-15- C5-49- 04-9) Numerical address appreciated within local area network Unique, hard- coded in the adapter when it is built Flat name space of 48 bits 5 Three Hierarchical ssignment Processes Host name: www.umich.edu Domain: registrar for each top- level domain (e.g.,.edu) Host name: local administrator assigns to each host IP addresses: 141.213.4.4 Prefixes: ICNN, regional Internet registries, and ISPs Hosts: sta'c configura'on, or dynamic using DHCP MC addresses: 00-15- C5-49- 04-9 locks: assigned to vendors by the IEEE dapters: assigned by the vendor from its block 6 Mapping etween Iden'fiers Domain Name System (DNS) Given a host name, provide the IP address Given an IP address, provide the host name Dynamic Host Configura'on Protocol (DHCP) Given a MC address, assign a unique IP address and tell host other stuff about the Local rea Network To automate the boot- strapping process ddress esolu'on Protocol (P) Given an IP address, provide the MC address To enable communica'on within the Local rea Network ootstrapping Problem Host doesn t have an IP address yet So, host doesn t know what source address to use Host doesn t know who to ask for an IP address So, host doesn t know what des'na'on addr to use Solu'on: shout to discover a server who can help roadcast a DHCP server- discovery message Server sends a DHCP offer offering an address host! host!...! host! 7 DHCP server! 8 2
roadcas'ng roadcas'ng: sending to everyone Special des'na'on address: FF- FF- FF- FF- FF- FF ll adapters on the LN receive the packet Delivering a broadcast packet Easy on a shared media Like shou'ng in a room everyone can hear you esponse from the DHCP Server DHCP offer message from the server Configura'on parameters (proposed IP address, mask, gateway router, DNS server,...) Lease 'me (the 'me the informa'on remains valid) Mul'ple servers may respond Mul'ple servers on the same broadcast media Each may respond with an offer The client can decide which offer to accept ccep'ng one of the offers Client sends a DHCP request echoing the parameters The DHCP server responds with an CK to confirm and the other servers see they were not chosen 9 10 Dynamic Host Configura'on Protocol Deciding What IP ddress to Offer arriving client! DHCP discover! (broadcast)! DHCP offer! DHCP request! (broadcast)! DHCP CK! DHCP server! 233.1.2.5! 11 Server as centralized configura'on database ll parameters are sta'cally configured in the server E.g., a dedicated IP address for each MC address voids complexity of configuring hosts directly while s'll having a permanent IP address per host Or, dynamic assignment of IP addresses Server maintains a pool of available addresses and assigns them to hosts on demand Leads to less configura'on complexity and more efficient use of the pool of addresses Though, it is harder to track the same host over 'me 12 3
Son State: efresh or Forget Why is a lease 'me necessary? Client can release the IP address (DHCP ELESE) E.g., ipconfig /release at the DOS prompt E.g., clean shutdown of the computer ut, the host might not release the address E.g., the host crashes (blue screen of death!) E.g., buggy client sonware nd you don t want the address to be allocated forever Performance trade- offs Short lease 'me: returns inac've addresses quickly Long lease 'me: avoids overhead of frequent renewals So, Now the Host Knows Things IP address Mask Gateway router DNS server nd can send packets to other IP addresses ut, how to learn MC address of the des'na'on? 13 14 Sending Packets Over a Link IP packet! 1.2.3.53 1.2.3.156 1.2.3.53 1.2.3.156 host! host!...! Web! router! dapters only understand MC addresses Translate the des'na'on IP address to MC address Encapsulate the IP packet inside a link- level frame ddress esolu'on Protocol Table Every node maintains an P table (IP address, MC address) pair Consult the table when sending a packet Map des'na'on IP address to des'na'on MC address Encapsulate and transmit the data packet ut, what if the IP address is not in the table? Sender broadcasts: Who has IP address 1.2.3.156? eceiver responds: MC address 58-23- D7- F- 20-0 Sender caches the result in its P table No need for network administrator to get involved 15 16 4
Example: Sending a Packet to How does host send an IP packet to (www.cnn.com)? asic Steps 1. Host must learn the IP address of via DNS 2. Host uses gateway to reach external hosts 3. Host sends the frame to s MC address 4. outer forwards IP packet to outgoing interface 5. outer learns s MC address and forwards frame www.cnn.com sends packet to, and sends packet to! 17 www.cnn.com 18 Host Learns the IP ddress of Host does a DNS query to learn s address Suppose gethostbyname() returns 222.222.222.222 Host constructs an IP packet to send to Source 111.111.111.111, dest 222.222.222.222 Host Learns the IP ddress of From : 111.111.111.111 To : 222.222.222.222 From : 74-29- 9C- E8- FF- 55 To gateway:???? 19 20 5
Host Decides to Send Through Host has a gateway router Used to reach dests outside of 111.111.111.0/24 ddress 111.111.111.110 for learned via DHCP ut, what is the MC address of the gateway? Host Sends Packet Through Host learns the MC address of s interface P request: broadcast request for 111.111.111.110 P response: responds with E6- E9-00- 17- - 4 Host encapsulates the packet and sends to 21 22 Host Sends Packet Through From : 111.111.111.111 To : 222.222.222.222 From : 74-29- 9C- E8- FF- 55 To : E6- E9-00- 17- - 4 Decides how to Forward Packet outer s adapter receives the packet extracts the IP packet from the Ethernet frame sees the IP packet is des'ned to 222.222.222.222 outer consults its forwarding table Packet matches 222.222.222.0/24 via other adapter 23 24 6
outer Wants to Forward Packet From : 111.111.111.111 To : 222.222.222.222 From : 1-23- F9- CD- 06-9 To :??? Sends Packet to outer s learns the MC address of host P request: broadcast request for 222.222.222.222 P response: responds with 49- D- D2- C7-56- 2 outer encapsulates the packet and sends to 25 26 outer Wants to Forward Packet From : 111.111.111.111 To : 222.222.222.222 From : 1-23- F9- CD- 06-9 To : 49- D- D2- C7-56- 2 Conclusion ootstrapping an end host Dynamic Host Configura'on Protocol (DHCP) ddress esolu'on Protocol (P) 27 28 7