[Techtalk] sub/super-netting
kansas_kennedy
kansas_kennedy at phreaker.net
Thu May 2 18:12:53 EST 2002
On Wednesday 01 May 2002 02:27 am, you wrote:
> On Wed, May 01, 2002 at 11:42:34AM +0600, kansas_kennedy at phreaker.net wrote:
> > My questions are on the area of subnet masking and super netting.
> >
> > If say, I have an address 203.191.0.0/8. From here I can tell that this
> > class C address has been fitted into a large network where 203 is the
> > network and 191.0.0 to 254.255.255 can be assigned as host to the network
> > 203.
>
> That's not exactly correct. The '/8' portion of the address says that
> the top eight bits of the IP address specify the network address. So
> 203.191.0.0/8 is part of the network spanning 203.0.0.0 to
> 203.255.255.255.
Well, yes. But if I want to make this 203.191.0.0 a /24 network then it'd
fall in the Class C category and the network spanning would be from
203.191.0.0 to 203.191.0.255. While the broadcast address is 203.191.0.255.
Am I right?
> In the example you mentioned, the network address is 203.0.0.0, the
> broadcast address is 203.255.255.255, all other addresses are available
> for hosts. So the number is 256 * 256 * 256 - 2 = 16777214 hosts.
Why are you making it 256 and subtracting it from 2? So according to this
formula a address like 203.127.137.0/24 would have a maximum of 256-2 host &
a network 203.127.137.0/16 has a maximum of (256*256 - 2) hosts. Is this
correct?
> > Also, 172.16.26.32 has a mask of 255.255.255.254 can also be written as
> > /27. I can't seem to find the correlation.
> This isn't correct. An IP that is written 172.16.26.32/27 would be on a
> network with a netmask of 255.255.255.224 (not 254). You can work this
> out by writing out the binary number 11111111 11111111 11111111 11100000
> (which I have split up into groups of eight). This the number with the
> top 27 bits set to one (unless I have made a typo).
Thanks a load. So, if I have a 172.16.26.32/18 would be like
11111111.11111111.11000000.00000000. Am I correct? That is, if you have /27
then you would take 27 ON bits (1s) and the read would be OFF bits (0s).
> Then, converting each group of eight bits to decimal, we get three 255's
> and a 224.
how can you convert 11100000 to decimal? Any easy rule-of-thumb other than
using the calculator of course?
> Continuing this on a bit: Since 32 is 00100000 in binary and we know
> that the top 27 bits are the network address in this example, we can see
> that on this network:
>
> 172.16.26.32 == network address.
> 172.16.26.63 == broadcast address (all host bits set to 1).
> 172.16.26.33 -> 172.16.26.62 == host machine addresses.
How did you get this? Would you mind explaning a little bit more? Sorry, I
couldn't understand the trick. :-(
> The trick here is to see that you can only fiddle with the bottom five
> bits of the last octet when you are assigning addresses on the
> 172.16.26.32/27 network. So the network address is when those bits are
> all zero, the broadcast address is when they are all 1's and the
> intervening addresses are the host addresses.
>
> > Again, a broadcast address has 255 in the host part of the address.
>
> Without wanting to seem overly pedantic, this may not be true if, for
> example, your switch is set up to reject broadcast messages. However in
> a "pure setup" it is true (although I can't right now find the RFC that
> says this).
Then what is the core your of a broadcast address? I mean what kind of
packets are being sent to the broadcast address and/ or what's its sole
purpose of existence?
Having the fun of Interactive Learning :-)
Thanks.
More information about the Techtalk
mailing list