380 likes | 512 Vues
This lecture provides a comprehensive overview of networking initialization and DNS configuration across IRIX, Solaris, and FreeBSD operating systems. Key concepts include hostname configuration, IP addressing, netmask settings, and default route definitions. Students will learn to manage networking startup scripts, setup multiple interfaces, and configure DNS settings such as /etc/resolv.conf. The course elaborates on essential files and parameters relevant to each system, equipping administrators with the knowledge to effectively manage networking and DNS functions.
E N D
Lecture 4 Networking Startup/DNS Computer System Administration
Networking Initialization: IRIX • Hostname • /etc/sys_id • IP Address • /etc/hosts • nsswitch.conf • Netmask • /etc/config/ifconfig-1.options • Default route • /etc/config/static-route.options
/etc/config/ifconfig-1.options • Appended to ifconfig command for first interface • netmask 0xffffff00 • 255.255.255.0 • /24
/etc/config/static-route.options • Script file, multiple routing commands can be added • $ROUTE $QUIET add default 128.213.30.1
IRIX: Multiple Interfaces • Hostname-INTERFACE • /etc/hosts • irix-1-ec0.sysadmin.cs.rpi.edu • /etc/config/ifconfig-#.options • Netmasks, etc.. for additional controllers • /etc/config/static-route.options • Add additional $ROUTE lines
Solaris: Networking Startup • Hostname • /etc/hostname.INTERFACE • Machine hostname from primary interface • IP Address • /etc/hosts • /etc/nsswitch.conf • Netmask • /etc/netmasks • Default Route • /etc/defaultrouter
Solaris: Multiple Interfaces • Hostnames • /etc/hostname.INTERFACE • Only primary interface sets global hostname • IP Address • /etc/hosts • Netmask • /etc/netmasks • Static routes • Create your own startup script using route(1)
FreeBSD: Networking Startup • All in /etc/rc.conf • Hostname • hostname=”hostname” • IPAddress/Netmask • ifconfig_INTERFACE=”inet address netmask netmask” • Default Route • defaultrouter=”address”
FreeBSD: Multiple Interfaces • All in /etc/rc.conf • No need to reset hostname • IP addresses • Additional ifconfig_INTERFACE lines • Static routes • static_routes=”name1 name2...” • route_name1=”route(8) args” • route add ${route_name1}
DNS: Client Configuration • /etc/nsswitch.conf • IRIX/Solaris/FreeBSD5+/Many Linux Distributions • hosts: • files • /etc/hosts • dns • DNS • nis • YP/NIS • Man(1)-page!
DNS: Resolver • /etc/resolv.conf • domain • Default appended to end of most requests. • search • List of possible extensions to requests • Mutually exclusive • nameserver • Can be listed multiple times • Adds additional servers to the ones queried
Libresolv and state • resolver library is stateless/unshared • Failed nameservers keep being tried, with delay • Name Service Caching • Keeps state of servers • Solaris • nscd • Name Service Cache Daemon • Irix • nsd • Name Service Daemon
DNS: 2 Databases • Name to address (Forward) • Registrars • Verisign, EDUCause, etc... • edu/com/net/org/biz/cc/... • Address to name (reverse) • NICs • ARIN/APNIC/RIPE • in-addr.arpa.
Forward • Forward • Delegated on “.” boundaries • Bottom up • edu is the most broad • then rpi is more specific • then cs • Etc.
vs. Reverse • Reverse • Delegated on “.” boundaries • Top down. • 128.213 is the most broad (classes!) • 30 is more specific • 2 is a given host.
IP Classes • Class based IP routing • A • 127 class A addresses, each address has 16.7million IPs • /8 • All addresses begin (bitwise) 0 • B • ~50,000 class B addresses, each address has 65536 Ips • /16 • All Addresses begin (bitwise) 10 • C • Many, 256 Ips, /24, begin “110”
Classless Routing • Poor utilization of IP addresses • Class A addresses largely wasted. • Allows for almost arbitrary sized networks • 24.a.b.c no longer 1 network • 24.5.7.x/24 • 24.6.x.y/16 • 24.8.0.0-24.9.255.255/17 • 128.213.30.16-128.213.30.31/28 • Much more load on routers
DNS: Start of Authority • SOA • Required to delegate a domain • Fields to specify maintainership of a domain • Authoritative server • Authoritative email (in DNS format) • Serial number • Refresh • Retry • Expire (TTL) • Minimum
DNS: Other records • NS: NameServer • IN NS name • A: Address • IN NS IP_Address • MX: Mail Exchange • IN MX priority name • TXT: Text • IN TXT “data” • RP: Responsible Person, points to a TXT
DNS: Other Records • CNAME (alias) • IN CNAME name • Cannot be combined with types other than A and PTR • PTR (Pointer) (reverse DNS) • IN PTR name • AAAA/A6 • 2 types of IPv6 address • AAAA: raw, undelegated. A6: delegated
Reverse Lookup • Reverse (literally) lookup • IP Address must be reversed so it too is in bottom-up order. • Name-to-address: • monica.cs.rpi.edu 128.213.7.2 • Address-to-name: • 2.7.213.128.in-addr.arpa monica.cs.rpi.edu
DNS: Forward Example @ IN SOA turing.cs.rpi.edu. labstaff.cs.rpi.edu. ( 200302253 ;Serial 86400 ;Refresh 3600 ;Retry 604800 ;Expire (TTL) 86400 ) ;Minimum labstaff IN TXT “Department of Computer Science” IN NS turing.cs.rpi.edu. IN NS stumble.cs.rpi.edu. IN NS netserv1.its.rpi.edu. turing IN A 128.213.1.1 IN MX 1 mumble.cs.rpi.edu. stumble IN A 128.213.8.7 IN MX 1 mumble.cs.rpi.edu. netserv1.its.rpi.edu. IN A 128.113.1.5 www IN CNAME stumble
DNS: Reverse Example @ IN SOA turing.cs.rpi.edu. labstaff.cs.rpi.edu. ( 200302213 86400 3600 604800 86400 ) IN NS turing.cs.rpi.edu. IN NS stumble.cs.rpi.edu. IN NS netserv1.its.rpi.edu. 2.7 IN PTR monica.cs.rpi.edu. 1.1 IN PTR turing.cs.rpi.edu. 18.30 IN PTR irix-1.sysadmin.cs.rpi.edu.
DNS: Forward Delegation delegate IN NS their.name.server. IN NS their-secondary.name.server. their.name.server IN A address their-secondary.name.server IN A address
DNS: Reverse Delegation 24 IN NS their.name.server. ;must be in fwd IN NS their-secondary.name.server. ;must be in fwd
DNS: Classless Reverse Delegation • Delegating reverse DNS when not on “.” boundaries • RFC 2317 • Clever and painfull use of CNAMEs(aliases) • Create new level of DNS in reverse and alias all reverse IPs to that.
DNS: Classless Reverse Delegation, Delegator ; using delegation of 128.213.30.16/28 as an example 16/28 IN NS group-1-dns.sysadmin.cs.rpi.edu. IN NS group-1-secondary-dns.sysadmin.cs.rpi.edu. 16 IN CNAME 16.16/28.30.213.128.in-addr.arpa. 17 IN CNAME 17.16/28.30.213.128.in-addr.arpa. 18 IN CNAME 18.16/28.30.213.128.in-addr.arpa. 19 IN CNAME 19.16/28.30.213.128.in-addr.arpa. 20 IN CNAME 20.16/28.30.213.128.in-addr.arpa. 21 IN CNAME 21.16/28.30.213.128.in-addr.arpa.
DNS: Classless Reverse Delegation, Delegate-ed $ORIGIN 16/28.30.213.128.in-addr.arpa 16 IN PTR net.group1.sysadmin.cs.rpi.edu. 17 IN PTR router.group1.sysadmin.cs.rpi.edu. 18 IN PTR irix.group1.sysadmin.cs.rpi.edu. 19 IN PTR solaris.group1.sysadmin.cs.rpi.edu. 20 IN PTR freebsd.group1.sysadmin.cs.rpi.edu.
DNS: Server Configuration • Type of server • Master • Slave • Cache • Zone Config files • Forward • Reverse • hints
named.conf acl transferers { 128.213.0.0/16; 128.113.0.0/16; 1.2.3.4; }; acl local {128.213.0.0/16; 128.113.0.0/16}; acl evil {2.3.4.5;}; options { directory “/etc/namedb”; allow-transfer { transferers; }; allow-recursion { local; }; blackhole { evil; }; recursion no; }; zone “vassar.edu” { type slave; file “slave/vassar.edu”; masters { 143.229.1.6; }; };
Named.conf (cont) Zone “.” { /* sets the default $ORIGIN */ type hint; file “named.root”; /*file of root “.” name servers. }; zone “213.128.in-addr.arpa” { type master; file “master/cs.rpi.edu.rev”; also-notify { 128.213.8.7; 128.113.1.3; } }; zone “cs.rpi.edu” { type master; file “master/cs.rpi.edu”; also-notify { 128.213.8.7; 128.113.1.3; } };
named/bind operations • $ORIGIN • Changes suffix appended to all unqualified names • $GENERATE • Used to make series of hosts • Forward • $GENERATE 100-200 d11-$.dyn IN A 128.213.11.$ • Reverse • $GENERATE 100-200 $.11 IN PTR d11-$.cs.rpi.edu.
Name-Server Packages • Solaris • bind8 • SUNWcsu • Core System Utilities • Already installed • Bind9 • http://www.sunfreeware.com/programlistsparc9.html#bind9 • SGI/Irix • Bind8 included • Bind9 • http://www.sunfreeware.com/programlistsparc9.html#bind9
Name Server Packages(cont) • FreeBSD • Bind8: Included • Bind9 • pkg_add -r bind9 • Remember to make sure it starts automatically!
Group Names • foo.group-name.sysadmin.cs.rpi.edu • Existing names will be going away
Next Lecutre • NIS!