Network Address getting assigned to client and ping not working (ver 4.2.2)

Peter Rathlev peter at rathlev.dk
Tue Apr 24 13:59:16 UTC 2012


On Tue, 2012-04-24 at 19:00 +0530, Mukund Deshpande wrote:
> # DHCP Pool sms
> subnet 7.7.7.0 netmask 255.255.255.0 {
>  option subnet-mask 255.255.255.0;
>  range 7.7.7.0;
>  default-lease-time 86400;
>  max-lease-time 86400;
> }
> ddns-update-style none;
...
> [root at Marvell1 ~]# ping 7.7.7.0   <<< This happens whenever dhclient is running...
> connect: Invalid argument

The network address (all 0's in the host part) is not a valid host
address for an ethernet network. The same goes for the limited broadcast
address (all 1's in the host part). For a /24 network those two
addresses are always .0 and .255.

If you want to use 7.7.7.0 as a host address (on ethernet) you need to
use 7.7.6.0/23 or larger where it would be valid.

You always need to not include network, broadcast and gateway addresses
in the range statement. Assuming you use .1 as gateway address and
maybe .2 and .3 for first hop redundancy, the range statement for
7.7.7.0/24 should be:

 range 7.7.7.4 7.7.7.254;

That dhclient actually accepts this address might be seen as a "bug",
but it's just doing what you tell it. :-)

-- 
Peter





More information about the dhcp-users mailing list