AIX 5L Configuring TCP/IP (Unit 10) – BOOTP and DHCP

DHCP – Dynamic Host Configuration Protocol
Maintains a pool of IP Addresses which allows one to dynamically configure platforms.

Unit Objectives
———————–
Describe the concept of BOOTP protocol
Discuss the DHCP functions and features
Configure DHCP network

Diskless Systems (Not common now)
——————————————————-
Cannot store IP configuration information
To boot, system must get:
1. IP stack parameters using BOOTP, DHCP
2. Operating System using TFTP and NFS

NIM – Network Installation Management

Client – Broadcasts a bootp request to a DHCP server (bootpd –> /etc/bootptab)
ha = hardware address for a client

Server responds with an ip address and a boot image for the client and nfs mount information.
NFS Mount – makesysb image file from the NFS Server

BOOTP Concepts
—————————–
Client Broadcasts for a bootrequest
Runs on UDP
Server provides client IP address, boot name file
May also provide vendor-specific information such as subnet mask, name servers
Supports cross-gateway booting with relay agents

Intermittently Connected Hosts
———————————————-
AIX Server with Pool of IP Addresses
Other UNIX – Wants to use TCP/IP – needs IP paramenters
AIX – Finished with TCP/IP – no longer needs IP paramenters

Note: The advantage of DHCP over BOOTP is that you don’t have to pre-assign IP Addresses to specific clients. DHCP maintains a pool of ip addresses that can be served out when needed with a specified lease period. Clients must continually renew the lease.

Dynamic Host Configuration Protocol (DHCP)
——————————————————————-
Based on and compatible with BOOTP
Interoperates with BOOTP relay agents and clients
Adds the following features:
– Dynamic IP address allocation
– Host-specific configuration parameters (ex. print server, gateway, DNS server etc.)
– DHCP server stores key-value entry or client, contains configuration parameters

DHCP Client-SErver Interactions
———————————————–
1. DHCP Client –> Broadcast DHCPDISCOVER
2. DHCP Server –> DHCPOFFER
3. DHCP Client –> DHCPREQUEST
4. DHCP Server –> DHCPACK

Note: If there are more than one DHCP servers, all will respond and reserve an IP address for the client, the client will select the first server offer, the other servers will release the reserved ip address for other clients. The selected server will issue the ip address to the client with other information.

Selected DHCP Options
————————————–
Subnet mask (1) (ex. 1 255.255.255.0)
Time offset (2)
Router (3)
Time server (4)
Domain name server (6)
LPR server (9)
Hostname (12)
Domain name (15)
IP forwarding enable/disable (19)
Interface MTU (26)
Static routes (33)

/etc/options
Note: Some options are not for AIX but for Windows platforms.

DHCP and BOOTP Interoperation
————————————————–
A DHCP Server can issue an infinite lease to a BOOTP Client because the client doesn’t know how to renew or release the lease. These have to be manually released.
A DHCP Client can receive information from a BOOTP Server if it has the correct information but it prefers a DHCP Server response.

DHCP AIX Implementation Example
—————————————————-
Server provides IP address, subnet mask, default router, nameserver address, domain name

You have to have a relay agent to relay a client request to the DHCP server if they are not on the same network.

A router can be configured to be a DHCP relay agent. AIX can also be configured to be a relay agent.

Configure a DHCP Server on AIX
————————————————
# cat /etc/dhcpsd.cnf (dhcp=protocol, s=server, d=daemon)
startsrc -s dhcpsd (start the daemon that reads the configuration file above)

/etc/dhcpsd.cnf
———————–
network 10.0.0.0 24
{
option 1 255.255.255.0 # Subnet Mask
option 6 10.1.1.3 # Name Server
option 15 example.com # Domain
subnet 10.1.1.0 10.1.1.10-10.1.1.254 # Range of IP addresses
{
option 3 10.1.1.1 # Default router
}
}

Configuring a DHCP Client
—————————————-
cat /etc/dhcpcd.ini
numLogFiles 4
logFileSize 100
logFileName /usr/tmp/dhcpcd.log
logItem SYSERR
interface en0

Note: Daemon is dhcpcd read the above file.

Configuring a DHCP/BOOTP Relay Agent
————————————————————–
# cat /etc/dhcprd.cnf
numLogFiles 6
logFileSize 100
logFileName /usr/tmp/dhcpserver.log
logItem SYSERR
server 10.1.1.2

Note: Daemon is dhcprd read the above file.

Unit Summary
—————————
BOOTP protocol
– Supplies IP address, server address, subnet mask
– Supports cross-gateway booting

DHCP protocol
– Designed for dynamic environment, based on and compantible with BOOTP
– Adds dynamic address allocation, host-specific configuration parameters
AIX DHCP daemons are dhcpsd, dhcpcd and dhcprd

Exercise 10 – Configuring DHCP
————————————————
Server sys3
Setup configuration file
backup existing file
cd /etc
cp dhcpsd.cnf dhcpsd.cnf.bak
vi /etc/dhcpsd.cnf
/logItem (search for logItem)
numLogFiles 6
…..
/leaseT
……
Define a network for 9.98.9
at end of file
network 9.0.0.0 24
subnet 9.19.98.0 9.19.98.21-9.19.98.40 (range or pool of ip addresses
{
option 1 255.255.255.0 # Subnet mask
option 3 9.19.98.1 # Default router
}
save

Start dhcpsd server using smit
smit dhcpsd
Start Using DHCPSD server
both
lssrc -s dhcpsd (check for active status)

Client sys2
ifconfig en0 detach
netstat -in (look at current configuration)
cp /etc/dhcpcd.ini /etc/dhcpcd.ini.bak (backup file)
vi /etc/hdcpcd.ini
/logItems (search)
…..
go to end of file
interface en0 (interface used for dynamic configuration)
save

smit dhcpcd
Start …
lssrc -s dhcpcd (check for active status)

Should have automatically broadcast for configuration

ifconfig en0 (dynamically configured from the dhcp server)
netstat -in (en0 is defined)
netstat -r (route defined)
ping sys3
ping sys99r
ping sys4

stopsrc -s dhcpcd
ifconfig en0 detach (deconfigure interface)
netstat -in
/etc/rc.net (reconfigure interface)
netstat -in

Server sys3
stopsrc -s dhcpsd (deconfigure server)

Leave a Reply

Your email address will not be published. Required fields are marked *

*