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.
The remote service requires:
A Tomcat server that is compatible with Abiquo Remote Services
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
A service network interface that VMs can reach to obtain their IPs
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
To add existing networks in an existing datacenter, you will require an IP file as described in the procedure below
Install dnsmasq remote service
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
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
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
Restart the DHCP remote service that uses dnsmasq or the Tomcat server
In Abiquo, add the DHCP remote service that uses the dnsmasq with its IP address and with the portÂ
The default port is
8009
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Â
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.
To add the current network setup of the datacenter to dnsmasq
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.
Â
Obtain the API ID of your datacenter (e.g.
14
)ÂRun the datacenter restore command using the IP address and credentials of your MySQL server and your Dnsmasq Remote Services server
Â
To add a given network to dnsmasq
Obtain the API ID of your network (e.g.
10
)Run the network restore command  using the IP address and credentials of your MySQL server and your Dnsmasq Remote Services server
Related links
Introduction to dnsmasq on Wikipedia:Â dnsmasq
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved