LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dhcpd server problem: bad subnet number/mask combination (https://www.linuxquestions.org/questions/linux-networking-3/dhcpd-server-problem-bad-subnet-number-mask-combination-583627/)

144419855310001 09-10-2007 10:13 AM

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

farslayer 09-10-2007 11:30 AM

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)

144419855310001 09-13-2007 10:40 AM

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


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