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

Re: [Semi-OT] dhcp "bogus server name"

On Wed, Jun 18, 2003 at 11:16:08PM -0500, Chris Reining wrote:
> This is somewhat offtopic, but I figured this would be one of the best
> places to ask. I am trying to install a new obsd box on a network where
> I have DHCP an address. However, when I run dhclient I get "bogus server
> name" (Cayman3000/881485) and cannot get a lease. I haven't looked at
> dhclient.c in depth yet but does anyone know a workaround for getting a
> lease *during an install* ?
dhclient is checking the server name in the offer very strictly. The
name must be alphanumeric without spaces. It may contain periods and
hyphens, but not at the start or end. Basically, the server name must
look like a hostname. For instance, "Cayman3000/881485" or "Cayman3000 "
would not pass, while "Cayman.3000" or "Cayman3000" would.
Check your router manual/configuration, maybe you can change the name it
uses as server name in DHCP offers. You can relax dhclient's checking
(see /usr/src/usr.sbin/dhcp/dhclient/dhclient.c, res_hnok() function),
but you'd have to build your own release (see release(8)) to create a
floppy image or ramdisk kernel with the patched dhclient.
I'd just manually enter the IP address during the install, and patch
dhclient later. If you don't know what IP address/netmask/gateway etc.
to use, boot up a box with another OS, then note its settings. Or check
your router configuration. You don't need a lease, you just need to know
the values.