Feature #11990


DHCP client support for "Classless Static Route" option

Added by Joshua M. Clulow almost 4 years ago. Updated 10 months ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:


RFC 3442 describes a DHCP option used to provide a static route entry to the client. This option is quite flexible, and allows for both next-hop style routes (where a prefix is directed through a locally accessible gateway) and for local routes (where an off-subnet host is described as being directly accessible).

Google Compute Engine (GCE) uses a somewhat eccentric network configuration, which it describes to the guest using this DHCP option. In particular, the DHCP server provides a 32 bit subnet mask; i.e., there are no on-subnet hosts. The DHCP server then provides a classless route option for an off-subnet gateway IP, and a default gateway entry using that off-subnet IP.

Actions #1

Updated by Electric Monk over 3 years ago

  • Gerrit CR set to 181
Actions #2

Updated by Nikola M. about 2 years ago

This also happens in Hetzner cloud, if it is the same thing,
Smartos/illumos machine does not function properly as a guest in cloud (KVM) host,
e.g. only gets internet access with netmask /1 but DHCP default is also /32 and doesn't work.
Seems to me that ' pointopoint ' option support is needed during the DHCP so that the internet connection would work reliably.
For example ping doesn't work and it's not sure if internet connection is fine with /1.

Is ifconfig or other workaround available, to set ' pointopoint ' option statically?
( )

Actions #3

Updated by Denis Ovsienko about 2 years ago

Correction: Hetzner uses Virtio SCSI, so the OS does not boot there in the first place. The issue with DHCP reproduces exactly as described on Fasthosts (VMWare, PVSCSI), where OpenIndiana can install itself and boot. Fasthosts supplies the VM with the following configuration:

IPv4: /32 with a "scope link" default route via (does not work in OpenIndiana, works in Linux)
IPv6: /128 with a default route via fe80:: (works in OpenIndiana, works in Linux)

Currently I use a workaround for the IPv4 leg as follows (X.X.X.X is the VM IPv4 address):

route add -host X.X.X.X -interface -ifp vmxnet3s0
route add -inet default

Given these static routes, the rest of the IPv4 stack works fine. So most likely the problem is in the DHCP client only.

Actions #4

Updated by Nikola M. about 2 years ago

Thank you Denis for your workaround route commands, they worked . (and put into /opt/custom/smf/ after setting up SMF service ) ) .
Route commands ,presumably with '-p' , probably should work for all illumos distros).
- Btw, Hetzner cloud allows one to request virtio (as oppose to virtio-scsi, not supported in illumos GZ) disk as the block devica, on KVM, and also allows one to request ISO image upload (smartos-latest) via support ticket requests, and then install works from mounted ISO.

Actions #5

Updated by Denis Ovsienko about 2 years ago

Thank you for this information, in my experiments I used only those hosting features that were already available for self-service at the time.

Actions #6

Updated by Nikola M. 10 months ago

I gladly report that now one is able to install SmartOS on Hetzner cloud out-of-box ,
from smartos-20221201T010802Z.iso onwards, without requesting for hoster to convert disk to virtio, but can see disks as virtio-scsi default.
Network settings still need setting up as described in post-boot script.


Also available in: Atom PDF