In this module we look into advanced networking. We explore the following -
DHCP (Dynamic Host Configuration Protocol)
DHCP Configuration
DHCP Operations
Superscopes
DHCP troubleshooting
Authorisation
Dynamic Host Configuration Protocol (DHCP) reduces network complexity and administration.
DHCP Clients:
automatically obtain network config from a DHCP server.
use UDP port 67/68
uses network braodcasts on local subnet FF:FF:FF:FF:FF
Dynamic IP configuration - allocate "lease" IP address from a 'pool' (called 'scopes' in Windows) of addresses
"lease" is for specific adapter MAC & for specific length of time.
Can also "reserve" an IP address for a specific hosts
Good for servers, printers, hosts
Source: UTS FEIT Network Servers lecture slide
Reply with DHCPRELEASE when finished
broadcast DHCPDISCOVER UDP packet on local subnet
Chooses lease & broadcasts DHCPREQUEST packet
Can also reply with DHCPDECLINE if duplicate
Broadcast DHCPOFFER with lease info
Select server replies with DHCPACK, DHCPNAK
Source: UTS FEIT Network Servers lecture slide
DHCP Scope is rangae of IP addresses for leasing.
Fixed IP addresses for specific DHCP client is called DHCP Reservation.
Required:
subnet,
default router,
domain name server and optional: log server,
hostname,
requested ipaddress,
TFTP server,
lease time, etc.
Packages and daemon: dhcp-server(previous: dhcp), dhclient and dhcpd
yum install dhcp-server #install
rpm –qc dhcp-server #check configurations
Global options: /etc/dhcp/dhcpd.conf
Example file: /usr/share/doc/dhcp-server/dhcpd.conf.example
/var/lib/dhcpd/dhcpd.leases # do not change
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org, 8.8.8.8;
default-lease-time 600;
max-lease-time 7200;
Hostname: /etc/hostname
hostnamectl set-hostname myhostname.mydomain
‘mydomain’ will be added into /etc/resolv.conf
Source: UTS FEIT Network Servers lecture slide