The On Demand Global Workforce - oDesk Saifur Rahman: Subnet , subnet musk , subnetting

Pages

Tuesday, September 29, 2009

Subnet , subnet musk , subnetting

Subnet:
A subnet allows the flow of network traffic between hosts to be segregated based on a network configuration. By organizing hosts into logical groups, sub netting can improve network security and performance.


Subnet Mask:
Perhaps the most recognizable aspect of subnetting is the subnet mask. Like IP addresses, a subnet mask contains four bytes (32 bits) and is often written using the same "dotted-decimal" notation. For example, a very common subnet mask in its binary representation 

11111111 11111111 11111111 00000000 
is typically shown in the equivalent, more readable form 255.255.255.0

Applying a Subnet Mask:

IP addresses are broken down into three parts: the network part, the subnet part (now often considered part of the network part, although originally it was part of the rest part), and the host part. Even though classful networks are obsolete, both classful and classless networks are shown in the following table.


Class Leading bits Start End Default Subnet Mask in dotted decimal
A (CIDR /8) 0 0.0.0.0 127.255.255.255 255.0.0.0
B (CIDR /16) 10 128.0.0.0 191.255.255.255 255.255.0.0
C (CIDR /24) 110 192.0.0.0 223.255.255.255 255.255.255.0






Sub netting is the process of allocating bits from the host portion as a network portion. The above example shows the bitwise "AND" process being performed on a classful network. The following example shows bits being borrowed to turn a classful network into a subnet.

Example

 Dot-decimal Address Binary
IP address 192.168.5.130 11000000.10101000.00000101.10000010
Subnet Mask 255.255.255.192 11111111.11111111.11111111.11000000
Network Portion 192.168.5.128 11000000.10101000.00000101.10000000

In this example two bits were borrowed from the original host portion. This is beneficial because it allows this network to be split into four smaller networks. A /24 suffix (Class C block) allows 254 hosts; split into four parts, the prefix is /26, each has 62 hosts.

Subnets and host count
It is possible to determine the number of hosts and sub networks available for any subnet mask. In the above example two bits were borrowed to create sub networks. Each bit can take the value 1 or 0, giving 4 possible subnets (22 = 4)

Network Network (binary) Broadcast address
192.168.5.0/26 11000000.10101000.00000101.00000000 192.168.5.63
192.168.5.64/26 11000000.10101000.00000101.01000000 192.168.5.127
192.168.5.128/26 11000000.10101000.00000101.10000000 192.168.5.191
192.168.5.192/26 11000000.10101000.00000101.11000000 192.168.5.255
The remaining bits after the subnet are used for addressing hosts within the subnet. In the above example the subnet mask consists of 26 bits, leaving 6 bits for the address (32 − 26). This allows for 64 possible combinations (26), however the all zeros value and all ones value are reserved for the network ID and broadcast address respectively, leaving 62 addresses.

In general the number of available hosts on a subnet can be calculated using the formula 2n − 2, where n is the number of bits used for the host portion of the address.

RFC 3021 specifies an exception to this rule when dealing with 31 bit subnet masks (i.e. 1 host bit). According to the above rule a 31 bit mask would allow for 21 − 2 = 0 hosts. The RFC makes allowances in this case for certain types of networks (point-to-point) to disregard the network and broadcast address, allowing two host addresses to be allocated.

Possible subnets for a /24 suffix (traditional Class C):

CIDR notation Network Mask Binary Available Networks Available Hosts per network Total usable hosts
/24 255.255.255.0 0000.0000 1 254 254
/25 255.255.255.128 1000.0000 2 126 252
/26 255.255.255.192 1100.0000 4 62 248
/27 255.255.255.224 1110.0000 8 30 240
/28 255.255.255.240 1111.0000 16 14 224
/29 255.255.255.248 1111.1000 32 6 192
/30 255.255.255.252 1111.1100 64 2 128
/31 255.255.255.254 1111.1110 128 2 * 256

* only applicable on point-to-point links 
Once you have the two steps memorized, you can begin subnetting. Our first example will use the Class C mask of 255.255.255.192. Ask five simple questions to gather all the facts:

1. How many subnet bits are used in this mask?
2. How many host bits are available per subnet?
3. What are the subnet addresses?
4. What is the broadcast address of each subnet?
5. What is the valid host range of each subnet?
We already know how to answer questions one and two. To answer question three, use the formula 256-subnetmask to get the first subnet and our variable. Keep adding this number to itself until we get to the subnet mask value to determine the valid subnets. Once we verify all of the subnets, you can determine the broadcast address by looking at the next subnet’s value. The broadcast address is the number just before the next subnet number. Once we have the subnet number and broadcast address, the valid hosts are the numbers in between.


Here are the answers using 255.255.255.192:


1. How many subnet bits are used in this mask?
Answer: 2
22-2=2 subnets
2. How many host bits are available per subnet?
Answer: 6
26-2=62 hosts per subnet
3. What are the subnet addresses?
Answer: 256-192=64 (the first subnet)
64+64=128 (the second subnet)
64+128=192. However, although 192 is the subnet mask value, it’s not a valid subnet. The valid subnets are 64 and 128.
4. What is the broadcast address of each subnet?
Answer: 64 is the first subnet and 128 is the second subnet. The broadcast address is always the number before the next subnet. The broadcast address of the 64 subnet is 127. The broadcast address of the 128 subnet is 191.
5. What is the valid host range of each subnet?
Answer: The valid hosts are the numbers between the subnet number and the mask. For the 64 subnet, the valid host range is 64-126. For the 128 subnet, the valid host range is 129-190.

Let’s do a second example using the Class C mask of 255.255.255.224. Here are the answers:


1. How many subnet bits are used in this mask?
Answer: 3 bits or 23-2=6 subnets
2. How many host bits are available per subnet?
Answer: 5 bits or 25-2=30 hosts per subnet
3. What are the subnet addresses?
Answer: 256-224 =32, 64, 96, 128, 160 and 192 (Six subnets found by continuing to add 32 to itself.)
4. What is the broadcast address of each subnet?
Answer: The broadcast address for the 32 subnet is 63. The broadcast address for the 64 subnet is 95. The broadcast address for the 96 subnet is 127. The broadcast address for the 160 subnet is 191. The broadcast address for the 192 subnet is 223 (since 224 is the mask).
5. What is the valid host range of each subnet?
Answer: The valid hosts are the numbers in between the subnet and broadcast addresses. For example, the 32 subnet valid hosts are 33-62.

Let’s do a third example using the Class C mask of 255.255.255.240. Here are the answers:

1. How many subnet bits are used in this mask?
Answer: 4 bits or 24-2=14 subnets
2. How many host bits are available per subnet?
Answer: 4 bits or 24-2=14 hosts per subnet
3. What are the subnet addresses?
Answer: 256-240 =16, 32, 48, 64, 80, 96, 112, 128, 144. 160, 176, 192, 208 and 224 (14 subnets found by continuing to add 16 to itself.)
4. What is the broadcast address of each subnet?
Answer: Here are some examples of the broadcast address: The broadcast address for the 16 subnet is 31. The broadcast address for the 32 subnet is 47. The broadcast address for the 64 subnet is 79. The broadcast address for the 96 subnet is 111. The broadcast address for the 160 subnet is 175. The broadcast address for the 192 subnet is 207.
5. What is the valid host range of each subnet?
Answer: The valid hosts are the numbers in between the subnet and broadcast addresses. The 32 subnet valid hosts are 33-46.

Let’s do a fourth example using the Class C mask of 255.255.255.248. Here are the answers:

1. How many subnet bits are used in this mask?
Answer: 5 bits or 25-2=30 subnets
2. How many host bits are available per subnet?
Answer: 3 bits or 23-2=6 hosts per subnet
3. What are the subnet addresses?
Answer 256-248 =8, 16, 24, 32, 40, 48, and so forth. The last subnet is 240 (30 subnets found by continuing to add 8 to itself).
4. What is the broadcast address of each subnet?
Answer: The broadcast address for the 8 subnet is 15. The broadcast address for the 16 subnet is 23. The broadcast address for the 48 subnet is 55.
5. What is the valid host range of each subnet?
Answer: The valid hosts are the numbers in between the subnet and broadcast addresses. For example, the 32 subnet valid hosts are 33-38.

Let’s do a fifth example using the Class C mask of 255.255.255.252. Here are the answers:


1. How many subnet bits are used in this mask?
Answer: 6 bits or 26-2=62 subnets
2. How many host bits are available per subnet?
Answer: 2 bits or 22-2=2 hosts per subnet
3. What are the subnet addresses?
Answer: 256-252 =4, 8, 12, 16, 20, and so forth. The last subnet is 248 (62 subnets found by continuing to add 4 to itself).
4. What is the broadcast address of each subnet?
Answer: The broadcast address for the 4 subnet is 7. The broadcast address for the 8 subnet is 11. The broadcast address for the 12 subnet is 15. The broadcast address for the 20 subnet is 23.
5. What is the valid host range of each subnet?
Answer: The valid hosts are the numbers in between the subnet and broadcast addresses. For example, the 16 subnet valid hosts are 17 and 18.
Conclusion
It is important to be able to subnet quickly and efficiently. After studying the examples presented in this Daily Drill Down, you should be familiar with this process with Class C addresses. 


CIDR notation

The Classless Inter-Domain Routing address specification or CIDR notation, begins with the Internet Protocol address followed by a "/" character and a decimal number specifying the length, in bits, of the subnet mask or routing prefix.

In case of address block specifications the IP address is the starting address of the block.

For example

• 192.168.100.1/24 represents the given IP address and its associated routing prefix (192.168.100.0) or, equivalently, its subnet mask, 255.255.255.0.
• 192.168.0.0/22 represents the 1024 IP addresses from 192.168.0.0 through 192.168.3.255.

For IP networks, an alternative representation uses the network address followed by the network's subnet mask, written in dot-decimal notation:

• 192.168.0.0/24 could be written 192.168.0.0/255.255.255.0
• 192.168.0.0/22 could be written 192.168.0.0/255.255.252.0

The number of addresses of a subnet defined by the mask or prefix can be calculated as 2(address size-mask). For example, a mask of /29 gives: 2(32-29) = 23 = 8 addresses for an IP network. However, because at least one of these addresses is typically used for a gateway to other subnets, and because certain addresses are reserved as broadcast addresses, the number of addresses available for hosts is usually less.


Class B subnets:


In my last Daily Drill Down, we borrowed bits from the host portion of a Class C network address. Class C network addresses only have eight bits to manipulate into subnets. However, a Class B has 16 bits to play with. This will allow more subnets with more hosts per subnet than a Class C network ever could.

Table 1 lists all of the possible Class B subnets:

Table 1Mask Binary Subnets Hosts per subnet 
255.255.128.0 10000000.00000000 2 32,766 
255.255.192.0 11000000.00000000 2 16,382 
255.255.224.0 11100000.00000000 6 8,190 
255.255.240.0 11110000.00000000 14 4,094 
255.255.248.0 11111000.00000000 30 2,046 
255.255.252.0 11111100.00000000 62 1,022 
255.255.254.0 11111110.00000000 126 510 
255.255.255.0 11111111.00000000 254 254 
255.255.255.128 11111111.10000000 510 126 
255.255.255.192 11111111.11000000 1022 62 
255.255.255.224 11111111.11100000 2,046 30 
255.255.255.240 11111111.11110000 4,094 14 
255.255.255.248 11111111.11111000 8,190 6 
255.255.255.252 11111111.11111100 16,382 2 
All possible Class B subnets
There are quite a few more masks we can use with a Class B network address than we can with a Class C network address. Remember that this is not harder than subnetting with Class C, but it can get confusing if you don’t pay attention to where the subnet bits and host bits are in a mask. This takes practice!
We will use the same techniques I used in the Class C article to subnet a network. We’ll start with the Class B subnet mask of 255.255.192.0 and figure out the subnets, broadcast address, and valid host range. We will answer the same five questions we answered for the Class C subnet masks:

1. How many subnets does this mask provide?
2. How many hosts per subnet does this mask provide?
3. What are the valid subnets?
4. What is the broadcast address for each subnet?
5. What is the host range of each subnet?
Before we answer these questions, there is one difference we need to be aware of when subnetting a Class B network address. When subnetting in the third octet, you need to add the fourth octet. For example, on the 255.255.192.0 mask, the subnetting will be done in the third octet. To create a valid subnet, you must add the fourth octet of all 0s and all 1s for the network and broadcast address (0 for all 0s and 255 for all 1s).

Example 1: Answers for the 255.255.192.0 mask
1. 2-2=2 subnets
2. 2-2=16,382 hosts per subnet
3. 256-192=64.0, 128.0
4. Broadcast for the 64.0 subnet is 127.255. Broadcast for the 128.0 subnet is 191.255.
5. The valid hosts are:
Subnet 64.0 128.0 
first host 64.1 128.1 
last host 127.254 191.254 
broadcast 127.255 191.255 


Notice that the numbers in the third octet are the same numbers we used in the fourth octet when subnetting the 192 mask. The only difference is that we add 0 and 255 in the fourth octet.

For the 64.0 subnet, all the hosts between 64.1 and 127.254 are in the 64 subnet. In the 128.0 subnet, the hosts are 128.1 through 191.254.

Example 2: 255.255.240.0

1. 2-2=14 subnets
2. 2-2=4094 hosts per subnet
3. 256-240=16.0, 32.0, 48.0, 64.0, etc.
4. Broadcast for the 16.0 subnet is 31.255. Broadcast for the 32.0 subnet is 47.255, etc.
5. The valid hosts are:
Subnet 16.0 32.0 48.0 64.0 
first host 16.1 32.1 48.1 64.1 
last host 31.254 47.254 63.254 79.254 
broadcast 31.255 47.255 63.255 79.255 



Example 3: 255.255.248.0

1. 2-2=30 subnets
2. 2-2=2,046 hosts per subnet
3. 256-248=8.0, 16.0, 24.0, 32.0, 40.0, 48.0, 56.0, 64.0, etc.
4. Broadcast for the 8.0 subnet is 15.255. Broadcast for the 16.0 subnet is 23.255, etc.



5. The valid hosts are:
Subnet 8.0 16.0 24.0 32.0 40.0 48.0 56.0 64.0 
first host 8.1 16.1 24.1 32.1 40.1 48.1 56.1 64.1 
last host 15.254 23.254 31.254 39.254 47.254 55.254 63.254 71.254 
broadcast 15.255 23.255 31.255 39.255 47.255 55.255 63.255 71.255 

Example 4: 255.255.252.0

1. 2-2=62 subnets
2. 2-2=1,022 hosts per subnet
3. 256-252=4.0, 8.0, 12.0, 16.0, 20.0, 24.0, 28.0, 32.0, etc.
4. Broadcast for the 4.0 subnet is 7.255. Broadcast for the 8.0 subnet is 11.255, etc.
5. The valid hosts are:
Subnet 4.0 8.0 12.0 16.0 20.0 24.0 28.0 32.0 
first host 4.1 8.1 12.1 16.1 20.1 24.1 28.1 32.1 
last host 7.254 11.254 15.254 19.254 23.254 27.254 31.254 35.254 
broadcast 7.255 11.255 15.255 19.255 23.255 27.255 31.255 35.255 


Example 5: 255.255.255.0

1. 2-2=254 subnets
2. 2-2=254 hosts per subnet
3. 256-255=1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, etc.
4. Broadcast for the 1.0 subnet is 1.255. Broadcast for the 2.0 subnet is 2.255, etc.
5. The valid hosts are:
Subnet 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 
first host 1.1 2.1 3.1 4.1 5.1 6.1 7.1 8.1 
last host 1.254 21.254 3.254 4.254 5.254 6.254 7.254 8.254 
broadcast 1.255 2.255 3.255 4.255 5.255 6.255 7.255 8.255 


That last example was pretty simple. All the numbers were basically the same except we added the fourth octet into the address.

The more difficult process of subnetting a Class B network address is when you start using bits in the fourth octet for subnetting. For example, what happens when you use this mask with a Class B network address: 255.255.255.128? Is that valid? Absolutely! There are nine bits for subnetting and seven bits for hosts. That is 510 subnets, each with 126 hosts. However, it is the most difficult mask to figure out the valid hosts for.

Example 6: The Class B 255.255.255.128 subnet mask:
1. 2-2=510 subnets
2. 2-2=126 hosts per subnet
3. For the third octet, the mask would be 256-255=1, 2, 3, 4, 5, 6, etc.
4. For the fourth octet, the mask would be 256-128=128, which is one subnet if it is used. However, if you turn the subnet bit off, the value is 0. This means that for every subnet in the third octet, the fourth octet has two subnets: 0 and 128, for example 1.0 and 1.128.
5. Broadcast for the 0.128 subnet is 128.255; the broadcast for the 1.0 subnet is 1.127. Broadcast for the 1.128 subnet is 1.255, etc.
6. The valid hosts are:
Subnet 0.128 1.0 1.128 2.0 2.128 3.0 3.128 4.0 
first host 0.129 1.1 1.129 2.1 2.129 3.1 3.129 4.1 
last host 0.254 1.126 1.254 2.126 2.254 3.126 3.254 4.126 
broadcast 0.255 1.127 1.255 2.127 2.255 3.127 3.255 4.127 


The thing to remember is that for every subnet in the third octet, there are two in the fourth octet: 0 and 128. For the 0 subnet, the broadcast address is always 127. For the 128 subnet, the broadcast address is always 255.

Let’s continue with more subnetting into the fourth octet. This is exactly like subnetting a Class C network address, but the third octet is part of the subnet address.

Example 7: Class B network 255.255.255.192

1. 2-2=1022 subnets
2. 2-2=62 hosts per subnet
3. 256-255=1.0, 2.0, 3.0, etc. for the third octet. 256-192=64, 128, 192 for the fourth octet. For every valid subnet in the third octet, we get four subnets in the fourth octet: 0, 64, 128, and 192.
4. Broadcast for the 1.0 subnet is 1.63, since the next subnet is 1.64. Broadcast for the 1.64 subnet is 1.127, since the next subnet is 1.128. Broadcast for the 1.128 subnet is 1.191, since the next subnet is 1.192. Broadcast for the 1.192 subnet is 1.255.
5. The valid hosts are as follows:

Subnet 0.64 0.128 0.192 1.0 1.64 1.128 1.192 2.0 
first host 0.65 0.129 0.193 1.1 1.65 1.129 1.193 2.1 
last host 0.126 0.190 0.254 1.62 1.126 1.190 1.254 2.62 
broadcast 0.127 0.191 0.255 1.63 1.127 1.191 1.255 2.63 


On this one, the 0 and 192 subnets are valid, since we are using the third octet as well. The subnet range is 0.64 through 255.128. 0.0 is not valid since no subnet bits are on. 255.192 is not valid because then all subnet bits would be on.

Example 8: Class B network 255.255.255.224
1. 2-2=2046 subnets
2. 2-2=30 hosts per subnet
3. 256-255=1.0, 2.0, 3.0, etc. for the third octet. 256-224=32, 64, 96, 128, 160, 192 for the subnet value. (For every value in the third octet, we get eight subnets in the fourth octet: 0, 32, 64, 96, 128, 160, 192, 224.)
4. Broadcast for the 1.0 subnet is 1.63, since the next subnet is 1.64. Broadcast for the 1.64 subnet is 1.127, since the next subnet is 1.128. Broadcast for the 1.128 subnet is 1.191, since the next subnet is 1.192. Broadcast for the 1.192 subnet is 1.255.
5. The valid hosts are:
Subnet 0.32 0.64 0.96 0.128 0.160 0.192 0.224 1.0 
first host 0.33 0.65 0.97 0.129 0.161 0.193 0.225 1.1 
last host 0.62 0.94 0.126 0.158 0.190 0.222 0.254 1.30 
broadcast 0.63 0.95 0.127 1.159 0.191 0.223 0.255 1.31


Subnetting a Class A network address

Class A subnetting is a form of network addressing typically reserved for the government and larger institutions. It can have a large number of unique nodes, which can prove quite a challenge. Here, Todd Lammle offers a simple approach to this addressing.

If we wanted to create smaller networks (subnetworks) out of a Class A network ID, you’d borrow bits from the host portion of the mask. The more bits you borrow, the more subnets we can have, but this means fewer hosts per subnet. However, with a Class A mask, you have 24 bits to manipulate, so this isn’t typically a problem.

Table A lists all the available Class A subnet masks:

Table AMask Prefix Subnets Hosts
255.0.0.0 (/8) 1 network with 16,777,214 hosts
255.128.0.0 (/9) 2 subnets with 8,388,606 hosts each
255.192.0.0 (/10) 4 subnets with 4,194,302 hosts each
255.224.0.0 (/11) 8 subnets with 2,097,150 hosts each
255.240.0.0 (/12) 16 subnets with 1,048,574 hosts each
255.248.0.0 (/13) 32 subnets with 524,286 hosts each
255.252.0.0 (/14) 64 subnets with 262,142 hosts each
255.254.0.0 (/15) 128 subnets with 131,070 hosts each
255.255.0.0 (/16) 256 subnets with 65,534 hosts each
255.255.128.0 (/17) 512 subnets with 32,766 hosts each
255.255.192.0 (/18) 1,024 subnets with 16,384 hosts each
255.255.224.0 (/19) 2,048 subnets with 8,190 hosts each
255.255.240.0 (/20) 4,096 subnets with 4,094 hosts each
255.255.248.0 (/21) 8,192 subnets with 2,046 hosts each
255.255.252.0 (/22) 16,384 subnets with 1,022 hosts each
255.255.254.0 (/23) 32,768 subnets with 510 hosts each
255.255.255.0 (/24) 65,536 subnets with 254 hosts each
255.255.255.128 (/25) 131,072 subnets with 126 hosts each
255.255.255.192 (/26) 262,144 subnets with 62 hosts each
255.255.255.224 (/27) 524,288 subnets with 30 hosts each
255.255.255.240 (/28) 1,048,576 subnets with 14 hosts each
255.255.255.248 (/29) 2,097,152 subnets with 6 hosts each
255.255.255.252 (/30) 4,194,304 subnets with 2 hosts each

Available Class A subnet masks
Subnet zero
This chart assumes you can use subnet zero. If you’re not using subnet zero, subtract two from each number in the Subnets column in Table A above. 

Once you have an idea what your network will look like, write down the number of physical subnets you have and the number of hosts needed for each subnet. For example, on a WAN point-to-point link, you need only two IP addresses, so you can use a /30 mask.

/30
The slash (/) indicates the number of mask bits turned on. It saves you from typing, or pronouncing, the whole mask. For example, /8 means 255.0.0.0, /16 is 255.255.0.0, and /24 is 255.255.255.0. You pronounce it as "configure a slash 24 mask on that network." It's just an easier way of saying "configure a 255.255.255.0 mask on that network."

Subnet addresses
Once you have the mask assigned to each network, you must assign the valid subnet addresses and host ranges to each network. To determine the valid subnets and host addresses for each network, you need to answer three easy questions:
1. What is the valid subnet address?
2. What is the broadcast address?
3. What is the valid host range?
4. Here are some tips for finding the answers:

Valid subnet address: 
To figure out the valid subnet address, simply subtract the subnet mask from 256. For example, if you had a Class A mask of 255.240.0.0, the equation would be 256-240=16. The number 16 is the first subnet and also your block size. Keep adding the block size (in this case 16) to itself until you reach the subnet mask value. The valid subnets in this example are 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224. As another example, if you had a Class A subnet mask of 255.255.240.0, you’d use the mask on the second and third octets minus 256. The second octet would be 256-255=1, 2, 3, etc., all the way to 254; the third octet would be 256-240=16, 32, 48, etc.

Broadcast address: 
To determine the broadcast address of each subnet, just subtract 1 from the next subnet value. For example, within the 16 subnet, the next subnet is 32, so the broadcast address of the 16 subnet is 31. The broadcast address for the 32 subnet is 47, because the next subnet is 48. The broadcast address for the 48 subnet is 63, because the next subnet is 64.

Valid host range: 
The valid hosts are the numbers between the subnet address and the broadcast address. For the 16 subnet, the valid host range you can assign on a network is 17-30 because the subnet number is 16 and the broadcast address is 31. For the 32 subnet, the valid host range is 33 to 46 because the subnet number is 32 and the broadcast address is 47. You can’t use the subnet number and broadcast addresses as valid host addresses.

Assigning valid host addresses
Using Figure A as an example, let’s assign networks and valid host ranges to each network. First, create another table of usable block sizes. Figure B shows how to assign block sizes to your network on a granular basis.

















 
 
Assigning other Class A masks
Figure B is an example of variable length subnet masks and is typically the easiest way you’ll assign IP addresses on an internetwork. However, let’s go through a few practice examples of subnetting Class A masks, to make sure you really understand the process.


Practice Class A mask 255.240.0.0 (/12)
This mask provides you with only four subnet bits, or 16 subnets (14 if you’re not using subnet zero) with 1,048,574 hosts each. The valid subnets are 256-240=16, 32, 48, 64, 80, etc., all the way to 224. (Subnets 0 and 240 are available if you’re using subnet zero.)

The first subnet, assuming subnet zero, is:
• Subnet: 10.0.0.0
• Broadcast: 10.15.255.255
• Valid host range: 10.0.0.1 through 10.15.255.254

The last subnet, assuming subnet zero, is:

• Subnet: 10.240.0.0
• Broadcast: 10.255.255.255
• Valid host range: 10.240.0.1 through 10.255.255.254

Practice Class A mask 255.255.128.0
This mask provides you with nine bits of subnetting and 15 host bits (/17). This gives you 512 subnets with 32,766 hosts each. The second octet is 256-255=1, 2, 3, etc., all the way to 255. Zero is available in the second octet if you have either a subnet bit on in the third octet or are, of course, using subnet zero.

The first available subnet is:
• Subnet: 10.0.0.0
• Broadcast: 10.0.127.255
• Valid host range: 10.0.0.1 through 10.0.127.254

You must remember that the third octet is using only one subnet bit. This bit can be either off or on; if it is off, the subnet is 0. If it is on, the subnet is 128.

Here’s an example of the 10.0.128.0 subnet:
• Subnet: 10.0.128.0
• Broadcast: 10.0.255.255
• Valid host range: 10.0.128.1 through 10.0.255.254

The last available subnet is:
• Subnet: 10.255.128.0
• Broadcast: 10.255.255.255
• Valid host range: 10.255.128.1 through 10.255.255.254

Practice Class A mask 255.255.255.252

This mask is the easiest to subnet. Even if it weren’t a Class A mask, and you used this mask with a Class B or Class C mask, you’d always have only two available host IDs. The reason you would use this with a Class A mask is because it can give you up to 4,194,304 subnets with two hosts each. This is a perfect mask for a point-to-point link, so I suggest always saving a few block sizes of four (/30) masks for use on WANs and point-to-point LAN connections.

If you use the 10.2.3.0 network, your subnets are always 2.3 in the second and third octets, respectively. But the fourth octet is where it changes, as in 256-252=4, 8, 12, 16, 20, 24, 28, etc., all the way to 248. If you use subnet zero, your first subnets are 0, and your last subnet is 255.

An example of the 10.2.3.0 subnet is:
• Subnet: 10.2.3.0
• Broadcast: 10.2.3.3
• Valid hosts: 10.2.3.1 and 10.2.3.2

An example of the 10.2.3.252 subnet is:
• Subnet: 10.2.3.252
• Broadcast: 10.2.3.255
• Valid hosts: 10.2.3.253 and 10.2.3.254

No comments:

Post a Comment