0

Using linux servers on a dhcpd.conf file I can make a definition of ip ranges that the server will assign to host computers on the internal net:

subnet 10.0.0.1 netmask 255.255.255.0 {
  range 10.0.0.20 10.0.0.100;
  option subnet-mask 255.255.255.0;
}

Should subnet-mask and netmask be the same?

I understand that subnet-mask has to be more restrictive or at least the same that the netmask provided.

¿Which effect has netmask on the subnet defined?

  • Surely the option subnet-mask line is redundant if it's only setting it to the same as the earlier declaration? – steve Apr 21 at 9:01
1

Not always. The parameters that start with the keyword option are referred to as options. These options control DHCP options; whereas, parameters configure values that are not optional or control how the DHCP server behaves.

subnet 10.0.0.1 netmask 255.255.255.252 {
   range 10.0.0.1 10.0.0.2;
   option subnet-mask 255.255.255.0;
}

the above code will give your clients, an ip address start from 10.0.0.1 to 10.0.0.2 but the subnet mask on your clients will be 255.255.255.0

  • So if both definitions are valid ones I need to be carefull to make masks coherent so i don't put ips out of scope – Antonio E. Apr 24 at 13:15
  • yes becarefull with that. if you find out my answer was helpful you can accept my answer as correct answer and give me a vote up so both of us will get reputation. thaks – Rasool Ziafaty Apr 24 at 14:55
  • I'll do, i'm just waiting a 2nd answer wich would be complementary. My votes are not allowed yet because of rep but you'll see the vote when I reach. – Antonio E. Apr 24 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.