cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Logan Barfield <>
Subject Guest IP Reservation
Date Thu, 30 Oct 2014 18:55:59 GMT
Just trying to clear something up before I submit a bug report:

When using IP reservation in an isolated network it looks like the virtual
router is getting the wrong netmask.

For example:
- Network CIDR:
- Guest CIDR:
- Reserved IP Range:
- Virtual Router IP:

With this configuration, the Virtual Router gets get following

eth0      Link encap:Ethernet  HWaddr 02:00:55:eb:00:03
          inet addr:  Bcast:  Mask:

Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface         UG    0      0        0 eth2 U     0      0        0 eth0 U     0      0        0 eth2     U     0      0        0 eth1

This means that any server or VM configured in the reserved IP range cannot
ping the VR or use it for routing.  They also will not be able to contact
VMs deployed by CloudStack because there is no routing available, and the
CloudStack VMs inherit the /25 netmask from the VR.

To resolve this I think the following changes would be required:

Right now it seems that the /etc/init.d/postinit script configures the VR
interfaces using the details in '/var/cache/cloud/cmdline':

# cat /var/cache/cloud/cmdline
template=domP name=r-236-VM eth2ip= eth2mask=
gateway= eth0ip= eth0mask= domain= cidrsize=25 dhcprange= eth1ip=
eth1mask= type=router disable_rp_filter=true dns1=
dns2= useextdns=true

I believe whatever is generating the data in '/var/cache/cloud/cmdline'
should be changed.  It should pull the 'eth0mask' from the 'Network CIDR'
instead of the 'Guest CIDR'.  This will allow for routing and communication
between CloudStack VMs, and hosts on the reserved portion of the network.

The remaining issue is ensuring the VR doesn't issue IPs from the reserved
range.  I don't think this is a problem anyway since CloudStack seems to
manually set up the static DHCP reservations (with /etc/dhcphosts.txt), but
the following change could still be made:

- Instead of using the VR IP in the dhcp-range (ex:
dhcp-range=,static), it could be set as the inverse of the reserved
network (ex: dhcp-range=,,,infinite).  I
believe the dhcp-range is also pulled from '/var/cache/cloud/cmdline'.

Am I misunderstanding how this feature is supposed to work, or should I go
ahead and create a bug report for this?

Thank You,

Logan Barfield
Tranquil Hosting

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message