[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: communicating between subnets



David Woyciesjes <dwoyciesjes@comcast.net> writes:

> Praveen Kallakuri wrote:
>
>> secondly, how can i split 1.x into different subnets?
>
> 	I'll have to look it up, but it involves using a subnet mask like
> 255.255.224.0 instead of the usual 255.255.255.0. This way you can have
> a subnet with space for only a few machines, instead of the 254 spots
> you get with using 192.168.1.x with 255.255.255.0 as the subnet mask.

If you wanted four identical networks -- say, 192.168.1.0/26,
192.168.1.64/26, 192.168.1.128/26, and 192.168.1.192/26 -- you'd set
the netmask to 255.255.255.192.

Q: Is 192.168.1.60 on 192.168.1.0/26?

A: See if a bitwise AND of the address in question and the netmask
equals the network address:

      192.168.  1. 60
  AND 255.255.255.192
      ---------------
      192.168.  1.  0 <== YES!

Q: What does 192.168.1.128/26 mean?

A: It means that the network address is 192.168.1.128, and the netmask
is a 32-bit word with the high 26 bits set.  These get broken up into
four groups of eight ("octets"); the three highest octets have all
eight bits set, for decimal 255, and the last is 11000000, for decimal
128+64=192.

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: