Monday, May 04, 2020

dhcp dhcp problem with ramnode.com: "CLASSLESS_STATIC_ROUTES too long" (workaround included)

Hi misc,

I'm mostly posting this so people doing a web search can find my
workaround. However, if someone's interested in debugging it, I'm
happy to cooperate. I don't know whether this is dhclient's fault or
ramnode's fault.

Here is my /etc/dhclient.conf ; the comment mostly explains the issue.
Without this, dhclient doesn't set up routing, so I can't access the
outside network.

-- BEGIN /etc/dhclient.conf

# OpenBSD's dhclient seems to play badly with ramnode's implementation of
# classless-static-routes, as shown in the following example. (I don't know if
# specifying -v a second time did anything.)
#
# # dhclient -vv vio0
# vio0: DHCPREQUEST to 255.255.255.255
# vio0: DHCPACK from 168.235.109.252 (fa:16:3e:60:7a:33)
# vio0: CLASSLESS_STATIC_ROUTES too long
# vio0: 168.235.109.198 lease accepted from 168.235.109.252
(fa:16:3e:60:7a:33)
#
# The below request line contains the default value with classless-static-routes
# removed (according to the default documented in the dhclient.conf(5) man
# page). This alone didn't fix the problem, so I added the ignore line. I guess
# the ignore on its own might be enough but there's a certain logic to not
# asking for something we're going to ignore.
request bootfile-name,broadcast-address,host-name,domain-name,domain-name-servers,domain-search,routers,subnet-mask,tftp-server-name,time-offset;
ignore classless-static-routes;

-- END /etc/dhclient.conf

A couple more notes:

* I set up my server by initializing its disk with install66.fs. I
needed the network for the install to work, since I overwrote the disk
with the new server's partition layout. To get the network to work
temporarily, I ran dhclient -v vio0, noted the IP address that the
DHCPACK came from, and simply ran "route add default (that IP)". It's
not the same IP that gets configured when I use the above workaround,
but it worked.

* Before I implemented the workaround, I remember /etc/hostname.vio0
had an entry for classless-static-routes, even though dhclient said
"CLASSLESS_STATIC_ROUTES too long". I haven't delved deep enough into
the code to understand the significance of that, but mentioning it in
case it's relevant.

BTW, this is my first time using OpenBSD, and I'm quite happy so far.

James

No comments:

Post a Comment