LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DHCP:bad subnet/mask combination (http://www.linuxquestions.org/questions/linux-networking-3/dhcp-bad-subnet-mask-combination-780565/)

mahdit 01-07-2010 10:46 AM

DHCP:bad subnet/mask combination
 
Hi,I use following commands in dhcpd.conf and get the subnet number/mask combination err.please help me

subnet 20.20.20.0 netmask 255.0.0.0 {
range 20.20.20.20 20.20.20.30;
};

what is my problem ?

MensaWater 01-07-2010 10:59 AM

To get the range you want you'd need to calculate the CIDR.

There are some good online tools for doing this.

If you go to:
http://www.subnet-calculator.com/cidr.php
Input 20.20.20.20 as the IP address then select 14 as maximum address (lowest number that will accomodate the 10 you want) it will show you:

NETMASK should be 255.255.255.240.
First IP is actually 20.20.20.16 and last IP is 20.20.20.31. This encompasses the range you specified (20.20.20.20 - 20.20.20.30). It also gives you the CIDR (/28).

mahdit 01-07-2010 11:02 AM

thank you man useful,nice


All times are GMT -5. The time now is 01:19 PM.