LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-17-2005, 01:17 AM   #1
libregeek
Member
 
Registered: Oct 2005
Posts: 47

Rep: Reputation: 15
DHCP: Problem in assigning fixed address to clients


Hello all,
I am trying to configure a ISC DHCP server on my Fedora Core 3 machine. The DHCP version I am using is dhcp-3.0.1-44_FC3. My requirement is that all the machines are assigned an IP via DHCP. However the IP should be same all the time it boots. so I gave the following configuration in /etc/dhcpd.conf:
Quote:
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.202.255;
option routers 192.168.202.1;
option domain-name-servers 192.168.202.1;
option domain-name "basic.net";
ddns-update-style ad-hoc;

subnet 192.168.202.0 netmask 255.255.255.0 {
range 192.168.202.100 192.168.202.200;

#host nila.basic.net {
# hardware ethernet 00:13:20:20:19:E4;
# fixed-address 192.168.202.101;
#}

host pamba.basic.net {
hardware ethernet 00:134:A6:153;
fixed-address 192.168.202.102;
}
}
When I started the dhcp daemon, it shows the following messages in /var/log/messages:
Quote:
Nov 17 01:36:53 triveni dhcpd: DHCPREQUEST for 192.168.202.199 from 00:13:d4:a6:15:d3 via eth0: lease 192.168.202.199 unavailable.
Nov 17 01:36:53 triveni dhcpd: DHCPNAK on 192.168.202.199 to 00:13:d4:a6:15:d3 via eth0
Nov 17 01:36:53 triveni dhcpd: DHCPDISCOVER from 00:13:d4:a6:15:d3 via eth0
Nov 17 01:36:53 triveni dhcpd: DHCPOFFER on 192.168.202.102 to 00:13:d4:a6:15:d3 via eth0
Nov 17 01:36:53 triveni dhcpd: Dynamic and static leases present for 192.168.202.102. Nov 17 01:36:53 triveni dhcpd: Remove host declaration pamba.ejyothi.net or remove 192.168.202.102
Nov 17 01:36:53 triveni dhcpd: from the dynamic address pool for 192.168.202/24
Nov 17 01:36:53 triveni dhcpd: DHCPREQUEST for 192.168.202.102 (192.168.202.1) from 00:13:d4:a6:15:d3 via eth0
However when using linux clients, the above configuration works, eventhough it shows the above messages. When windows is used the IP is not assigned. what may me the problem?

I am newbie to (Linux )Networking . Can anyone suggest a suitable method so that all the clients(LInux/Windows) are assigned a fixed IP and hostname from the dhcp server. Later on I have to set up a DNS server also in this network. But it's not a priority now.
Any help would be appreciated.
regards
libregeek.

Last edited by libregeek; 11-17-2005 at 01:46 AM.
 
Old 11-17-2005, 04:23 AM   #2
Que_273
Member
 
Registered: Nov 2005
Location: South coast
Distribution: Debian /AMD64
Posts: 48

Rep: Reputation: 15
This line
Code:
host pamba.basic.net {
hardware ethernet 00:134:A6:153;
fixed-address 192.168.202.102;
}
doesn't look right. There are some characters missing (unless they have been taken out as smilies : d )
 
Old 11-17-2005, 06:51 AM   #3
mardanian
Member
 
Registered: Mar 2004
Distribution: Fedora
Posts: 254

Rep: Reputation: 30
set you windows machine on automatically detect settings or whatever.

okay here is a hack if your windows machine unable to get ip from your dhcp server then try to disable you lan interface on windows (by right clicking on the local lan icon) and then reenable it.

hope this could helps

askar
 
Old 11-17-2005, 07:17 AM   #4
libregeek
Member
 
Registered: Oct 2005
Posts: 47

Original Poster
Rep: Reputation: 15
This thing is surely the play of smilies.
Code:
host pamba.basic.net {
hardware ethernet 00:134:A6:153;
fixed-address 192.168.202.102;
}
the correct one is :
Code:
host pamba.basic.net {
                       hardware ethernet 00:13:D4:A6:15:D3;
                fixed-address 192.168.202.103;
        }
 
Old 11-17-2005, 07:26 AM   #5
libregeek
Member
 
Registered: Oct 2005
Posts: 47

Original Poster
Rep: Reputation: 15
One part of my problem is solved:
It's not possible to include IP address in host part which comes under the "range". I changed the configuration as following:
Code:
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.202.255;
option routers 192.168.202.1;
#option domain-name-servers 192.168.202.1;
option domain-name-servers 192.168.202.1, 202.138.96.2, 202.138.103.100, 192.168.202.2;
option domain-name "basic.net";
ddns-update-style ad-hoc;

subnet 192.168.202.0 netmask 255.255.255.0 {
        range 192.168.202.200 192.168.202.254;

        #host nila.basic.net {
        #       hardware ethernet 00:13:20:20:19:E4;
        #       fixed-address 192.168.202.101;
        #}

        host pamba.basic.net {
                        hardware ethernet 00:13:D4:A6:15:D3;
                fixed-address 192.168.202.103;
        }
}
But still there si the problem of assigning the hostname. The DHCP server can't assign the hostname. Is it really possible :)
 
Old 11-17-2005, 12:39 PM   #6
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
as you found out, the fixed addresses have to be outside the assigned pool.As you found out, the fixed addresses have to be outside the assigned pool, I also usually put them in the config file outside that section as well. If your config works, then I guess it doesn't matter. As for the hostname, I put two commands in my config, as a shotgun approach, I'm not sure which one does the trick but my linux client does get a hostname from the server.

Code:
...
subnet 192.168.202.0 netmask 255.255.255.0 {
        range 192.168.202.200 192.168.202.254;

        host pamba.basic.net {
                hardware ethernet 00:13:D4:A6:15:D3;
                fixed-address 192.168.202.103;
        }
}
would be
Code:
...
subnet 192.168.202.0 netmask 255.255.255.0 {
        range 192.168.202.200 192.168.202.254;
}

host pamba.basic.net {
        hardware ethernet 00:13:D4:A6:15:D3;
        option host-name "pamba";
        ddns-hostname "pamba";
        fixed-address 192.168.202.103;
}

Last edited by Darin; 11-17-2005 at 12:41 PM.
 
Old 11-17-2005, 11:59 PM   #7
libregeek
Member
 
Registered: Oct 2005
Posts: 47

Original Poster
Rep: Reputation: 15
Your suggestion didn't work for me. I think it's very hard to set in /etc/sysconfig/network. Is there any way to say in the /etc/sysconfig/network, that the hostname should be obtained from dhcp server ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcp networking not assigning address quwiltw Linux - Networking 9 12-22-2004 08:25 AM
Fixed IP Address with DHCP dgreenbean Linux - Networking 9 09-19-2004 01:12 PM
assigning memory address to pointer irfanhab Programming 4 04-24-2004 03:35 AM
Assigning site-local ipv6 address to an interface goto Linux - Networking 0 03-24-2003 04:06 AM
assigning ip address after install gui10 Linux - Networking 2 03-06-2002 03:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration