Download presentation
1
Copyright © 2007 by Scott Orr and the Trustees of Indiana University
DNS and DHCP CSCI N321 – System and Network Administration Copyright © 2007 by Scott Orr and the Trustees of Indiana University
2
Section Overview DNS Overview Bind DNS Record Types DHCP
3
References Internet Software Consortium RedHat Deployment Guide
Chapter 17 – DNS Chapter 21 – DHCP
4
In the beginning… Early name resolution /etc/hosts
All addresses in shared file Never 100% accurate /etc/hosts IP_Addr Hostname [Aliases…] localhost.localdomain localhost pegasus.cs.iupui.edu pegasus
5
Domain Name Service (DNS)
Allows for IP-Hostname translations Distributed Hierarchical Database Hostname to IP address IP Address to Hostname Root Servers (A-M) Mail Server addressing Resolver Library calls Protocol to exchange data
6
DNS Management Internet Corporation for Assigned Names and Numbers (ICANN) Registries ARIN – North America RIPE - Europe APNIC – Asian Pacific AfriNIC - Africa LACNIC – Latin America Domain Registrars and ISPs Authoritative DNS Servers
7
Whois Queries Owner Location Domain name Domain DNS Servers
IP Address Block Contact Information Administrative (Tech) Abuse Noc
8
ISC BIND Primary DNS Server Software in use
Started as a graduate student project Versions 4.x – Depreciated 8.x – Maintenance Development only 9.x – Active Development Authoritative (master & slave) Caching Recursive/Non-recursive
9
/etc/named.conf (Config)
options { directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; // query-source address * port 53; }; controls { inet allow { localhost; } keys { rndckey; };
10
/etc/named.conf (Zones)
zone "." IN { type hint; file "named.ca"; }; zone "localdomain" IN { type master; file "localdomain.zone"; allow-update { none; }; zone "localhost" IN { file "localhost.zone"; zone " in-addr.arpa" IN { type master; file "named.local"; allow-update { none; }; }; // CS Domain Config zone "cs.iupui.edu" { file "dns.cs.iupui.edu"; zone " in-addr.arpa" { file "rev "; include "/etc/rndc.key";
11
Zone Files Typically in /var/named/ Forward and reverse files
Record Format [name] [ttl] [class] type data TTL – Time to keep data cached Class IN (Internet) CN (ChaosNet – No longer used) HS (Hesoid – internal database)
12
SOA Records Server Name Contact Name
Serial (Must be increased w/ change) Refresh Secondary Retry Refresh Expire non-refreshed entries Minimum time to live
13
SOA Record Example @ IN SOA klingon.cs.iupui.edu. root.klingon.cs.iupui.edu. ( ; Serial - increase when file changes ; Refresh secondaries every 2 hours ; Retry refresh every 20 minutes ; Expire non-refreshed entries after 30 days 7200 ) ; Minimum time-to-live is 2 hours
14
Name Server Records Which name servers support this domain
Does not differentiate between master and slave servers Example: IN NS klingon.cs.iupui.edu. IN NS dns1.iu.edu. IN NS dns2.iu.edu.
15
Address (A) Records A Records – Maps hostnames to IP addresses Format
Hostname IN A #.#.#.# Examples: tempest IN A pegasus IN A enigma IN A
16
Pointer (PTR) Records PTR Records – Maps IP addresses to hostnames
Format # IN PTR FQDN. Examples: IN PTR tempest.cs.iupui.edu. IN PTR pegasus.cs.iupui.edu. IN PTR enigma.cs.iupui.edu.
17
Conical Name (CNAME) Records
Aliases for hostnames Usually associated with Services Format Alias IN CNAME Hostname Examples: imap IN CNAME tempest ns IN CNAME klingon smtp IN CNAME tempest www IN CNAME enigma webmail IN CNAME tempest
18
Mail Exchanger (MX) Records
Special records for domain servers Prioritization and round robin capability Format Domain IN MX pri host Examples: cs.iupui.edu. IN MX tempest cs.iupui.edu. IN MX enigma
19
Other Record Types Service (SVC) Text (TXT) HINFO
Associated with network Services Text (TXT) Notes (also SPF information) HINFO Host information (no longer used)
20
ISC DHCPd Provides IP addresses to client systems
Static – Based on MAC Address Dynamic – Given to unknown hosts Optionally provides other Network settings Subnet Masks DNS Servers ( /etc.resolv.conf ) Default Gateway Network and Broadcast Addresses Lease times
21
/etc/dhcpd.conf authorative; #ddns-update-style ad-hoc;
ddns-update-style none; one-lease-per-client true; host camera { hardware ethernet 00:40:8c:5b:c1:91; fixed-address ; } # Block Bad MAC address host ronin { hardware ethernet 00:20:e0:67:53:68; subnet netmask { option domain-name "cs.iupui.edu"; option domain-name-servers option subnet-mask ; option broadcast-address ; option routers ; pool { range ; default-lease-time 7200; max-lease-time ; deny known clients; }
22
/etc/dhcpd.leases Active Lease Entry Expired Lease Entry
starts /12/05 04:14:12; ends /12/05 06:14:12; binding state active; next binding state free; hardware ethernet 00:13:72:da:2c:ad; uid "\001\000\023r\332,\255"; client-hostname "in-csci-16sl247"; } Expired Lease Entry lease { starts /12/04 22:45:28; ends /12/05 00:45:28; tstp /12/05 00:45:28; binding state free; hardware ethernet 00:18:8b:d9:d5:a9; uid "\001\000\030\213\331\325\251"; client-hostname "in-csci-lt1"; }
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.