Hostname with DHCP

  • Follow


Hello to all,

I have following question: Can I define a hostname for myself in Linux
when using dhcp?
In our LAN every NT-Station has a Hostname. The DHCP-Server gives this
hostname back if it is not used jet. Is it used then I get 'Hostname-1'.

Thank for helping!
0
Reply juergen.leeb (8) 7/25/2003 5:35:59 AM

J�rgen Leeb wrote:
> Hello to all,
> 
> I have following question: Can I define a hostname for myself in Linux
> when using dhcp?
> In our LAN every NT-Station has a Hostname. The DHCP-Server gives this
> hostname back if it is not used jet. Is it used then I get 'Hostname-1'.

You can do the following if you always assign the same IP address to the
same machine each time:
host blah { hardware ethernet x:x:x:x:x:x; fixed-address x.x.x.x; option
host-name "blah"; }

Not sure how you would generally pool hostnames the way IP addresses
could be pooled.

Paul

0
Reply nospam5 (163) 7/25/2003 5:52:20 AM


On Fri, 25 Jul 2003 06:52:20 +0100, Paul Black wrote:

> J�rgen Leeb wrote:
>> Hello to all,
>> 
>> I have following question: Can I define a hostname for myself in Linux
>> when using dhcp?
>> In our LAN every NT-Station has a Hostname. The DHCP-Server gives this
>> hostname back if it is not used jet. Is it used then I get 'Hostname-1'.
> 
> You can do the following if you always assign the same IP address to the
> same machine each time:
> host blah { hardware ethernet x:x:x:x:x:x; fixed-address x.x.x.x; option
> host-name "blah"; }

And how to proceed if the IP is not always the same? (as in my case).

Flip


> Not sure how you would generally pool hostnames the way IP addresses
> could be pooled.
> 
> Paul

0
Reply flap (31) 7/31/2003 7:29:16 AM

=?iso-8859-1?Q?J=FCrgen?= Leeb (juergen.leeb@bar.de) wrote:
: Hello to all,

: I have following question: Can I define a hostname for myself in Linux
: when using dhcp?
: In our LAN every NT-Station has a Hostname. The DHCP-Server gives this
: hostname back if it is not used jet. Is it used then I get 'Hostname-1'.

: Thank for helping!

The answer is "yes".  Most of the DHCP server would allow DHCP client
to specify whatever the hostname the client wants and update DNS
properly.  You can read the man page for your DHCP client or tell us
what you use so that we can give you better answer.
0
Reply alyung (28) 8/1/2003 6:14:49 PM

J=FCrgen Leeb wrote:
> Hello to all,
>=20
> I have following question: Can I define a hostname for myself in Linux
> when using dhcp?
> In our LAN every NT-Station has a Hostname. The DHCP-Server gives this
> hostname back if it is not used jet. Is it used then I get 'Hostname-1'=
=2E

Hi Juergen,

another tip from 'de':

as you are from 'de', buy the current german issue (#2) of
'Red Hat Magazin' (EURO 9,95) and read the article on pages 34-39
'Einsatz von DNS und DHCP im privaten Netzwerk' (using
DNS and DHCP in a private network).

It gives information on updating DNS thru DHCP with hostnames
defined by the DHCP clients.

There's also a www.redhatmagazine.com with italian and german
version, but the articles are not on-line.

Toni

0
Reply antonius.erdmann (2) 8/4/2003 7:58:44 AM

Beep wrote:
> Paul Black wrote:
>>You can do the following if you always assign the same IP address to the
>>same machine each time:
>>host blah { hardware ethernet x:x:x:x:x:x; fixed-address x.x.x.x; option
>>host-name "blah"; }
>>
> 
> 
> I did exactly as you mentioned above, replacing x:x: ... and x.x.x.x with my
> ethernet address and IP address, respectively, and got the following error
> messages:
> 
>         host: Couldn't find server '{': Name or service not known
>         fixed-address: Command not found.
>         option: Command not found.
>         }: Command not found.

It's not a command, it's a line that goes in /etc/dhcpd.conf

-- 
Paul Black                        mailto:paul.black@oxsemi.com
Oxford Semiconductor Ltd          http://www.oxsemi.com
25 Milton Park, Abingdon,         Tel: +44 (0) 1235 824 909
Oxfordshire.    OX14 4SH          Fax: +44 (0) 1235 821 141

0
Reply paul.black1 (23) 8/6/2003 2:04:41 PM

5 Replies
80 Views

(page loaded in 0.326 seconds)


Reply: