Trending: ENet Blog

Thursday, April 28, 2011

Subnet masking - 1


Subnetting an IP Network is done primarily for better utilization of available IP address space, and routing purpose. Other reasons include better organization, use of different physical media (such as Ethernet, WAN, etc.), and securing network resources.

A subnet mask enables you to identify the network and node parts of the address. The network bits are represented by the 1s in the mask, and the node bits are represented by the 0s. A logical AND operation between the IP address and the subnet mask provides the Network Address.

For example, using our test IP address and the default Class C subnet mask, we get:

192.189.210.078: 1100 0000.1011 1101.1101 0010.0100 1110 Class C IP Address

255.255.255.000: 1111 1111.1111 1111.1111 1111.0000 0000 Default Class C subnet mask

192.189.210.0 1100 0000 1011 1101 1101 0010 0000 0000

As can be seen above, by using and AND operator, we can compute the network portion of an IP address. The network portion for the IP address given in the above example is 192.189.210.0, and the host portion of the IP address is 078.

Given below is a table that provides binary equivalent of decimal values.

For binary conversion, take first octet of a given IP address (in dotted decimal form), and lookup the binary value. Then take the second octet and lookup the binary value, and so on.

Binary Conversion Table
DecimalBinaryDecimalBinaryDecimalBinaryDecimalBinary
00000 0000640100 00001281000 00001921100 0000
10000 0001650100 00011291000 00011931100 0001
20000 0010660100 00101301000 00101941100 0010
30000 0011670100 00111311000 00111951100 0011
40000 0100680100 01001321000 01001961100 0100
50000 0101690100 01011331000 01011971100 0101
60000 0110700100 01101341000 01101981100 0110
70000 0111710100 01111351000 01111991100 0111
80000 1000720100 10001361000 10002001100 1000
90000 1001730100 10011371000 10012011100 1001
100000 1010740100 10101381000 10102021100 1010
110000 1011750100 10111391000 10112031100 1011
120000 1100760100 11001401000 11002041100 1100
130000 1101770100 11011411000 11012051100 1101
140000 1110780100 11101421000 11102061100 1110
150000 1111790100 11111431000 11112071100 1111
160001 0000800101 00001441001 00002081101 0000
170001 0001810101 00011451001 00012091101 0001
180001 0010820101 00101461001 00102101101 0010
190001 0011830101 00111471001 00112111101 0011
200001 0100840101 01001481001 01002121101 0100
210001 0101850101 01011491001 01012131101 0101
220001 0110860101 01101501001 01102141101 0110
230001 0111870101 01111511001 01112151101 0111
240001 1000880101 10001521001 10002161101 1000
250001 1001890101 10011531001 10012171101 1001
260001 1010900101 10101541001 10102181101 1010
270001 1011910101 10111551001 10112191101 1011
280001 1100920101 11001561001 11002201101 1100
290001 1101930101 11011571001 11012211101 1101
300001 1110940101 11101581001 11102221101 1110
310001 1111950101 11111591001 11112231101 1111
320010 0000960110 00001601010 00002241110 0000
330010 0001970110 00011611010 00012251110 0001
340010 0010980110 00101621010 00102261110 0010
350010 0011990110 00111631010 00112271110 0011
360010 01001000110 01001641010 01002281110 0100
370010 01011010110 01011651010 01012291110 0101
380010 01101020110 01101661010 01102301110 0110
390010 01111030110 01111671010 01112311110 0111
400010 10001040110 10001681010 10002321110 1000
410010 10011050110 10011691010 10012331110 1001
420010 10101060110 10101701010 10102341110 1010
430010 10111070110 10111711010 10112351110 1011
440010 11001080110 11001721010 11002361110 1100
450010 11011090010 11011731010 11012371010 1101
460010 11101100110 11101741010 11102381110 1110
470010 11111110110 11111751010 11112391110 1111
480011 00001120111 00001761011 00002401111 0000
490011 00011130111 00011771011 00012411111 0001
500011 00101140111 00101781011 00102421111 0010
510011 00111150111 00111791011 00112431111 0011
520011 01001160111 01001801011 01002441111 0100
530011 01011170111 01011811011 01012451111 0101
540011 01101180111 01101821011 01102461111 0110
550011 01111190111 01111831011 01112471111 0111
560011 10001200111 10001841011 10002481111 1000
570011 10011210111 10011851011 10012491111 1001
580011 10101220111 10101861011 10102501111 1010
590011 10111230111 10111871011 10112511111 1011
600011 11001240111 11001881011 11002521111 1100
610011 11011250111 11011891011 11012531111 1101
620011 11101260111 11101901011 11102541111 1110
630011 11111270111 11111911011 11112551111 1111

Example Question: Which of the following is a Class C IP address?

A. 10.10.14.118

B. 135.23.112.57

C. 191.200.199.199

D. 204.67.118.54

Correct Answer: D.

Explanation:

IP addresses are written using decimal numbers separated by decimal points. This is called dotted decimal notation of expressing IP addresses. The different classes of IP addresses is as below:

Class

Format

Leading Bit pattern

Network address Range

Maximum networks

Maximum hosts

A

N.H.H.H

0

0-126

127

16,777,214

B

N.N.H.H

10

128-191

16,384

65,534

C

N.N.N.H

110

192-223

2,097,152

254

Network address of all zeros means "This network or segment".

Network address of all 1s means " all networks", same as hexadecimal of all Fs.

Network number 127 is reserved for loopback tests.

Host (Node) address of all zeros mean "This Host (Node)".

Host (Node) address of all 1s mean "all Hosts (Nodes) " on the specified network.

0 Responses to “Subnet masking - 1”

Post a Comment

All Rights Reserved ENet Blog | Template Designed by Techie Blogger
Sponsored by Latest Music
X