LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 09-10-2007, 10:13 AM   #1
144419855310001
Member
 
Registered: Apr 2006
Distribution: ubuntu 7.04
Posts: 219

Rep: Reputation: 30
dhcpd server problem: bad subnet number/mask combination


Hi. I've been having problems trying to get a dhcp server running on Ubuntu 7.04 amd64... every time I start it I get this error, and I don't know if/where I've made a mistake:

Quote:
# dhcpd3
Internet Systems Consortium DHCP Server V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
/etc/dhcp3/dhcpd.conf line 20: subnet 169.254.9.7 netmask 255.255.224.0: bad subnet number/mask combination.
subnet 169.254.9.7 netmask 255.255.224.0
^
Configuration file errors encountered -- exiting

Here is my dhpcd.conf file:
Quote:
default-lease-time 86400;
max-lease-time 604800;

authorative;

subnet 169.254.9.7 netmask 255.255.224.0 {
range 169.254.9.10 169.254.9.17;
option subnet-mask 255.255.224.0;
option broadcast-address 169.254.255.255;
}
changing "subnet 169.254.9.7" above to "subnet 169.254.9.0" does nothing either.

And here are relevant parts of ifconfig:

Quote:
eth0 Link encap:Ethernet HWaddr 00:0F:B0:C7:27:EE
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:22 Base address:0xc400

eth0:avah Link encap:Ethernet HWaddr 00:0F:B0:C7:27:EE
inet addr:169.254.9.7 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
Interrupt:22 Base address:0xc400
(...And just what is "eth0:avah", anyway?)



Can anyone help?

Thanks

Last edited by 144419855310001; 09-10-2007 at 10:32 AM.
 
Old 09-10-2007, 11:30 AM   #2
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
let me first say, that's an odd address range to be handing out via dhcp, looks like the Windows network Autoconfigure range.

why don't you install ipcalc and let it help you figure out your subnets ?

Code:
it-etch:/etc/network# ipcalc 169.254.9.7 255.255.224.0
Address:   169.254.9.7          10101001.11111110.000 01001.00000111
Netmask:   255.255.224.0 = 19   11111111.11111111.111 00000.00000000
Wildcard:  0.0.31.255           00000000.00000000.000 11111.11111111
=>
Network:   169.254.0.0/19       10101001.11111110.000 00000.00000000
HostMin:   169.254.0.1          10101001.11111110.000 00000.00000001
HostMax:   169.254.31.254       10101001.11111110.000 11111.11111110
Broadcast: 169.254.31.255       10101001.11111110.000 11111.11111111
Hosts/Net: 8190                  Class B, APIPA
So the correct network settings would be

Quote:
default-lease-time 86400;
max-lease-time 604800;

authorative;

subnet 169.254.0.0 netmask 255.255.224.0 {
range 169.254.9.10 169.254.9.17;
option subnet-mask 255.255.224.0;
option broadcast-address 169.254.31.255;
}
You really should be using an Address range from the 'private' or 'non-routable' ranges for a home network imho..
http://www.ietf.org/rfc/rfc1918.txt
Quote:
Private Address Space

The Internet Assigned Numbers Authority (IANA) has reserved the
following three blocks of the IP address space for private internets:

10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

Last edited by farslayer; 09-10-2007 at 11:33 AM.
 
Old 09-13-2007, 10:40 AM   #3
144419855310001
Member
 
Registered: Apr 2006
Distribution: ubuntu 7.04
Posts: 219

Original Poster
Rep: Reputation: 30
Thanks for the note about ipcalc - I'm new to networking...

Also, the thing to do with eth0:avah from the ifconfig output was because I 'd forgotten to statically set an ip address to 192.168.0.0 / etc. on eth0.

Thanks again
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP: Bad subnet number/mask combination OliXNet Linux - Networking 4 01-07-2010 10:17 AM
Subnet Mask with 1 IP. Ionized Linux - Networking 25 06-10-2007 12:20 AM
subnet mask kizersouzay Linux - Networking 1 08-31-2005 03:07 PM
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 10:32 AM
Why would a linux pptp server give out a loopback subnet mask SSBN Linux - Networking 1 07-21-2003 01:23 AM


All times are GMT -5. The time now is 03:20 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration