Networking Forums

Networking Forums > Computer Networking > Linux Networking > dhcpd.conf: fixed-address for a concrete host

Reply
Thread Tools Display Modes

dhcpd.conf: fixed-address for a concrete host

 
 
knocte
Guest
Posts: n/a

 
      02-17-2004, 01:11 AM
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
 
 
 
 
Syam
Guest
Posts: n/a

 
      02-17-2004, 05:42 AM
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 <(E-Mail Removed)> wrote in message news:<c0rt7r$rr4$(E-Mail Removed)>...
> 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
 
knocte
Guest
Posts: n/a

 
      02-17-2004, 08:17 AM
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
 
Thomas Drillich
Guest
Posts: n/a

 
      02-17-2004, 08:28 AM
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
 
Kurt
Guest
Posts: n/a

 
      02-17-2004, 08:32 AM

"knocte" <(E-Mail Removed)> wrote in message
news:c0rt7r$rr4$(E-Mail Removed)...
> 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
 
Johan Lindquist
Guest
Posts: n/a

 
      02-17-2004, 08:59 AM
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
 
knocte
Guest
Posts: n/a

 
      02-17-2004, 10:15 AM
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
 
David Cutting
Guest
Posts: n/a

 
      02-17-2004, 07:37 PM
"knocte" <(E-Mail Removed)> wrote in message
news:c0rt7r$rr4$(E-Mail Removed)...
[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
 
Syam
Guest
Posts: n/a

 
      02-18-2004, 05:09 AM
http://support.microsoft.com/default...b;EN-US;172408

HTH


knocte <(E-Mail Removed)> wrote in message news:<c0st4b$9k0$(E-Mail Removed)>...
> 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
 
Juha Laiho
Guest
Posts: n/a

 
      02-18-2004, 06:02 PM
"Kurt" <(E-Mail Removed)> said:
>"knocte" <(E-Mail Removed)> wrote in message
>news:c0rt7r$rr4$(E-Mail Removed)...
>> 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
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCPd with Option 82 and fixed-host statement Alexander Nesterov Linux Networking 0 12-24-2007 08:51 PM
dhcpd.conf setup pechoi@syr.edu Linux Networking 0 04-12-2006 11:21 PM
dhcpd.conf Damir Galiè Linux Networking 6 08-30-2005 04:42 PM
dhcpd.conf, resolv.conf and the search directive Andy Richardson Linux Networking 4 07-13-2005 08:23 AM
dhcpd.conf - multiple routers Dan Johnson Linux Networking 7 07-23-2004 06:22 PM



1 2 3 4 5 6 7 8 9 10 11