...
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 |
...
Check the DHCP relay server
...
Check if the VLAN interfaces were created on the DHCP Relay Server.
...
The above command should display the VLAN interfaces along with their IP address. If the interfaces do not show up, you should run the appropriate scripts that are created by the generator scripts. See the table below.
DHCP relay server creation scripts and configuration files table.
No. of DHCP | 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 | dhcpd.conf | Manually configuring multiple DHCP relay servers |
...
Check the DHCP server
Check the DHCP configuration file
Code Block |
---|
$ cat /etc/dhcpd.conf |
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; } |
If the file doesn't exist or is wrong, replace it with the above information.
...
Check for the static route between DHCP server and DHCP relay server
Check that the file /etc/sysconfig/network-scripts/route-eth0 exists on the DHCP Server.
...
If the file doesn't exist or is wrong, replace it with the above information.
...
Check the leases file on the DHCP server
This file contains a MAC/IP list. Check if the VM's MAC address is in this file:
Code Block |
---|
$ more /var/lib/dhcpd/dhcpd.leases |
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; } |
If there aren't any entries in this file, the problem is likely to be with the DHCP Remote Services configuration. The Abiquo "DHCP Service" entry in the Remote Services configuration of the datacenter should point to the IP address of the DHCP Server, not the DHCP Relay.
...
Check classless static routes
If you have added classless static routes to your Abiquo network definitions, the leases should also contain lines with the encoded routes.
Code Block |
---|
supersede classless-static-routes = concat (18:01:01:01:C0:A8:00:FA, 18:02:02:02:C0:A8:00:FA); |
...
Check whether the DHCP Server is listening on interfaces
Code Block |
---|
cat /etc/sysconfig/dhcpd |
/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 |
Output
tinycode |
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 |
Both commands should display a listing list of the interfaces that DHCP is listening on. If they don't, please rerun the create-vlans script.
...
...
Check hypervisors
Check communication between DHCP and the hypervisor
a. Deploy a virtual machineVM
b. Check the VLAN that the virtual machine is on (from within the Abiquo GUI or the hypervisor client)
c. Connect to the DHCP Server (Monolithic: Abiquo Server; Distributed: Remote Services) and run the following command: tcpdump -i eth1.n where n is the VLAN ID
d. Connect to the VM console and run a DHCP request: dhclient eth0
e. Check if there are any broadcast (255.255.255.255) packets in the tcpdump. If yes, then the problem points to an issue with the physical switch.
...
Code Block |
---|
tcpdump -vv -lenx udp port bootps or udp port bootpc |
...
Check switch configuration
Connect to the switch and check if the hypervisors are connected using the right NIC. Also check if the service NIC is listed in the output of 'show mac-address-table' command. Check the VLAN configuration is correct.
...
Code Block |
---|
# configure terminal # vlan 2-200 # exit # interface range fa0/2-23 # switchport mode trunk # no shutdown # exit # interface fa0/24 # switchport mode access # switchport access vlan 2 # no shutdown # exit # exit # copy running-config startup-config |
...
...
Check virtual machines
Check the virtual machine configuration for classless static routes under RFC3442
Windows
...
VM
A Windows 7 VM will accept the option 249 classless static routes without any special configuration.
...
Code Block |
---|
C:\> ROUTE PRINT IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 10.81.0.1 10.81.2.35 266 1.1.1.0 255.255.255.0 192.168.0.250 192.168.1.20 11 2.2.2.0 255.255.255.0 192.168.0.250 192.168.1.20 11 |
CentOS VM
Check if you have the static routes.
...
If the routes are not present, continue to check the configuration as described below.
Check the CentOS VM config files
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 DHCPat /wiki/spaces/ABI54/pages/310740115