Date: Tue, 23 Jul 2013 14:35:22 +0200 From: J.McKeown@ru.ac.za To: Frank Leonhardt <frank2@fjl.co.uk> Cc: freebsd-questions@freebsd.org Subject: Re: dhcp server returns core dump when i define network with mask 8 Message-ID: <20130723143522.818353lrdr4lo5u2@webmail.ru.ac.za> In-Reply-To: <51EE4A63.9040909@fjl.co.uk> References: <CAA_1SgGFpBCnxWf4tKa3--nZiYhDgyiEcwvrfsUodxiOwMNfdg@mail.gmail.com> <loom.20130723T095802-729@post.gmane.org> <51EE3E2C.2090203@fjl.co.uk> <CAA_1SgGtZzVJscEsR5GADRH_o-3t2u_1YRmckP%2BYe7Qt74w_xg@mail.gmail.com> <51EE4A63.9040909@fjl.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Frank Leonhardt <frank2@fjl.co.uk>: > > There are two common ways of defining a subnet mask - one is a > dotted quad (e.g. 255.255.255.0) and the other is with a slash and > the number of low-order bits - e.g. 192.168.1.0/8. Eight bits here > means you get 2^8 addresses (i.e. 256). Don't use the first and last > address in the range - the first is "complicated" (the network > address) and the last is for broadcast packets. This doesn't always > hold true but you're unlikely to come across exceptions. This is the wrong way round. the number after the slash indicates the number of bits in the network address - the high-order bits. > So, when you say you want to define a "network with mask 8" I don't > really know what you mean from your example. Do you mean a /8? > > 192.168.1.0/8 = range 192.168.1.1 192.168.1.254 with a subnet > mask of 255.255.255.0 (0xFFFFFF00) Nope. 192.168.1.0/24 = 192.168.1.1-255 mask 255.255.255.0. 192.168.1.0/8 doesn't start where you think it does (and is arguably the wrong way to specify that network) because all but the first 8 bits are masked out - it's 192.0.0.0 - 192.255.255.255.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130723143522.818353lrdr4lo5u2>
