...
Note |
---|
This documentation is for troubleshooting DHCP with the omapi protocol |
Check messages log file on DHCP Server
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 |
...
Code Block | ||
---|---|---|
| ||
service dhcpd restart |
Checking the DHCP
...
relay server
Check the VLAN interfaces
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
No. of DHCP | Name of Generator Scriptgenerator script | Names of Scripts Generated by Initial Scriptscripts generated by initial script | Other Config Filesconfig files | Wiki Linklink |
---|---|---|---|---|
One | abiquo-relay-scripts.py | relay-config | dhcpd.conf | |
Multiple | dhcpconf | config-routes-server.sh; and | dhcpd.conf |
Checking the DHCP
...
server
Check the
...
DHCP configuration file
Code Block |
---|
$ cat /etc/dhcpd.conf |
...
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:
...
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 |
...
Code Block |
---|
ps -ef|grep dhcp |
Div | ||
---|---|---|
| ||
|
Both commands should display a listing of the interfaces that DHCP is listening on. If they don't, please rerun the create-vlans script.
Checking
...
hypervisors
Check communication between DHCP and the hypervisor
a. Deploy a virtual machine
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 |
Checking
...
virtual machines
Check the virtual machine configuration for classless static routes under RFC3442
Windows 7 VM
Windows 7 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:
...