computer system administration

38
2/26/2003 Lecture 4 Computer System Administration Lecture 4 Networking Startup/DNS

Upload: zytka

Post on 14-Jan-2016

24 views

Category:

Documents


5 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Computer System Administration

2/26/2003Lecture 4

Computer System Administration

Lecture 4Networking Startup/DNS

Page 2: Computer System Administration

2/26/2003Lecture 4

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

Page 3: Computer System Administration

2/26/2003Lecture 4

/etc/config/ifconfig-1.options

● Appended to ifconfig command for first interface– netmask 0xffffff00

● 255.255.255.0● /24

Page 4: Computer System Administration

2/26/2003Lecture 4

/etc/config/static-route.options

● Script file, multiple routing commands can be added– $ROUTE $QUIET add default 128.213.30.1

Page 5: Computer System Administration

2/26/2003Lecture 4

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

Page 6: Computer System Administration

2/26/2003Lecture 4

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

Page 7: Computer System Administration

2/26/2003Lecture 4

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)

Page 8: Computer System Administration

2/26/2003Lecture 4

FreeBSD: Networking Startup

● All in /etc/rc.conf● Hostname

– hostname=”hostname”● IPAddress/Netmask

– ifconfig_INTERFACE=”inet address netmask netmask”

● Default Route– defaultrouter=”address”

Page 9: Computer System Administration

2/26/2003Lecture 4

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}

Page 10: Computer System Administration

2/26/2003Lecture 4

DNS: Client Configuration

● /etc/nsswitch.conf– IRIX/Solaris/FreeBSD5+/Many Linux Distributions– hosts:

● files– /etc/hosts

● dns– DNS

● nis– YP/NIS

– Man(1)-page!

Page 11: Computer System Administration

2/26/2003Lecture 4

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

Page 12: Computer System Administration

2/26/2003Lecture 4

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

Page 13: Computer System Administration

2/26/2003Lecture 4

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.

Page 14: Computer System Administration

2/26/2003Lecture 4

DNS Hierarchies (forward)

.

EduCom Arpa

RPI

CS

MITMicrosoft In-addr

Page 15: Computer System Administration

2/26/2003Lecture 4

IP Delegations (reverse)

ICANN

IANA

ARIN APNIC RIPE

AOL

You

RPICS

Registrars

Verisign Educause

RPICS

Page 16: Computer System Administration

2/26/2003Lecture 4

Forward

● Forward– Delegated on “.” boundaries– Bottom up

● edu is the most broad● then rpi is more specific● then cs● Etc.

Page 17: Computer System Administration

2/26/2003Lecture 4

vs. Reverse

● Reverse– Delegated on “.” boundaries– Top down.

● 128.213 is the most broad (classes!)● 30 is more specific● 2 is a given host.

Page 18: Computer System Administration

2/26/2003Lecture 4

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”

Page 19: Computer System Administration

2/26/2003Lecture 4

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

Page 20: Computer System Administration

2/26/2003Lecture 4

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

Page 21: Computer System Administration

2/26/2003Lecture 4

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

Page 22: Computer System Administration

2/26/2003Lecture 4

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

Page 23: Computer System Administration

2/26/2003Lecture 4

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

Page 24: Computer System Administration

2/26/2003Lecture 4

DNS: Forward Example@ IN SOA turing.cs.rpi.edu. labstaff.cs.rpi.edu. (

200302253 ;Serial86400

;Refresh3600 ;Retry604800 ;Expire

(TTL)86400 )

;Minimumlabstaff 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.1IN MX 1 mumble.cs.rpi.edu.

stumble IN A 128.213.8.7IN MX 1 mumble.cs.rpi.edu.

netserv1.its.rpi.edu. IN A 128.113.1.5www IN CNAME stumble

Page 25: Computer System Administration

2/26/2003Lecture 4

DNS: Reverse Example

@ IN SOA turing.cs.rpi.edu. labstaff.cs.rpi.edu. (

20030221386400360060480086400 )

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.

Page 26: Computer System Administration

2/26/2003Lecture 4

DNS: Forward Delegationdelegate IN NS their.name.server.

IN NS their-secondary.name.server.their.name.server IN A addresstheir-secondary.name.server IN A address

Page 27: Computer System Administration

2/26/2003Lecture 4

DNS: Reverse Delegation24 IN NS their.name.server.

;must be in fwdIN NS their-

secondary.name.server. ;must be in fwd

Page 28: Computer System Administration

2/26/2003Lecture 4

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.

Page 29: Computer System Administration

2/26/2003Lecture 4

DNS: Classless Reverse Delegation, Delegator

; using delegation of 128.213.30.16/28 as an example16/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.

Page 30: Computer System Administration

2/26/2003Lecture 4

DNS: Classless Reverse Delegation, Delegate-ed

$ORIGIN 16/28.30.213.128.in-addr.arpa16 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.

Page 31: Computer System Administration

2/26/2003Lecture 4

DNS: Server Configuration

● Type of server– Master– Slave– Cache

● Zone Config files– Forward– Reverse– hints

Page 32: Computer System Administration

2/26/2003Lecture 4

named.confacl 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; };

};

Page 33: Computer System Administration

2/26/2003Lecture 4

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; }

};

Page 34: Computer System Administration

2/26/2003Lecture 4

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.

Page 35: Computer System Administration

2/26/2003Lecture 4

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

Page 36: Computer System Administration

2/26/2003Lecture 4

Name Server Packages(cont)

● FreeBSD– Bind8: Included– Bind9

● pkg_add -r bind9

● Remember to make sure it starts automatically!

Page 37: Computer System Administration

2/26/2003Lecture 4

Group Names

● foo.group-name.sysadmin.cs.rpi.edu● Existing names will be going away

Page 38: Computer System Administration

2/26/2003Lecture 4

Next Lecutre

● NIS!