On Sat, 8 Jul 2000, Dick Silva wrote:

> Group --
> 
> Some enlightenment is appreciated.
> 
> The following two examples are directly from Todd Lammle's CCNA book, 2nd
> edition.  Pages 140 and 141.
> 
> 1st example:
> 
> Given a network address of:    192.168.10.0
> 
> Given a subnet mask:   255.255.255.192  <---- Where does this 192 come from?
> 
> I understand that 192 = 11000000

That's where it comes from.  Think of it as starting in binary, and 
being represented as 192 decimal.  

> And I understand that there are 2 subnets and 62 hosts and how to calculate
> both of these values.  I would just like to know where the 192 comes from
> and some explanation of its purpose.

Look at the entire subnet mask:

11111111 11111111 11111111 11000000

   255      255      255      192

The 1 bits represent the portion of the address that defines the network.
The 0 bits represent hosts on the network.  

Note that the mask of 26 contiguous 1 bits can also be shown as a /26
after the address, so the network and mask can also be written 
192.168.10.0/26

Applying that mask to your network address, we see that for a host to 
be contained in the local subnet, it must match 

11000000 10101000 00001010 00------

If the first 26 bits of the address match this pattern, then the address
matches the mask, and is part of the local subnet.  Addresses from 
192.168.10.0 through 192.168.10.63 match.  But, if we look at the address
192.168.10.64 in binary, we see:

11000000 10101000 00001010 01000000
                            ^
Note that the 1 bit in the last octet causes a change in the network part 
of the address as defined by the mask.  A host or router uses the network
mask to determine if an address is on the local subnet or not.  In this
case, traffic to 192.168.10.0 through 192.168.10.63 (yes, the first and 
last addresses are special, but ignore that for now) matches the netmask,
and is local, so send directly to the destination.  Traffic not matching
the mask, such as 192.168.10.64 (or any other address not within the 
range of .0 through .63) must be routed.  

In the case of a simple host, it will have an address, netmask, and 
default gateway.  The netmask determines which addresses are simply 
put on the local wire, and which are forwarded to the gateway for 
routing to the destination. 

> 2nd example:
> 
> Given the same network address:   192.168.10.0
> 
> Given the subnet mask:  255.255.255.224  <---- So where does the 224 come
> from?
> 
> I understand that 224 = 11100000
> And that there are 6 subnets and 30 hosts.  Again where does the value 224
> come from and its purpose.

Again, it's the decimal representation of 11100000, with the previous 
octets each eight 1s, that's 27 contiguous 1s in the mask.  So now, any
addresses that don't have the first 27 bits identical to the host address
will not be on the local network.

This network may also be represented 192.168.10.0/27 (denoting the 27 bits
in the mask).

> 
> What determines the selection of these two, 192 and 224, values or any of
> the others that are plugged in.   I am not talking about the 255 values.
> Those I understand,11111111.
> 
> Constructive feedback would be genuinely appreciated.

The numbers simply represent those binary values which happen to have 
a string of 1 bits followed by a string of 0 bits.  A network mask will
have 1s for the network portion and 0s for the host portion.  Sane 
networks use the higher bits to represent the network and lower bits 
to represent the host, so a binary network mask will be a string of 1s 
followed by a string of 0s.  

So, you'll see 

255 = 11111111
254 = 11111110
252 = 11111100
248 = 11111000
240 = 11110000
224 = 11100000
192 = 11000000
128 = 10000000
0   = 00000000

in various places in netmasks.  Octets, if any to the left of these 
will be 255, and any to the right will be 0, ensuring 1s in the 
network portion and 0s in the host portion.           

Also note that both of the networks shown would not be legal in the 
classful, no subnet-zero method of thinking that is taught early on 
in CCNA.  Don't sweat this for now unless you've passed CCNA.  These
networks can be used with some tricks you'll learn in the future.

-- 
Jay Hennigan  -  Network Administration  -  [EMAIL PROTECTED] 
NetLojix Communications, Inc.  NASDAQ: NETX  -  http://www.netlojix.com/
WestNet:  Connecting you to the planet.  805 884-6323 

___________________________________
UPDATED Posting Guidelines: http://www.groupstudy.com/list/guide.html
FAQ, list archives, and subscription info: http://www.groupstudy.com
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to