Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Spring Semester 2009, Dept. of Computer Science, Technion Internet Networking recitation #2 DNS and DHCP.

Similar presentations


Presentation on theme: "1 Spring Semester 2009, Dept. of Computer Science, Technion Internet Networking recitation #2 DNS and DHCP."— Presentation transcript:

1 1 Spring Semester 2009, Dept. of Computer Science, Technion Internet Networking recitation #2 DNS and DHCP

2 2 Domain Name System - DNS n Provides mapping from ASCII domain names to IP addresses  Hierarchical naming system.  The set of names is divided into mutually exclusive parts. n Supplies mechanism for global data storage and information retrieval. n Most important principles:  Distributed system – set of servers sharing information.  Efficiency - most of the requests resolved by local servers. Use of Caching.  Reliability – works even if some of the servers fail.

3 3 DNS tree root orgcomgovnetil cnnibmgovcoac tautechnion

4 4 Reliability over UDP n DNS is an application which runs over UDP  Advantage: not as complex as TCP.  Disadvantage: requires reliability implementation at application level. n Reliability scheme:  Time out.  Retransmissions - resends timed out query to a different server.

5 5 DNS Terms n Domain name: any name represented in the DNS format  mail.yahoo.com  \.name.example n DNS label: each string between two ".“  ac.il – 2 labels n DNS zone: a set of names that are under the same authority  cs.technion.ac.il, ee.technion.ac.il and www.technion.ac.il n Delegation: transfer of authority for a domain  example.org is a delegation from org.

6 6 DNS Elements n Resolver:  stub: simple, only asks questions;  recursive: takes simple query and makes all necessary steps to get the full answer. n Server (some perform both roles at the same time):  authoritative: the servers that contain the zone file for a zone, one Primary, one or more Secondaries;  caching: a recursive resolver that stores prior results and reuses them.

7 7 How Does DNS Work? n The resolver sends a DNS request message over UDP to a local domain name server. n DNS caches store data for a short time defined by TTL on the Record. n When a name server does not have the requested information, it starts at longest match on query name it has when looking for data. n The root server knows the IP address of each second-level domain name server. n Every server knows how to reach servers that are authorities for names further down the hierarchy. n The resolver follows delegations until it receives an answer.

8 8 DNS query example (from IETF slides) Root Server Ietf.org Server Org Server Ask org NS Ask ietf.org NS www.ietf.orgwww.ietf.org A 65.256.255.51 www.ietf.orgwww.ietf.org A 65.256.255.51 Recursive Resolver www.ietf.org Stub resolver

9 9 Dynamic Host Configuration Protocol - DHCP n RFC 2131 n Runs over UDP as well n Provides automatic configuration of the host connected to network or booted n Provides hosts with initial configuration information upon bootup:  IP address with subnet mask,  default gateway,  IP address of the DNS server.

10 DHCP (cont.) determine configuration determine configuration DHCP discover DHCP offer select configuration DHCP request DHCP ack Initialization completes graceful shutdown DHCP release discard lease using the allocated configuration (selected)(not selected)

11 11 DHCP Messages n DHCPDISCOVER  The client broadcasts message in search of available DHCP servers. n DHCPOFFER  The server response to the client DHCPDISCOVER with offer of configuration parameters. n DHCPREQUEST  The client broadcasts to the server, requesting offered parameters from one server specifically.  Confirms correctness of previously allocated address after, e.g., system reboot.  Extends the lease on a particular network address. n DHCPRELEASE  The client-to-server communication, relinquishing network address and canceling remaining lease.

12 12 n DHCPACK  The server-to-client communication with configuration parameters, including committed network address. n DHCPNAK  Server to client indicating client's notion of network address is incorrect (e.g., client has moved to new subnet) or client's lease as expired n DHCPDECLINE  The client-to-server communication, indicating that the network address is already in use. n DHCPINFORM  The client-to-server communication, asking for only local configuration parameters that the client already has externally configured as an address. DHCP Messages (Cont.)

13 13 DHCP message format n xid Transaction ID. n ciaddr Client IP address n yiaddr Your IP address. n siaddr Server IP address. n chaddr Client MAC address

14 14 DHCP message format (cont.) n Transaction ID - a random number that is used by the client to match incoming DHCP messages with pending requests. n Client IP address - used when client knows its IP address. n Your IP address - the DHCP server will place the offered client IP address in this field, if the client IP address is 0.0.0.0. n Server IP address - the DHCP server address, if it is known. Otherwise, it is used in DHCPOFFER and DHCPACK. n options - DHCP defines a 'client identifier' option that is used to pass an explicit client identifier to a server.

15 15 DHCP message filtering n DHCPOFFER  Only the client waiting for this message will accept it in UDP layer.  But what if two clients are waiting for the offer simultaneously? The filtering is possible only at the application layer. The transaction ID field is responsible for this filtering. n DHCPREQUEST  The message is broadcasted to all the servers.  The server knows if its offer was accepted only upon reading the server identifier field in the DHCP message.

16 16 DHCP as UDP application n DHCP server - port 67, client - port 68 n Reliability is not provided by UDP. n Client is responsible for reliability  The client implements timer to measure timeout for the messages that were not responded.  The client adopts a retransmission strategy that incorporates a randomized exponential backoff algorithm to determine the delay between retransmissions.  Every next message acts as an acknowledgment for the previous step. For example, DHCPREQUEST is an ACK for DHCPOFFER.


Download ppt "1 Spring Semester 2009, Dept. of Computer Science, Technion Internet Networking recitation #2 DNS and DHCP."

Similar presentations


Ads by Google