Monday, May 23, 2016

6.5. Subnet Masks

If you take a glance at a PC's IP setup, you'll find that the PC dependably has both an IP location, (for example, 205.143.60.109) and a subnet mask, (for example, 255.255.255.0). The subnet mask characterizes which part of the PC's IP location is the net-ID and which part is the host-ID. To see this obviously, you have to show the locations in binary form:

Computer IP Address (Dec):               205                         143                         60                           109
Computer IP Address (Bin):                11001101                10001111                00111100               01101101
Subnet mask (Decimal):                       255                         255                         255                         0
Subnet mask (Bin):                                 11111111                   11111111                   11111111                   00000000

The net-ID of a location, characterized by the subnet mask, is whatever bit of the location has a binary 1 set in the relating subnet mask. In the former case, the net-ID is the full initial 3 octets (the initial 24 bits), and the host-ID is the final octet (the last 8 bits). Presently you can see why 255 (decimal) is utilized so as often as possible as a part of subnet masks:

255 communicate to include all bits set to 1 in a 8-bit no.

Subnet masks ought to dependably utilize adjacent 1s, beginning from the left and attempting to right side. The host-ID part ought to contain all adjacent 0s, working in reverse from the right to the left side. While it is hypothetically conceivable to construct subnet masks that have blended 1s and 0s, it is never done practically speaking since it would rapidly turn out to be excessively difficult, making it impossible to oversee legitimately and in light of the fact that there's no genuine motivation to do as such. Likewise, the part of the host-ID that is subnet- masked can't comprise of all 0s or all 1s. While certain executions of IP do permit all 0s, such an arrangement is not part of the acknowledged standard IP guidelines, and in this manner utilizing such a host-ID is dangerous on the grounds that a few gadgets on the network may not comprehend it.

Let’s now come back to the case of the organization with three structures. Consider the possibility that the organization could partition a solitary Class C address so that every building could utilize its own segment, and the routers interfacing the structures would comprehend which transmissions ought to be sent to other structures and which ones ought not be. Such a design is the place subnet masks are valuable.

A subnet mask permits you to "get" a quantity of bits from your host-IDs & then apply all those bits to make new net-IDs. For the case, you would need to get three bits from the Class C address (the 4th octet) and utilize that deliver to make four separate net-IDs. Look at how this design would function in binary configuration:

Subnet mask (Bin):                                 11111111                   11111111                   11111111                   11100000
Bldg. 1 IP adds:                                          11001101                10001111                00111100               100xxxxx
Bldg. 2 IP adds:                                         11001101                10001111                00111100               011xxxx
Bldg. 3 IP adds:                                         11001101                10001111                00111100               101xxxxx
Subnet mask (Decimal):                       255                         255                         255                         224
Bldg. 1 IP adds:                                          205                         143                         60                           129 – 158
Bldg. 2 IP adds:                                         205                         143                         60                           97 – 126
Bldg. 3 IP adds:                                         205                         143                         60                           161 – 190

Utilizing this design, the organization can make up to 6 net-IDs, and every building can be furnished with 30 accessible host-ID addresses. By utilizing subnetting to assign every different net-ID, the organization can program the routers to send parcels between networks just when the bundles should be steered.





Binary Mask
Decimal Equivalent
Number of Subnets
Number of Host-IDs per Subnet
00000000
0
1
254
10000000
128
2
126
11000000
192
4
62
11100000
224
8
30
11110000
240
16
14
11111000
248
32
6
11111100
252
64
2
11111110
254
N/A
N/A
11111111
255
N/A
N/A




Table 6.5. Most Common Subnet Masks

Since subnet masks are typically made utilizing adjacent bits for the mask itself, just 9 subnet masks are normally utilized, as appeared in Table 6.5.

In Table 8-1, a few setups are set apart as N/A, for not applicable. These subnet masks would bring about no accessible locations, on account of the guideline that the subnet part of the net-ID can't be all 0s or all 1s. For instance, consider the subnet mask of 224, which utilizes 3 host-ID bits for the subnet-ID. In principle, this setup ought to bring about 8 subnets. Be that as it may, the subnets spoke to by 000 and 111 are not substantial. In like manner, 128 is not a legitimate subnet mask since that one bit would dependably be either a 1 or a 0.


0 comments:

Post a Comment

Powered by Blogger.