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

Bug#239591: Hostname needed for DHCP



Nick Lewycky wrote:
> Thiemo Seufer wrote:
> >Nick Lewycky wrote:
> >
> >>My @Home in Canada does this too. There's no reason to expect that the
> >>hostname sent out with the DHCP request is related to the hostname of
> >>the machine. I would be very disappointed if my hostname were
> >>"cr979086-a" because that's the string to send with the DHCP request.
> >
> >Probably netcfg-dhcp should still ask for a hostname then, but with
> >the DHCP reply's one as default value.
> 
> That's right, assuming you get a DHCP reply at all.

Sure, otherwise it should stay with "debian" as default.

> I'm talking about a 
> case where the remote DHCP server will up and ignore you unless you toss 
> in a magic string when sending the request.
> 
> So here are the facts about my local machine:
>  - local hostname is wagon.
>  - FQDN is CPE0080c82b6fe5-CM014250030215.cpe.net.cable.rogers.com.
>  - must send "cr979086-a" to the DHCP server to connect.

Ok, so we have hostname, local part and Client-ID.

> It matters whether netcfg-dhcp asks about the hostname before or after 
> the DHCP happens. On a network like mine, here's what could happen:
> 
> Before:
> 1. ask user for local hostname, defaulting to debian

This is really annoying if you have a local DHCP server which is
supposed to provide the hostname.

> 2. load local hostname into /etc/dhclient.conf
> 3. send out DHCP request, receive no response
> X. if we try DHCP before asking the user about their connection method, 
> then ask the user now.
> 4. ask for client ID, load it into /etc/dhclient.conf and try again
> 5. we're now on the network
> 
> After:
> 1. send out DHCP request, receive no response

Or you get one. Best case for a preconfigured LAN, especially for
mass installs.

> X. if we try DHCP before asking the user about their connection method, 
> then ask the user now.
> 2. ask for client ID, load it into /etc/dhclient.conf and try again

Which should then really ask for a DHCP-ID or somesuch, and not for a
hostname.

> 3. we're now on the network, retrieve hostname through DNS
> 4. ask user for local hostname, defaulting to the value from DNS as 
> default (if the ISP has reverse DNS) or the client ID (if it doesn't).

The second method is better for a LAN, and not much worse for Dialups
which need to use a client ID. Btw, I haven't encountered yet a
provider which requires one, so I guess this is a less common case.


Thiemo



Reply to: