LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 02-04-2007, 07:15 AM   #1
Maniac0Maniac
LQ Newbie
 
Registered: Apr 2006
Distribution: OpenSuse 10
Posts: 15

Rep: Reputation: 0
Lightbulb DHCP issuing IP's in reverse!


Hi all.

I'm running a DHCP on Suse 10.1. All is working 100%, except when it assigns IP's it assigns the last available IP in the range, instead of the first one! What am I missing?? Any help would be appreciated. Thanks

DHCPD.CONF:

option time-servers 10.0.0.1;
option domain-name "mydomain.com";
option domain-name-servers 10.0.0.1, 11.0.0.1;
option routers 10.0.0.1;
option ntp-servers 10.0.0.1;
option lpr-servers 10.0.0.1;
option netbios-name-servers 10.0.0.1;
log-facility local7;
# File with key we shall use to securely update zone files
##########################################################
include "/etc/secret.id";
# Our server is authority
#########################
server-identifier Server.mydomain.com;
authoritative ;
# Zone specification
###########################################
zone mydomain.forward { primary 10.0.0.1; key DHCP_UPDATER;}
zone mydomain.reverse { primary 10.0.0.1; key DHCP_UPDATER;}
ignore client-updates;
ddns-domainname "mydomain.com";
ddns-updates on;
ddns-update-style interim;
max-lease-time 172800;
default-lease-time 864000;
# Declaration of network properties ( range ... )
#################################################
subnet 193.168.1.0 netmask 255.255.255.192 {
#options
option subnet-mask 255.255.255.192;
option domain-name "mydomain.com";
#forward and reverse lookup zones
zone mydomain.com { primary 127.0.0.1; key DHCP_UPDATER; }
zone 0.0.10.in-addr.arpa. { primary 127.0.0.1; key DHCP_UPDATER; }
one-lease-per-client on;
range 10.0.0.2 10.0.0.48;
default-lease-time 864000;
max-lease-time 2678400;
}
 
Old 02-04-2007, 03:46 PM   #2
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 581

Rep: Reputation: 38
Why does it make a difference. As long as it's assigning IPs correctly, then it's working.

Cheers.
 
Old 02-04-2007, 04:44 PM   #3
elmr007
Member
 
Registered: Aug 2006
Location: Texas
Distribution: FC6
Posts: 60

Rep: Reputation: 15
I've often seen this but as MQMan mentioned I never really cared. Of course you can give it what ever address you would like it to have in dhcpd.conf
 
Old 02-04-2007, 05:18 PM   #4
Maniac0Maniac
LQ Newbie
 
Registered: Apr 2006
Distribution: OpenSuse 10
Posts: 15

Original Poster
Rep: Reputation: 0
Yes it's working fine, but I still need it to start issuing IP's from the start of the range because i'm going to end up with a lot of zones, and will be running scripts on the zone files.
 
Old 02-05-2007, 04:56 AM   #5
hafeez_blue
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by Maniac0Maniac
Hi all.

I'm running a DHCP on Suse 10.1. All is working 100%, except when it assigns IP's it assigns the last available IP in the range, instead of the first one! What am I missing?? Any help would be appreciated. Thanks

DHCPD.CONF:

option time-servers 10.0.0.1;
option domain-name "mydomain.com";
option domain-name-servers 10.0.0.1, 11.0.0.1;
option routers 10.0.0.1;
option ntp-servers 10.0.0.1;
option lpr-servers 10.0.0.1;
option netbios-name-servers 10.0.0.1;
log-facility local7;
# File with key we shall use to securely update zone files
##########################################################
include "/etc/secret.id";
# Our server is authority
#########################
server-identifier Server.mydomain.com;
authoritative ;
# Zone specification
###########################################
zone mydomain.forward { primary 10.0.0.1; key DHCP_UPDATER;}
zone mydomain.reverse { primary 10.0.0.1; key DHCP_UPDATER;}
ignore client-updates;
ddns-domainname "mydomain.com";
ddns-updates on;
ddns-update-style interim;
max-lease-time 172800;
default-lease-time 864000;
# Declaration of network properties ( range ... )
#################################################
subnet 193.168.1.0 netmask 255.255.255.192 {
#options
option subnet-mask 255.255.255.192;
option domain-name "mydomain.com";
#forward and reverse lookup zones
zone mydomain.com { primary 127.0.0.1; key DHCP_UPDATER; }
zone 0.0.10.in-addr.arpa. { primary 127.0.0.1; key DHCP_UPDATER; }
one-lease-per-client on;
range 10.0.0.2 10.0.0.48;
default-lease-time 864000;
max-lease-time 2678400;
}

try to give this entry of range in reverse range 10.0.0.2 10.0.0.48;
like range 10.0.0.48 10.0.0.2;

then i suppose u r problem would resolove , some times it try to take ips in reverse order
 
Old 02-05-2007, 08:41 AM   #6
hpoppe
LQ Newbie
 
Registered: Oct 2004
Location: Oslo, Norway
Distribution: Debian / BackTrack
Posts: 12

Rep: Reputation: 0
Reservations

You could, of course, make reservations based on the mac-address for all machines. It sounds strange to do this, but the use of a DHCP server is still a good choise.
I'm not completely sure, but I think the DHCP deamon will choose IP adresses to lease based oan a round-robin algorithm, so that it will appear to be rather random, but I may be mistaken here.
I've never seen a DHCP server that will always use the first address in the pool, then the second and so on.

Hans Poppe
oslo, Norway
 
  


Reply



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 and Reverse DNS stryka Linux - Networking 1 12-08-2005 08:55 PM
howto relay ISPs dhcp ip's though linux router to LAN deice Linux - Networking 0 09-20-2004 11:40 AM
My laptop receives an IP via DHCP, but can't ping router or outside IP's! Max P0wer Linux - Networking 12 08-17-2004 05:45 PM
can i have both dhcp and static ip's ? mjenkins Linux - Networking 1 09-22-2003 09:29 AM
Double Reverse DNS + DHCP MikHud Linux - Networking 4 03-06-2002 08:38 PM

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

All times are GMT -5. The time now is 08:44 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