tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Google Compute Engine networking stopped working



On 21/08/2017 18:34, Benny Siegert wrote:
GCE Networking has DHCP return a host address with a /32 netmask, plus
a gateway with a different address. The trick is that you also need a
host route to the gateway, directly over the interface.

Then GCE Networking should also set a static route to the gateway like
so (where the gateway IP is 1.2.3.4):
         1.2.3.4 1.2.3.4

Or via a CSR option:
         32/1.2.3.4 1.2.3.4

It comes via a classless static route:

# dhcpcd -U vioif0
broadcast_address=10.240.0.2
classless_static_routes='10.240.0.1/32 0.0.0.0 0.0.0.0/0 10.240.0.1'
dhcp_lease_time=86400
dhcp_message_type=5
dhcp_server_identifier=169.254.169.254
domain_name=c.gobuilder-bsiegert.internal
domain_name_servers=169.254.169.254
domain_search='c.gobuilder-bsiegert.internal google.internal'
host_name=netbsd8-dhcptest.c.gobuilder-bsiegert.internal
interface_mtu=1460
ip_address=10.240.0.2
network_number=10.240.0.2
ntp_servers=169.254.169.254
routers=10.240.0.1
subnet_cidr=32
subnet_mask=255.255.255.255


Is it only taking the "routers" field into account and disregarding
the classless_static_routes?

Over way around :)
If classless_static_routes is present then dhcpcd ignores both routers and static_routes.

From the looks of it, this should already be fixed in -current where we have dhcpcd-7.0.0-rc1

Can you test that please, or if that fails my latest git trunk?

Roy


Home | Main Index | Thread Index | Old Index