W4-Dynamic Networking
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
DHCP
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
Address Allocation
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
DHCP Operations
Source: UTS FEIT Network Servers lecture slide
Reply with DHCPRELEASE when finished
DHCP Client
broadcast DHCPDISCOVER UDP packet on local subnet
Chooses lease & broadcasts DHCPREQUEST packet
Can also reply with DHCPDECLINE if duplicate
DHCP Server
Broadcast DHCPOFFER with lease info
Select server replies with DHCPACK, DHCPNAK
Source: UTS FEIT Network Servers lecture slide
DHCP Scopes
DHCP Scope is rangae of IP addresses for leasing.
DHCP Reservation
Fixed IP addresses for specific DHCP client is called DHCP Reservation.
Standard DHCP Operations
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;
How to set
Hostname: /etc/hostname
hostnamectl set-hostname myhostname.mydomain
‘mydomain’ will be added into /etc/resolv.conf
Network Configuration - Change ifcfg file
Source: UTS FEIT Network Servers lecture slide