Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
Note

This documentation is for troubleshooting DHCP with the omapi protocol

Check messages log file on DHCP Server

...

Check the messages file for evidence that DHCP is functioning
Code Block
# tail /var/log/messages

May 5 08:53:32 abiquoserver dhcpd: DHCPREQUEST for 192.168.1.2 from 01:50:51:38:b1:ed via eth0.1
May 5 08:53:32 abiquoserver dhcpd: DHCPACK on 192.168.1.2 to 01:50:51:38:b1:ed via eth0.1
May 5 08:53:38 abiquoserver dhcpd: DHCPREQUEST for 192.168.0.2 from 01:16:31:ee:73:14 via eth0.2
May 5 08:53:38 abiquoserver dhcpd: DHCPACK on 192.168.0.2 to 01:16:31:ee:73:14 via eth0.2

DHCPREQUESTs should be followed by DHCPACKs log entries.  If not, try restarting the DHCP service:

...

...

Restart the DHCPD service
Code Block
service dhcpd restart

Checking the DHCP relay server

Check the VLAN interfaces

...

DHCP relay server creation scripts and configuration files

No. of DHCP
relay servers

Name of generator script

Names of scripts generated by initial script

Other config files

Wiki link

One

abiquo-relay-scripts.py

relay-config

dhcpd.conf

Manually Configuring One DHCP Relay Server

Multiple

dhcpconf

config-routes-server.sh; and
relay-config-X.sh and relay-run-X.sh
for each relay server X

dhcpd.conf

Manually configuring multiple DHCP relay servers

Checking the DHCP server

Check the DHCP configuration file

title
Code Block
$ cat /etc/dhcpd.conf
Code Block
dhcpd.conf
Code Block
ddns-update-style interim;

option classless-static-routes code 121 = array of integer 8;
option ms-classless-static-routes code 249 = array of integer 8;

omapi-port 7911;

subnet 0.0.0.0 netmask 0.0.0.0 {
      default-lease-time 60000;
      max-lease-time 720000;
      option subnet-mask 255.255.255.0;
      option domain-name-servers 8.8.8.8;
}

...

Code Block
$ more /var/lib/dhcpd/dhcpd.leases
Code Block
title
Sample entries from dhcpd.leases
Code Block
host 015016131b12_host {
  dynamic;
  hardware ethernet 01:50:16:13:1b:62;
  fixed-address 192.168.1.2;
          supersede routers = c0:a8:00:01;
          supersede subnet-mask = ff:ff:ff:00;
}
host 01161e7c189f_host {
  dynamic;
  hardware ethernet 01:16:1e:7c:18:9f;
  fixed-address 192.168.1.2;
          supersede subnet-mask = ff:ff:ff:00;
}

...

code
Code Block
cat /etc/sysconfig/dhcpd
title
/etc/sysconfig/dhcpd
Code Block
\# Command line options here
DHCPDARGS="eth1 eth1.2 eth1.3 eth1.4 ... eth1.n"
Code Block
ps -ef|grep dhcp
Div
classtinycode
Code Block
root      2565  2408  0 08:59 pts/1    00:00:00 grep dhcp
root      7049     1  0 Apr28 ?        00:00:07 /usr/sbin/dhcpd eth0 eth0.2 ... eth0.n

...

Code Block
 tcpdump -vv -lenx  udp port bootps or udp port bootpc

...

Check switch configuration

...

Code Block
# ip route
2.2.2.0/24 via 192.168.0.250 dev eth0
192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.2
1.1.1.0/24 via 192.168.0.250 dev eth0
default via 192.168.0.1 dev eth0

If the routes are not present, continue to check the configuration as described below.

...

Check that the following two files exist on the system and are not empty:

  • /etc/dhclient.conf

  • /etc/dhclient-exit-hooks

The contents of these files should be as described in Configuring DHCP#Configure CentOS VM Template to Receive Static Routes by DHCP