On 16 Sep 2003 02:44:11 -0700, Alan <(E-Mail Removed)> wrote:
> Just for my own learning experience, what is the number after the
> forward slash on the IP address, im assuming it is something to do
> with ports but I am unsure what.
>
> i.e. 10.20.10.0/xx
It is the number of bits of the address that represent the network,
counting from the left. The remaining bits specify a host on the
network. For example, converting a network address of 10.20.10.0 and
mask of /24 to binary (note how the dots divide the address on byte
boundaries):
Addr: 0000 1010 . 0001 0100 . 0000 1010 . 0000 0000 = 10.20.10.0
Mask: 1111 1111 . 1111 1111 . 1111 1111 . 0000 0000 = 255.255.255.0
If a given address can be bitwise-ANDed with the mask to give your
network address, then it must be on your network, otherwise not. That's
how routers figure out which entries in their table match an address.
For instance, take 10.20.10.85:
Addr: 0000 1010 . 0001 0100 . 0000 1010 . 0101 0101 = 10.20.10.85
Mask: 1111 1111 . 1111 1111 . 1111 1111 . 0000 0000 = 255.255.255.0
AND: 0000 1010 . 0001 0100 . 0000 1010 . 0000 0000 = 10.20.10.0
The network address always has all zeros in the bit positions to the
right of the mask, the corresponding address with all ones in those
positions is the broadcast address (i.e. the broadcast in our example
would be 10.20.10.255). These two addresses are reserved and should not
be assigned to any device.
--
-| Bob Hauck
-| To Whom You Are Speaking
-|
http://www.haucks.org/