Project

General

Profile

Actions

Feature #11990

open

DHCP client support for "Classless Static Route" option

Added by Joshua M. Clulow over 2 years ago. Updated 9 months ago.

Status:
New
Priority:
Normal
Category:
networking
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

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 almost 2 years ago

  • Gerrit CR set to 181
Actions #2

Updated by Nikola M. 9 months 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 google.com 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?
( https://docs.hetzner.com/cloud/servers/static-configuration )

Actions #3

Updated by Denis Ovsienko 9 months 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 10.255.255.1 (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 10.255.255.1 X.X.X.X -interface -ifp vmxnet3s0
route add -inet default 10.255.255.1

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. 9 months ago

Thank you Denis for your workaround route commands, they worked . (and put into /opt/custom/smf/smartos_setup.sh after setting up SMF service ) https://wiki.smartos.org/administering-the-global-zone/ ) .
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 9 months 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

Also available in: Atom PDF