[CentOS] DHCP static hosts and subnet configuration

Ralph Angenendt ra+centos at br-online.de
Fri Oct 17 16:58:17 UTC 2008


John wrote:
> > # Here is Subnet number 2. subnet 192.168.0.16 netmask
> > 255.255.255.224 { # Subnet for 29 computers
>
> Isn't this wrong? If the netmask is .224, it should be either
> 192.168.0.0-31 or 192.168.0.32-63. 192.168.0.16 does not make sense
> here.
>
> > On subnet 192.168.0.16 with a mask of 255.255.255.224 will give
> > enuff ips for 29 clients. One for the broadcast addy. Primary subnet
> > would be 192.168.x.x.0 wich can only handle 254 clients. X.16
> > is just taken from that SN and subnetted out into a different
> > allocation block. I slapped it in there hopping the OP would see the
> > that other subnets ways to configure it.  Good catch

Yeah, but you cannot really subnet that way:

[angenenr at shutdown ~]$ipcalc.pl 192.168.0.16/255.255.255.224
Address:   192.168.0.16         11000000.10101000.00000000.000 10000
Netmask:   255.255.255.224 = 27 11111111.11111111.11111111.111 00000
Wildcard:  0.0.0.31             00000000.00000000.00000000.000 11111
=>
Network:   192.168.0.0/27       11000000.10101000.00000000.000 00000
HostMin:   192.168.0.1          11000000.10101000.00000000.000 00001
HostMax:   192.168.0.30         11000000.10101000.00000000.000 11110
Broadcast: 192.168.0.31         11000000.10101000.00000000.000 11111
Hosts/Net: 30                    Class C, Private Internet

Ralph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20081017/01826ae8/attachment.sig>


More information about the CentOS mailing list