|
Subnetting chart
|
2 |
4 |
8 |
16 |
32 |
64 |
128 |
X |
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Decimal to binary conversion 192.168.3.1
|
2 |
4 |
8 |
16 |
32 |
64 |
128 |
X |
|
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
|
1 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
|
1 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
|
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
|
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Configurable bits
l Class A - last seven bits are configurable – 0xxxxxxx
l Class B – last six bits configurable – 10xxxxxx
l Class C- last five bits configurable – 110xxxxx
Default subnet masks
Class A 255.0.0.0 = 11111111.00000000.00000000.00000000
Class B 255.255.0.0 = 11111111.11111111.00000000.00000000
Class C 255.255.255.0 = 11111111.11111111.11111111.00000000
Boolean ANDing
Each bit of an IP address and Subnet mask is compared and an ANDing result
is returned.
A one and a one results in a match (1) All other combinations result in 0
When a device ANDs the IP with the subnet mask, the result returns the NetID.
You can not have a 0 as a host ID because it is reserved for net ID
You can not have 255 as a host ID because it is reserved for Broadcast ID
Boolean ANDing Examples
EX 1.
Your local IP is 64.168.1.1 or 01000000.10101000.00000001.00000001
Your subnet mask 255.255.255.0 or 11111111.11111111.11111111.00000000
ANDing Result 01000000.10101000.00000001.00000000
Thus your network ID 64.168.1.0
You want to send a packet to:
Destination IP is 64.168.5.7 or 01000000.10101000.00000101.00000111
Subnet mask 255.255.255.0 or 11111111.11111111.11111111.00000000
ANDing Result 01000000.10101000.00000101.00000000
Network ID 64.168.5.0
These two hosts are remote using the given subnet mask
EX 2.
We can also use ANDing to find out what subnet mask would need to be used to make these two hosts local.
Your local IP is 64.168.1.1 or 01000000.10101000.00000001.00000001
Your subnet mask 255.255.0.0 or 11111111.11111111.00000000.00000000
ANDing Result 01000000.10101000.00000000.00000000
Thus your network ID 64.168.1.0
You want to send a packet to:
Destination IP is 64.168.5.7 or 01000000.10101000.00000101.00000111
Subnet mask 255.255.0.0 or 11111111.11111111.00000000.00000000
ANDing Result 01000000.10101000.00000000.00000000
Network ID 64.168.5.0
These two hosts are local.
EX 3.
Broadcast IDs can also be determined using the ANDing process.
Source IP: 199.192.65.0 11000111.11000000.01000001.00000000
Subnet mask 255.255.255.0 11111111.11111111.11111111.00000000
ANDing result 199.192.65.255 This is the broadcast address
With the default subnet mask being used in this example, it is a fairly straight forward process to see what the broadcast address would be without having to do the math. Since the last octet in the subnet mask contains a zero you know that 199.192.65.255 will be the broadcast ID.
EX 4.
The monkey wrench to the process comes into play when you start masking portions of octets. Here is another example.
IP 199.192.64.32 11000111.11000000.01000001.00000000
Subnet mask 255.255.255.224 11111111.11111111.11111111.11100000
ANDing Result 199.193.65.63 is your broadcast address.
Private IP address ranges - Non-routable – internal use only
l Class A - 10.x.x.x
l Class B – 172.16.x.x – 172.31.x.x
l Class C 192.168.x.x
Subnet mask
EX 1.
You are assigned the network address 190.45.0.0
You already know several things about this address:
l |