dhcpd.conf: fixed-address for a concrete host

This is a discussion on dhcpd.conf: fixed-address for a concrete host within the Linux Networking forums, part of the Linux Forums category; Hello. I have noticed that, in order to assign a fixed IP address to a concrete host using ISC DHCPD, ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-17-2004
knocte
 
Posts: n/a
Default dhcpd.conf: fixed-address for a concrete host

Hello. I have noticed that, in order to assign a fixed IP address to a
concrete host using ISC DHCPD, I should use the following notation:

host name_of_host {
hardware ethernet 00:e0:18:bb:3e:73; /* NIC MAC address */
fixed-address 192.168.1.100; /* IP address */
}

However, I don't want to discriminate the host by the MAC address, I
want to do it just by the name of the host. But if I delete the
"hardware ethernet" line, it doesn't work as I want to (I am using WinXP
clients). I have been googling, and I have also tried some options such
'option host-name "name_of_host"', 'ddns-updates on',
'use-host-decl-names on', 'allow unknown-clients'. But neither of them
work. I hope some of you guys could help me.

Regards and thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 02-17-2004
Syam
 
Posts: n/a
Default Re: dhcpd.conf: fixed-address for a concrete host

Simply there is no other way to allocate fixed IP using dhcp.

Just give it a little thought ;-)

Hint : Think of chicken and egg problem !



knocte <knocte@NO-SPAM-PLEASE-hotmail.com> wrote in message news:<c0rt7r$rr4$1@nsnmrro2-gest.nuria.telefonica-data.net>...
> Hello. I have noticed that, in order to assign a fixed IP address to a
> concrete host using ISC DHCPD, I should use the following notation:
>
> host name_of_host {
> hardware ethernet 00:e0:18:bb:3e:73; /* NIC MAC address */
> fixed-address 192.168.1.100; /* IP address */
> }
>
> However, I don't want to discriminate the host by the MAC address, I
> want to do it just by the name of the host. But if I delete the
> "hardware ethernet" line, it doesn't work as I want to (I am using WinXP
> clients). I have been googling, and I have also tried some options such
> 'option host-name "name_of_host"', 'ddns-updates on',
> 'use-host-decl-names on', 'allow unknown-clients'. But neither of them
> work. I hope some of you guys could help me.
>
> Regards and thanks in advance.

Reply With Quote
  #3 (permalink)  
Old 02-17-2004
knocte
 
Posts: n/a
Default Re: dhcpd.conf: fixed-address for a concrete host

Syam escribió:
> Simply there is no other way to allocate fixed IP using dhcp.
>
> Just give it a little thought ;-)
>
> Hint : Think of chicken and egg problem !
>


Thanks for your reply.
You mean that when the host doesn't have an IP address yet, it neither
knows its hostname? I thought that the host name was sent during this
DHCP request.

Regards,

knocte
Reply With Quote
  #4 (permalink)  
Old 02-17-2004
Thomas Drillich
 
Posts: n/a
Default Re: dhcpd.conf: fixed-address for a concrete host

Syam wrote:

> Simply there is no other way to allocate fixed IP using dhcp.
>
> Just give it a little thought ;-)
>
> Hint : Think of chicken and egg problem !
>
>

not complete correct, you can advice the dhcp-client
to send a different client identifier instead of the
ethernet mac address.
take a look at dhclient.conf and dhcp-options
option dhcp-client-identifier "CLIENT-FOO"


cu thomas
Reply With Quote
  #5 (permalink)  
Old 02-17-2004
Kurt
 
Posts: n/a
Default Re: dhcpd.conf: fixed-address for a concrete host


"knocte" <knocte@NO-SPAM-PLEASE-hotmail.com> wrote in message
news:c0rt7r$rr4$1@nsnmrro2-gest.nuria.telefonica-data.net...
> Hello. I have noticed that, in order to assign a fixed IP address to a
> concrete host using ISC DHCPD, I should use the following notation:
>
> host name_of_host {
> hardware ethernet 00:e0:18:bb:3e:73; /* NIC MAC address */
> fixed-address 192.168.1.100; /* IP address */
> }
>
> However, I don't want to discriminate the host by the MAC address, I
> want to do it just by the name of the host. But if I delete the
> "hardware ethernet" line, it doesn't work as I want to (I am using WinXP
> clients). I have been googling, and I have also tried some options such
> 'option host-name "name_of_host"', 'ddns-updates on',
> 'use-host-decl-names on', 'allow unknown-clients'. But neither of them
> work. I hope some of you guys could help me.



Its not done by computer name.

The DHCP request the DHCP server gets doesnt contain the requested "name" of
the requesting computer.

It only contains the MAC address.


I could imagine that the requesting computer could request the IP address by
*name*.
Some might think that is insecure - but I dont think it impacts on security
greatly.

Servers should have certificates and communication should be private/public
key encrypted, so that no one can pretend to be the server...

DHCP is for configuring faceless clients,and if "johnny" needs a fixed ip
address, why cant we give that to johnny.









>
> Regards and thanks in advance.



Reply With Quote
  #6 (permalink)  
Old 02-17-2004
Johan Lindquist
 
Posts: n/a
Default Re: dhcpd.conf: fixed-address for a concrete host

So anyway, it was like, 10:32 CET Feb 17 2004, you know? Oh, and, yeah,
Kurt was all like, "Dude,

> The DHCP request the DHCP server gets doesnt contain the requested
> "name" of the requesting computer.
>
> It only contains the MAC address.


It contains what the dhcp client is configured to have it contain. It
can be the ethernet address, it can be the host name, or it can be
any string you choose to use as an id. It's up to the dhcp server to
accept the id and provide an address, or not.

--
Time flies like an arrow, fruit flies like a banana. Perth ---> *
10:57:37 up 23 days, 18:34, 7 users, load average: 4.19, 3.49, 3.34
$ cat /dev/bollocks "echo y | format c:" Registered Linux user #261729
brand web-enabled users
Reply With Quote
  #7 (permalink)  
Old 02-17-2004
knocte
 
Posts: n/a
Default Re: dhcpd.conf: fixed-address for a concrete host

Thomas Drillich escribió:
> Syam wrote:
>
>
>>Simply there is no other way to allocate fixed IP using dhcp.
>>
>>Just give it a little thought ;-)
>>
>>Hint : Think of chicken and egg problem !
>>
>>

>
> not complete correct, you can advice the dhcp-client
> to send a different client identifier instead of the
> ethernet mac address.
> take a look at dhclient.conf and dhcp-options
> option dhcp-client-identifier "CLIENT-FOO"
>
>
> cu thomas


But my client is not a Linux machine, it is a WinXP system. Can I set a
fixed-address to a WinXP machine discriminating by host name? The
problem is that I can't discriminate by MAC address because we have a
computer that launches different operating systems depending on the hard
disk is used, that's because they use the same MAC, but different host
names.

Thanks for your reply. Regards.
Reply With Quote
  #8 (permalink)  
Old 02-17-2004
David Cutting
 
Posts: n/a
Default Re: dhcpd.conf: fixed-address for a concrete host

"knocte" <knocte@NO-SPAM-PLEASE-hotmail.com> wrote in message
news:c0rt7r$rr4$1@nsnmrro2-gest.nuria.telefonica-data.net...
[snip]
> However, I don't want to discriminate the host by the MAC address, I
> want to do it just by the name of the host. But if I delete the
> "hardware ethernet" line, it doesn't work as I want to (I am using WinXP
> clients). I have been googling, and I have also tried some options such
> 'option host-name "name_of_host"', 'ddns-updates on',
> 'use-host-decl-names on', 'allow unknown-clients'. But neither of them
> work. I hope some of you guys could help me.


Hi,

As far as I know there is no way for this to directly
be accomplished - I've seen some other posts to
your reply call it the 'chicken and egg' problem. All
the host references in dhcpd.conf refer to the host
assigned to the client, not the decision on which host
to use.

Have you considered changing the MAC address
for your different operating systems and having
different lines for each in your dhcpd.conf? Certainally
it's very easy under Linux with:

#ifconfig eth0 hw ether 00:00:00:00...

And (although I've never done it), I do remember
seeing reference to the ability to have a:

MACADDR=00:00:00...

at the top of /etc/sysconfig/network-scripts/ifcfg-ethX

I have no idea but would assume (for the love of god
they must) newer flavours of Windoze would also support
this. When I was doing it I found some references to
some NICs not supporting it but I've never found this to
always work.

Cheers,

Dave.


Reply With Quote
  #9 (permalink)  
Old 02-18-2004
Syam
 
Posts: n/a
Default Re: dhcpd.conf: fixed-address for a concrete host

http://support.microsoft.com/default...b;EN-US;172408

HTH


knocte <knocte@NO-SPAM-PLEASE-hotmail.com> wrote in message news:<c0st4b$9k0$1@nsnmrro2-gest.nuria.telefonica-data.net>...
> Thomas Drillich escribió:
> > Syam wrote:
> >
> >
> >>Simply there is no other way to allocate fixed IP using dhcp.
> >>
> >>Just give it a little thought ;-)
> >>
> >>Hint : Think of chicken and egg problem !
> >>
> >>

> >
> > not complete correct, you can advice the dhcp-client
> > to send a different client identifier instead of the
> > ethernet mac address.
> > take a look at dhclient.conf and dhcp-options
> > option dhcp-client-identifier "CLIENT-FOO"
> >
> >
> > cu thomas

>
> But my client is not a Linux machine, it is a WinXP system. Can I set a
> fixed-address to a WinXP machine discriminating by host name? The
> problem is that I can't discriminate by MAC address because we have a
> computer that launches different operating systems depending on the hard
> disk is used, that's because they use the same MAC, but different host
> names.
>
> Thanks for your reply. Regards.

Reply With Quote
  #10 (permalink)  
Old 02-18-2004
Juha Laiho
 
Posts: n/a
Default Re: dhcpd.conf: fixed-address for a concrete host

"Kurt" <kurt@noemail.com> said:
>"knocte" <knocte@NO-SPAM-PLEASE-hotmail.com> wrote in message
>news:c0rt7r$rr4$1@nsnmrro2-gest.nuria.telefonica-data.net...
>> Hello. I have noticed that, in order to assign a fixed IP address to a
>> concrete host using ISC DHCPD, I should use the following notation:
>>
>> host name_of_host {
>> hardware ethernet 00:e0:18:bb:3e:73; /* NIC MAC address */
>> fixed-address 192.168.1.100; /* IP address */
>> }
>>
>> However, I don't want to discriminate the host by the MAC address, I
>> want to do it just by the name of the host.

>
>The DHCP request the DHCP server gets doesnt contain the requested "name" of
>the requesting computer.
>
>It only contains the MAC address.


Beg to disagree on this - just did a tcpdump of DHCP request when booting
up a Win98 (boo, hiss, ..:-) machine:
20:51:39.400040 0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] xid:0xdd53 vend-rfc1048 DHCP:REQUEST CID:01:00:90:27:43:e5:59 RQ:chaos.ichaos-int HN:"CHAOS^@" PR:SM+DG+NS+DN+WNS+WNT+WSC+MSZ (ttl 128, id 0, len 328)
0x0000 4500 0148 0000 0000 8011 39a6 0000 0000 E..H......9.....
0x0010 ffff ffff 0044 0043 0134 303d 0101 0600 .....D.C.40=....
0x0020 0000 dd53 0000 0000 0000 0000 0000 0000 ...S............
0x0030 0000 0000 0000 0000 0090 2743 e559 0000 ..........'C.Y..
0x0040 0000 0000 0000 0000 0000 0000 0000 0000 ................
....
0x00f0 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0100 0000 0000 0000 0000 6382 5363 3501 033d ........c.Sc5..=
0x0110 0701 0090 2743 e559 3204 c0a8 6921 0c06 ....'C.Y2...i!..
0x0120 4348 414f 5300 3708 0103 060f 2c2e 2f39 CHAOS.7.....,./9
0x0130 ff00 0000 0000 0000 0000 0000 0000 0000 ................
0x0140 0000 0000 0000 0000 ........

So, the "RQ:chaos.ichaos-int" apparently tells that it remembers what address
it last used when it had an address, but what I want to point out is the
HN:"CHAOS^@". So, at least the W98 toy is sending something recognisable in
the hostname field. I remember trying to get dhcpd to match and provide
address based on this, but failed - ending up using matches by MAC addresses.

>I could imagine that the requesting computer could request the IP
>address by *name*. Some might think that is insecure - but I dont think
>it impacts on security greatly.


Anyway the client can set the client-identifier whichever way they wish -
and still even keep their MAC address constant. And in places where the
switches are not locked to MAC addresses, then the client can override the
MAC address. So, whichever way, there is not much anyone would call security.
Some obscurity can perhaps be seen.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:53 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0