Page 241 / 268 Scroll up to view Page 236 - 240
P-660R-F1 Series User’s Guide
241
Subnet masks are expressed in dotted decimal notation just like IP addresses. The “natural” masks for class A,
B and C IP addresses are as follows.
Subnetting
With subnetting, the class arrangement of an IP address is ignored. For example, a class C address no longer
has to have 24 bits of network number and 8 bits of host ID. With subnetting, some of the host ID bits are
converted into network number bits.
By convention, subnet masks always consist of a continuous sequence of ones beginning from the leftmost bit
of the mask, followed by a continuous sequence of zeros, for a total number of 32 bits.
Since the mask is always a continuous number of ones beginning from the left, followed by a continuous
number of zeros for the remainder of the 32 bit mask, you can simply specify the number of ones instead of
writing the value of each octet. This is usually specified by writing a “/” followed by the number of bits in the
mask after the address.
For example, 192.1.1.0 /25 is equivalent to saying 192.1.1.0 with mask 255.255.255.128.
The following table shows all possible subnet masks for a class “C” address using both notations.
The first mask shown is the class “C” natural mask. Normally if no mask is specified it is understood that the
natural mask is being used.
Table 102
“Natural” Masks
CLASS
NATURAL MASK
A
255.0.0.0
B
255.255.0.0
C
255.255.255.0
Table 103
Alternative Subnet Mask Notation
SUBNET MASK
SUBNET MASK “1” BITS
LAST OCTET BIT VALUE
DECIMAL
255.255.255.0
/24
0000 0000
0
255.255.255.128
/25
1000 0000
128
255.255.255.192
/26
1100 0000
192
255.255.255.224
/27
1110 0000
224
255.255.255.240
/28
1111 0000
240
255.255.255.248
/29
1111 1000
248
255.255.255.252
/30
1111 1100
252
Page 242 / 268
P-660R-F1 Series User’s Guide
242
Example: Two Subnets
As an example, you have a class “C” address 192.168.1.0 with subnet mask of 255.255.255.0.
The first three octets of the address make up the network number (class “C”).
To make two networks, divide the network 192.168.1.0 into two separate subnets by converting one of the host
ID bits of the IP address to a network number bit. The “borrowed” host ID bit can be either “0” or “1” thus
giving two subnets; 192.168.1.0 with mask 255.255.255.128 and 192.168.1.128 with mask 255.255.255.128.
Note: In the following charts, shaded/bolded last octet bit values indicate host ID bits “borrowed” to
make network ID bits. The number of “borrowed” host ID bits determines the number of
subnets you can have. The remaining number of host ID bits
(after “borrowing”) determines
the number of hosts you can have on each subnet.
Table 104
Two Subnets Example
IP/SUBNET MASK
NETWORK NUMBER
HOST ID
IP Address
192.168.1.
0
IP Address (Binary)
11000000.10101000.00000001.
00000000
Subnet Mask
255.255.255.
0
Subnet Mask (Binary)
11111111.11111111.11111111.
00000000
Table 105
Subnet 1
IP/SUBNET MASK
NETWORK NUMBER
LAST OCTET BIT
VALUE
IP Address
192.168.1.
0
IP Address (Binary)
11000000.10101000.00000001.
0
0000000
Subnet Mask
255.255.255.
128
Subnet Mask (Binary)
11111111.11111111.11111111.
1
0000000
Subnet Address: 192.168.1.0
Lowest Host ID: 192.168.1.1
Broadcast Address:
192.168.1.127
Highest Host ID: 192.168.1.126
Table 106
Subnet 2
IP/SUBNET MASK
NETWORK NUMBER
LAST OCTET BIT VALUE
IP Address
192.168.1.
128
IP Address (Binary)
11000000.10101000.00000001.
1
0000000
Subnet Mask
255.255.255.
128
Subnet Mask (Binary)
11111111.11111111.11111111.
1
0000000
Subnet Address:
192.168.1.128
Lowest Host ID: 192.168.1.129
Broadcast Address:
192.168.1.255
Highest Host ID: 192.168.1.254
Page 243 / 268
P-660R-F1 Series User’s Guide
243
Host IDs of all zeros represent the subnet itself and host IDs of all ones are the broadcast address for that
subnet, so the actual number of hosts available on each subnet in the example above is 2
7
– 2 or 126 hosts for
each subnet.
192.168.1.0 with mask 255.255.255.128 is the subnet itself, and 192.168.1.127 with mask 255.255.255.128 is
the directed broadcast address for the first subnet. Therefore, the lowest IP address that can be assigned to an
actual host for the first subnet is 192.168.1.1 and the highest is 192.168.1.126. Similarly the host ID range for
the second subnet is 192.168.1.129 to 192.168.1.254.
Example: Four Subnets
The above example illustrated using a 25-bit subnet mask to divide a class “C” address space into two subnets.
Similarly to divide a class “C” address into four subnets, you need to “borrow” two host ID bits to give four
possible combinations (00, 01, 10 and 11). The subnet mask is 26 bits
(11111111.11111111.11111111.
11
000000) or 255.255.255.192. Each subnet contains 6 host ID bits, giving
2
6
-2 or 62 hosts for each subnet (all zeroes is the subnet itself, all ones is the broadcast address on the
subnet).
Table 107
Subnet 1
IP/SUBNET MASK
NETWORK NUMBER
LAST OCTET BIT
VALUE
IP Address
192.168.1.
0
IP Address (Binary)
11000000.10101000.00000001.
00
000000
Subnet Mask (Binary)
11111111.11111111.11111111.
11
000000
Subnet Address: 192.168.1.0
Lowest Host ID: 192.168.1.1
Broadcast Address:
192.168.1.63
Highest Host ID: 192.168.1.62
Table 108
Subnet 2
IP/SUBNET MASK
NETWORK NUMBER
LAST OCTET BIT
VALUE
IP Address
192.168.1.
64
IP Address (Binary)
11000000.10101000.00000001.
01
000000
Subnet Mask (Binary)
11111111.11111111.11111111.
11
000000
Subnet Address: 192.168.1.64
Lowest Host ID: 192.168.1.65
Broadcast Address: 192.168.1.127
Highest Host ID: 192.168.1.126
Table 109
Subnet 3
IP/SUBNET MASK
NETWORK NUMBER
LAST OCTET BIT
VALUE
IP Address
192.168.1.
128
IP Address (Binary)
11000000.10101000.00000001.
10
000000
Subnet Mask (Binary)
11111111.11111111.11111111.
11
000000
Subnet Address:
192.168.1.128
Lowest Host ID: 192.168.1.129
Broadcast Address:
192.168.1.191
Highest Host ID: 192.168.1.190
Page 244 / 268
P-660R-F1 Series User’s Guide
244
Example Eight Subnets
Similarly use a 27-bit mask to create eight subnets (000, 001, 010, 011, 100, 101, 110 and 111).
The following table shows class C IP address last octet values for each subnet.
The following table is a summary for class “C” subnet planning.
Subnetting With Class A and Class B Networks.
For class “A” and class “B” addresses the subnet mask also determines which bits are part of the network
number and which are part of the host ID.
Table 110
Subnet 4
IP/SUBNET MASK
NETWORK NUMBER
LAST OCTET BIT VALUE
IP Address
192.168.1.
192
IP Address (Binary)
11000000.10101000.00000001.
11
000000
Subnet Mask (Binary)
11111111.11111111.11111111.
11
000000
Subnet Address:
192.168.1.192
Lowest Host ID: 192.168.1.193
Broadcast Address:
192.168.1.255
Highest Host ID: 192.168.1.254
Table 111
Eight Subnets
SUBNET
SUBNET ADDRESS
FIRST ADDRESS
LAST ADDRESS
BROADCAST
ADDRESS
1
0
1
30
31
2
32
33
62
63
3
64
65
94
95
4
96
97
126
127
5
128
129
158
159
6
160
161
190
191
7
192
193
222
223
8
224
225
254
255
Table 112
Class C Subnet Planning
NO. “BORROWED” HOST
BITS
SUBNET MASK
NO. SUBNETS
NO. HOSTS PER
SUBNET
1
255.255.255.128 (/25)
2
126
2
255.255.255.192 (/26)
4
62
3
255.255.255.224 (/27)
8
30
4
255.255.255.240 (/28)
16
14
5
255.255.255.248 (/29)
32
6
6
255.255.255.252 (/30)
64
2
7
255.255.255.254 (/31)
128
1
Page 245 / 268
P-660R-F1 Series User’s Guide
245
A class “B” address has two host ID octets available for subnetting and a class “A” address has three host ID
octets (see
Table 100 on page 239
) available for subnetting.
The following table is a summary for class “B” subnet planning.
Table 113
Class B Subnet Planning
NO. “BORROWED” HOST
BITS
SUBNET MASK
NO. SUBNETS
NO. HOSTS PER
SUBNET
1
255.255.128.0 (/17)
2
32766
2
255.255.192.0 (/18)
4
16382
3
255.255.224.0 (/19)
8
8190
4
255.255.240.0 (/20)
16
4094
5
255.255.248.0 (/21)
32
2046
6
255.255.252.0 (/22)
64
1022
7
255.255.254.0 (/23)
128
510
8
255.255.255.0 (/24)
256
254
9
255.255.255.128 (/25)
512
126
10
255.255.255.192 (/26)
1024
62
11
255.255.255.224 (/27)
2048
30
12
255.255.255.240 (/28)
4096
14
13
255.255.255.248 (/29)
8192
6
14
255.255.255.252 (/30)
16384
2
15
255.255.255.254 (/31)
32768
1

Rate

4.5 / 5 based on 2 votes.

Bookmark Our Site

Press Ctrl + D to add this site to your favorites!

Share
Top