Configure DHCP remote service with dnsmasq

This page describes how to configure the Abiquo DHCP remote service using dnsmasq, which overcomes some limitations of DHCP in a cloud environment.

 

In Abiquo 6.1.1+, the dnsmasq remote service supports the use of self-signed certificates for test environments

Requirements

The DHCP remote service that uses dnsmasq runs version 2.76.

  1. The remote service requires:

    1. A Tomcat server that is compatible with Abiquo Remote Services

      1. To configure this service independently of the other remote services, you can start a separate Tomcat using another port on a Remote Services server or on a separate server

    2. A service network interface that VMs can reach to obtain their IPs

  2. DHCP with dnsmasq requires an IP address in each network. By default, this is the last address in the network range. The platform will exclude this IP from the valid address range to assign to VMs for the network

    1. To add existing networks in an existing datacenter, you will require an IP file as described in the procedure below

Install dnsmasq remote service

  1. Download the current version of the Abiquo dnsmasq package and install it.
    For example, to install a package with yum:

    yum install http://10.60.20.42/5.x/pkgs/el7/abiquo-dnsmasq-5.0.1-6018.el7.noarch.rpm



  2. The dnsmasq remote service package will install Ruby and ruby-devel and gems as required. 
    The package install process uses the following commands:

    yum install ruby ruby-devel gem install json -v 1.7.7 gem list *** LOCAL GEMS *** bigdecimal (1.2.0) io-console (0.4.2) json (1.7.7) psych (2.0.0) rdoc (4.0.0)





Configure dnsmasq remote service in the datacenter

On the Remote Services server

  1. Edit the abiquo.properties file and set the service interface, and if required, set the base directory (for the leases and other configuration) and the path to the scripts

    abiquo.dnsmasq.serviceiface = eth1 abiquo.dnsmasq.basedir = /opt/abiquo/dhcp abiquo.dnsmasq.startscript = /opt/abiquo/scripts/dnsmasq-vlan-start.rb abiquo.dnsmasq.stopscript = /opt/abiquo/scripts/dnsmasq-vlan-stop.rb abiquo.dnsmasq.reloadscript = /opt/abiquo/scripts/dnsmasq-vlan-reload.rb



  2. Restart the DHCP remote service that uses dnsmasq or the Tomcat server

  3. In Abiquo, add the DHCP remote service that uses the dnsmasq with its IP address and with the port 

    1. The default port is 8009

  4. When you create a new datacenter, select the new DHCP remote service. To use it with an existing datacenter, follow the instructions to configure dnsmasq with existing datacenter networks.

Configure dnsmasq with existing datacenter networks 

  1. If you have an existing datacenter with networks, use the restore scripts to register the IP addresses in dnsmasq and create leases for them at the datacenter or network level.

  2. To add the current network setup of the datacenter to dnsmasq

    1. Create an IP file to map the CIDRs to DHCP network addresses to input to the restore process. The following example of the file format shows default private networks, an external network, and a public network.

       

    2. Obtain the API ID of your datacenter (e.g. 14

    3. Run the datacenter restore command using the IP address and credentials of your MySQL server and your Dnsmasq Remote Services server

       

  3. To add a given network to dnsmasq

    1. Obtain the API ID of your network (e.g. 10)

    2. Run the network restore command  using the IP address and credentials of your MySQL server and your Dnsmasq Remote Services server



Related links

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved