Results 1 to 3 of 3

Thread: set hostname from DHCP

  1. #1
    Join Date
    May 2008
    Location
    Jerusalem, Israel
    Beans
    6
    Distro
    Ubuntu 8.04 Hardy Heron

    set hostname from DHCP

    Hi all,

    I've been trying to figure out how to make my Ubuntu machine get its hostname from DHCP on boot. This is the standard in several other distributions, e.g. SuSE.
    I tried to find some clue in the documentation of the dhcp3-client but to no avail. I later tried to install 'dhcpcd' and even though the SET_HOSTNAME='yes' it still doesn't do it. It seems as if it ignores the hostname from the DHCP. 'pump' didn't work either.

    Oh, and one more thing. The same machine on a fresh install gets the correct hostname from DHCP, but the thing is that this hostname changes from time to time and the machine has to keep-up...

    If anyone has any idea on how to fix it, it would be greatly appreciated.

    Dror

  2. #2
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: set hostname from DHCP

    I know there's an option in /etc/dhcp3/dhclient.conf , but I'll have to check it when I get home in a couple of hours.

    This thread was trying to go the other way.

    Update: The default dhclient.conf file contains a line/section:
    Code:
    request subnet-mask, broadcast-address, time-offset, routers,
            domain-name, domain-name-servers, host-name,
            netbios-name-servers, netbios-scope;
    Last edited by Iowan; August 11th, 2008 at 11:45 PM.
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  3. #3
    Join Date
    May 2008
    Location
    Jerusalem, Israel
    Beans
    6
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: set hostname from DHCP

    Thanks for your reply!
    I tried it, but it didn't seem to work. I suppose I might have a problem with the DHCP server
    Thanks anyways

    Dror

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •