Sei sulla pagina 1di 10

Memorize These!

Bit Position Values of an 8 Bit Octet

Understand Prefix Format for Subnet Masks

Memorize These!
Class Range
First Octet

Default Subnet Mask Default Subnet Mask


Dotted-Decimal Prefix Notation

A
B C

1-126
128-191 192-223

255.0.0.0
255.255.0.0 255.255.255.0

/8
/16 /24

Address Classes with Subnet Mask

Memorize These!
Not really helpful here, but necessary to remember

10.0.0.0 to 10.255.255.255 172.16.0.0 to 172.31.255.255 192.168.0.0 to 192.168.255.255


Private Address Ranges
Hint: Identify by highlighted octets

Three types of IP addresses


Network Address: Broadcast Address: Host Address: Host bits all 0s Host bits all 1s
at least one 0 and one 1

11011110 00100001 00000100 00000000 is a network address.

All 0s

11011110 00100001 00000100 11111111 is the broadcast address for that network. 11011110 00100001 00000100 00100100 is a host address on that network.
at least one 0 and one 1

All 1s

Mask Rules
All mask bits must be contiguous from the left; no imbedded zeros.
Ex: 11111111.11111111.11111111.11100000 = 255.255.255.224

This is a This is

good mask
Ex: 11111111.11111111.11111111.11101000 = 255.255.255.232

not a good mask

The subnet mask ONLY identifies the network address.


Ex: 192.168.1.24 with a mask of 255.255.255.0 yields the network address 192.168.1.0
11000000.10101000.00000001.00011000 11111111.11111111.11111111.00000000 11000000.10101000.00000001.00000000
Address ANDed with Mask = Network Address 192.168.1.0

Host information is filtered out

How a Mask works.


The IP address and the mask are ANDed to determine the network address. 0 AND 0 = 0 0 AND 1 = 0 1 AND 0 = 0 1 AND 1 = 1 The mask acts as a filter which keeps only the network bits, sets all others to 0.
7

Sample Mask Application


What is the network address of
Address: 172.123.44.120 10101100 01111011 00101100 01111000
Mask: 255.255.240.0 or /20 11111111.11111111.11110000.00000000

Apply the mask:


AND

10101100 01111011 00101100 01111000 11111111.11111111.11110000.00000000 10101100 01111011 00100000 00000000


Host portion becomes all zeros
8

Network Address: 172.123.32.0

Applying a Mask to an IP address leaves the network address!

To calculate the number of Subnets needed


Determine the number of subnets needed
Ex: I have 7 total networks (LANs and WANs) therefore 7 subnets are needed

Round up to the nearest Power of 2


2n > 7 22 = 4 (to small); 23 = 8 (next highest power of 2)

The power number (exponent) is the number of bits needed for the subnets
Therefore you would need to borrow 3 bits

Add the power number to the number of bits in the Default Mask
Class C mask of 255.255.255.0 = 11111111.11111111.11111111.00000000 Becomes 11111111.11111111.11111111.11100000 or 255.255.255.224

The result is the number of bits in the subnet mask


The mask is now 27 bits long or /27

To calculate the number of hosts needed


Add 2 to the number of hosts needed
I need 27 hosts per network therefore I need 29 hosts per network

Round up to the nearest Power of 2


2n > 29 24 = 16 (to small); 25 = 32 (next highest power of 2)

The power number (exponent) is the number of bits needed for the hosts
Therefore you would need to 5 host bits

Subtract the power number from 32


32 5 = 27

The result is the number of bits in the subnet mask


The mask is now 27 bits long or /27

Potrebbero piacerti anche