Presentation is loading. Please wait.

Presentation is loading. Please wait.

Naming in Networking Jennifer Rexford COS 316 Guest Lecture.

Similar presentations


Presentation on theme: "Naming in Networking Jennifer Rexford COS 316 Guest Lecture."— Presentation transcript:

1 Naming in Networking Jennifer Rexford COS 316 Guest Lecture

2 Names Type of Name Example Uniform Resource Locator
Hostname Internet Protocol Media Access Control 00:15:C5:49:04:A9 Today’s lecture focuses on the last three!

3 Internet Protocol Layers
Application Applications Hostname Transport Reliable streams Messages Best-effort global packet delivery Network IP address Best-effort local packet delivery Link MAC address

4 Internet Protocol Stack
host host HTTP message HTTP HTTP TCP segment TCP TCP router router IP packet IP packet IP packet IP IP IP IP Ethernet interface Ethernet interface Optical interface Optical interface Ethernet interface Ethernet interface Ethernet frame Ethernet frame

5 What’s in a Name? Human readable? Fixed length? Large name space?
If end users interact with the names Fixed length? If names must be processed at high speed Large name space? If many nodes need unique names Hierarchical names? If the system is very large and/or federated Self-certifying? If preventing “spoofing” is important

6 Different Layers, Different Names
Host name (e.g., Mnemonic, variable-length, appreciated by humans Hierarchical, based on organizations IP address (e.g., ) Numerical 32-bit address appreciated by routers Hierarchical, based on organizations and topology MAC address (e.g., 00:15:C5:49:04:A9) Numerical 48-bit address appreciated by adapters Non-hierarchical, unrelated to network topology

7 Hierarchical Allocation Processes
Host name: Domain: registrar for each top-level domain (e.g., .edu) Host name: local administrator assigns to each host IP addresses: Prefixes: ICANN, regional Internet registries, and ISPs Hosts: static configuration, or dynamic using DHCP MAC addresses: 00:15:C5:49:04:A9 Blocks: assigned to equipment vendors by the IEEE Adapters: assigned by the vendor from its block

8 Host Names vs. IP Addresses
Names are easier (for us!) to remember vs IP addresses can change underneath E.g., renumbering when changing providers Name could map to multiple IP addresses to multiple replicas of the Web site Map to different addresses in different places E.g., to reduce latency, or return different content Multiple names for the same address E.g., aliases like ee.mit.edu and cs.mit.edu

9 IP vs. MAC Addresses LANs designed for arbitrary network protocols
Not just for IP (e.g., IPX, Appletalk, X.25, …) Different LANs may have different address schemes A host may move to a new location So, cannot simply assign a static IP address Instead, must reconfigure the adapter Must identify the adapter during bootstrap Need to talk to the adapter to assign it an IP address

10 Hostname, IP, and MAC Hostname IP Address MAC Address Example
00:15:C5:49:04:A9 Size Hierarchical, human readable, variable length Hierarchical, machine readable, 32 bits (in IPv4) Flat, machine readable, 48 bits Read by Humans, hosts Internet routers LAN switches Allocation, top-level Domain name assigned by registrar (e.g., for .edu) Variable-length prefixes, assigned by ICANN, RIR, or ISP Fixed-sized blocks, assigned by IEEE to vendors (e.g., Dell) Allocation, low-level Host name assigned by local administrator Interface, by DHCP or local administrator Interface, by equipment vendor whois –h whois.arin.net Why both MAC and IP: Need identifier to use in bootstrap process IP address is topology-dependent, so cannot keep when host moves - LAN was meant to handle many different network protocols (not just IP)

11 Directory: Translate Name to Address
link session address path

12 Directory A key-value store Caching the response
Key: name, value: address(es) Answer queries: given name, return address(es) Caching the response Reuse the response, for a period of time Better performance and lower overhead Allow entries to change Updating the address(es) associated with a name Invalidating or expiring cached responses

13 Directory Design: Three Extremes
Flood the query (e.g., ARP) The named node responds with its own address But, high overhead in large networks

14 Address Resolution Protocol (ARP)
Every host in a LAN maintains an ARP table (IP address, MAC address) pair Consult the table when sending a packet Map destination IP address to dest MAC address Transmit the IP packet within an Ethernet frame Local Area Network 00:15:C5:49:04:A9 78:9A:B5:23:5D:98

15 Address Resolution Protocol (ARP)
But, what if the key is not in the table? Sender broadcast: “Who has IP address ?” Receiver answer: “MAC address 78:9A:B5:23:5D:98” Sender caches the result in its local ARP cache Local Area Network 00:15:C5:49:04:A9 78:9A:B5:23:5D:98

16 Address Resolution Protocol (ARP)
Managing the ARP cache Storing all key-value pairs introduces overhead Entries become stale (e.g., IP assigned to new host) Remove an entry if not used for some period of time Local Area Network 00:15:C5:49:04:A9 78:9A:B5:23:5D:98

17 Directory Design: Three Extremes
Flood the query (e.g., ARP) The named node responds with its address But, high overhead in large networks Push data to all nodes (e.g., /etc/hosts) All nodes store a full copy of the directory But, high overhead for many names and updates Central directory server All data and queries handled by one node But, poor performance, scalability, and reliability

18 Distributed Directory Design
Hierarchical directory (e.g., DNS) Follow the hierarchy of the name space Distribute the directory, distribute the queries Enable decentralized updates to the directory Distributed Hash Table (e.g., P2P applications) Directory as a hash table with flat names Each directory node handles range of hash outputs Use hash to direct query to the directory node

19 Domain Name System (DNS)
Properties of DNS Hierarchical name space divided into zones Distributed over a collection of DNS servers Hierarchy of DNS servers Root servers Top-level domain (TLD) servers Authoritative DNS servers Performing the translations Local DNS servers and client resolvers

20 Distributed Hierarchical Database
unnamed root com edu org ac uk zw arpa generic domains country domains bar ac in- addr west east cam 12 foo my usr 34 my.east.bar.edu usr.cam.ac.uk 56 /24

21 DNS Root Servers 13 root servers (see http://www.root-servers.org/)
Labeled A through M A Verisign, Dulles, VA C Cogent, Herndon, VA (also Los Angeles) D U Maryland College Park, MD G US DoD Vienna, VA H ARL Aberdeen, MD J Verisign, ( 11 locations) K RIPE London (also Amsterdam, Frankfurt) I Autonomica, Stockholm (plus 3 other locations) E NASA Mt View, CA F Internet Software C. Palo Alto, CA (and 17 other locations) m WIDE Tokyo B USC-ISI Marina del Rey, CA L ICANN Los Angeles, CA

22 TLD and Authoritative DNS Servers
Global Top-level domain (gTLD) servers Generic domains (e.g., .com, .org, .edu) Country domains (e.g., .uk, .fr, .ca, .jp) Managed professionally (e.g., Verisign for .com .net) Authoritative DNS servers Provide public records for hosts at an organization For the organization’s servers (e.g., Web and mail) Can be maintained locally or by a service provider 22

23 Using DNS Local DNS server (“default name server”) Client application
Usually near the end hosts who use it Local hosts configured with local server (e.g., /etc/resolv.conf) or learn the server via DHCP Client application Extract server name (e.g., from the URL) Do gethostbyname() or getaddrinfo() to get address Server application Extract client IP address from socket Optional gethostbyaddr() to translate into name

24 authoritative DNS server
DNS Queries Host at cis.poly.edu wants IP address for gaia.cs.umass.edu root DNS server 2 3 TLD DNS server 4 local DNS server dns.poly.edu 5 7 6 1 8 authoritative DNS server dns.cs.umass.edu requesting host cis.poly.edu Recursive query: #1 Iterative queries: #2, 4, 6 gaia.cs.umass.edu

25 Recursive vs. Iterative Queries
root DNS server Recursive query Ask server to get answer for you E.g., request 1 and response 8 Iterative query Ask server who to ask next E.g., all other request-response pairs 2 3 TLD DNS server 4 local DNS server dns.poly.edu 5 7 6 1 8 authoritative DNS server dns.cs.umass.edu requesting host cis.poly.edu

26 DNS Caching DNS query latency Caching to reduce overhead and delay
root DNS server DNS query latency E.g., 1 sec latency before starting a download Caching to reduce overhead and delay Small # of top-level servers, that change rarely Popular sites visited often Where to cache? Local DNS server Browser 2 3 TLD DNS server 4 local DNS server dns.poly.edu 5 7 6 1 8 authoritative DNS server dns.cs.umass.edu requesting host cis.poly.edu

27 DNS Cache Consistency Cache consistency DNS design considerations
Ensuring cached data is up to date DNS design considerations Cached data is “read only” Explicit invalidation would be expensive Avoiding stale information Responses include a “time to live” (TTL) field Delete the cached entry after TTL expires

28 Setting the Time To Live (TTL)
TTL trade-offs Small TTL: fast response to change Large TTL: higher cache hit rate Following the hierarchy Top of the hierarchy: days or weeks Bottom of the hierarchy: seconds to hours Tension in practice Set low TTLs for load balancing and failover Browsers cache for seconds

29 Negative Caching Broken domain names are slow to resolve
Misspellings like and These can take a long time to fail the first time Remember things that don’t work Good to remember that they don’t work … so the failure takes less time in the future But don’t remember for too long Use a time-to-live to expire

30 DNS Reliability DNS servers are replicated
Name service available if at least one replica is up Queries can be load balanced between replicas Retransmission of lost queries No response to a query? Try again! Try alternate servers on timeout Exponential back-off when retrying same server

31 Conclusions Network names Network directories
To identify remote end-points Readability? Format? Length? Hierarchy? Hostnames, IP addresses, and MAC addresses Network directories Key-value stores to map name to address Flooding (ARP), local copy, central server Hierarchical (DNS) or non-hierarchical (DHT) More on protocol layers in a few weeks!


Download ppt "Naming in Networking Jennifer Rexford COS 316 Guest Lecture."

Similar presentations


Ads by Google