Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

...

classtocc

...

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

May 

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
# tail /var/log/messages
Div
classtinycode
Code Block

A DHCPREQUEST DHCPREQUESTs should be followed by a DHCPACK should displayDHCPACKs log entries.  If not, try restarting the DHCP service:  service dhcpd

Restart the DHCPD service

Code Block
service dhcpd restart

...

Check the DHCP

...

relay server

Check

...

Check if the VLAN interfaces were created on the DHCP Relay Server.

Code Block
ifconfig | more

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

Relay Servers

relay servers

Name of

Generator Script

generator script

Names of

Scripts Generated by Initial Script

scripts generated by initial script

Other

Config Files

config files

Wiki

Link

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

...

configuring multiple DHCP relay servers

Check the DHCP

...

server

Check the

...

DHCP configuration file

code
Code Block
$ cat /etc/dhcpd.conf
title

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.

...

Code Block
# Add static route to DHCP Relay server
10/8 via 192.168.1.2

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:

title
Code Block
$ more /var/lib/dhcpd/dhcpd.leases
Code Block

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

title
Code Block
cat /etc/sysconfig/dhcpd
Code Block

/etc/sysconfig/dhcpd

Code Block
\# Command line options here
DHCPDARGS="eth1 eth1.2 eth1.3 eth1.4 ... eth1.n"
class
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

Checking Chef Intergration

Abiquo Chef integration requires the API location to be set in the abiquo.properties file. 

See Troubleshooting Abiquo Chef Integration

Checking Virtual Machines

...

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.

Check if you have the static routes.

...

tinycode
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.

Div
classtinycode
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 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