Goals of Today s Lecture Bootstrapping an end host Learning its own configuration parameters DHCP Learning the link layer addresses of other nodes ARP Internet Control Protocols Network control messages EE 122 Intro to Communication Networks Error status reporting Monitoring Internet Control Message Protocol ICMP Exploiting ICMP for discovering Internet path properties Fall 2009 Prof Vern Paxson vern eecs berkeley edu o Largest packet that can be sent w o fragmenting PMTU o Route taking by packets through the network traceroute Materials with thanks to Jennifer Rexford Ion Stoica and colleagues at Princeton and UC Berkeley 1 2 How To Bootstrap an End Host Avoiding Manual Configuration What IP address the host should use Dynamic Host Configuration Protocol DHCP End host learns how to send packets Learn IP address DNS servers gateway what s local What DNS server s to use How to tell which destinations are local Address Resolution Protocol ARP How do we address them using local network For local destinations learn mapping between IP address and MAC address How to send packets to remote destinations 1 2 3 7 1 2 3 156 host host DNS host host 1 2 3 48 1 2 3 7 1 2 3 156 DNS host 5 6 7 0 24 1 2 3 0 23 1 2 3 0 23 255 255 254 0 1 2 3 19 router router router host 3 DNS 1A 2F BB 76 09 AD host host DNS 5 6 7 0 24 1 2 3 19 router router router 4 1 Key Ideas in Both Protocols MAC Address vs IP Address Broadcasting when in doubt shout MAC addresses Broadcast query to all hosts in the local area network when you don t know how to identify the right one Hard coded in read only memory when adaptor is built Like a social security number Flat name space of 48 bits e g 00 0E 9B 6E 49 76 Portable and can stay the same as the host moves Used to get packet between interfaces on same network Caching remember the past for a while Store the information you learn to reduce overhead Remember your own address other host s addresses IP addresses Soft state eventually forget the past Configured or learned dynamically Like a postal mailing address Hierarchical name space of 32 bits e g 12 178 66 9 Not portable and depends on where the host is attached Used to get a packet to destination IP subnet Associate a time to live field with the information and either refresh or discard the information Key for robustness in the face of unpredictable change 5 Bootstrapping Problem Response from the DHCP Server Host doesn t have an IP address yet DHCP offer message from the server So host doesn t know what source address to use Configuration parameters proposed IP address mask gateway router DNS server Lease time duration the information remains valid Host doesn t know who to ask for an IP address So host doesn t know what destination address to use Multiple servers may respond Multiple servers on the same broadcast network Each may respond with an offer Solution shout to discover server that can help Broadcast a server discovery message ff ff ff ff ff ff Server s sends a reply offering an address host host Accepting one of the offers Client sends a DHCP request echoing the parameters The DHCP server responds with an ACK to confirm and the other servers see they were not chosen host DHCP server 6 7 8 2 Soft State Refresh or Forget Dynamic Host Configuration Protocol Why is a lease time necessary DHCP broa arriving client disco dcas t Client can release the IP address DHCP RELEASE ver o E g ipconfig release at the DOS prompt o E g clean shutdown of the computer er P off DHC But host might not release the address DHCP server 203 1 2 5 o E g the host crashes blue screen of death o E g buggy client software o E g you shut your laptop off and put it in your backpack DHCP reque st broa dcas t DHC PA And you don t want the address to be allocated forever Performance trade offs Short lease time returns inactive addresses quickly Long lease time avoids overhead of frequent renewals lessens frequency of lease being denied CK 9 10 Figuring Out Where To Send Locally So Now the Host Knows Things Two cases Destination is on the local network o So need to address it directly IP address Destination is not local remote o Need to figure out the first hop on the local network Mask Determining if it s local use the netmask E g mask destination IP address w 255 255 254 0 Is it the same value as when we mask our own address Gateway router o Yes local o No remote DNS server 1 2 3 48 1 2 3 7 1 2 3 156 host And can send packets to other IP addresses host 1 2 3 0 23 255 255 254 0 But how to use the local network to do this 11 DNS 1A 2F BB 76 09 AD host host DNS 5 6 7 0 24 1 2 3 19 router router router 12 3 Sending Packets Over a Link Where To Send Locally con t If it s remote look up first hop in very small local routing table 1 2 3 53 E g by default route via 1 2 3 19 Now do to the local case but for 1 2 3 19 rather than ultimate destination IP address 1 2 3 48 1 2 3 7 1 2 3 156 host host 1 2 3 0 23 255 255 254 0 DNS 1A 2F BB 76 09 AD host host host 1 2 3 156 host DNS IP packet 1 2 3 53 1 2 3 156 DNS router 5 6 7 0 24 1 2 3 19 router router router For the local case need to determine the destination s MAC address Adaptors only understand MAC addresses Translate the destination IP address to MAC address Encapsulate the IP packet inside a link level frame 13 Address Resolution Protocol 14 Example A Sending a Packet to B Every node maintains an ARP table How does host A send an IP packet to host B IP address MAC address pair Consult the table when sending a packet Map destination IP address to destination MAC address Encapsulate and transmit the data packet A But what if IP address not in the table Sender broadcasts Who has IP address 1 2 3 156 Receiver responds MAC address 58 23 D7 FA 20 B0 Sender caches result in its ARP table Link layer protocol RFC 826 R B 1 A sends packet to R 2 R sends packet to B Because necessary to bootstrap IP connectivity 15 16 4 Host A Decides to Send Through R Host A Sends Packet Through R Host A constructs an IP packet to send to B Host A learns the MAC address of R s interface Source 111 111 111 111 …
View Full Document