Linux Scroll

Just another WordPress.com site

IP address calculation

Network class:

Class A: 1 to 126; Subnetmask: 255.0.0.0; 8 bits

Class B: 128 to 191; Subnetmask: 255.255.0.0; 16 bits
Class C: 192 to 223; Subnetmask: 255.255.255.0; 24 bits
Class D: 224 to 239
Class E: 240 to 255

Bit-wise representation
n indicates a binary slot used for network ID.
H indicates a binary slot used for host ID.
X indicates a binary slot (without specified purpose)

Class A

0. 0. 0. 0 = 00000000.00000000.00000000.00000000
127.255.255.255 = 01111111.11111111.11111111.11111111
0nnnnnnn.HHHHHHHH.HHHHHHHH.HHHHHHHH n=128(27) H=16,777,216(224)

Class B
128. 0. 0. 0 = 10000000.00000000.00000000.00000000
191.255.255.255 = 10111111.11111111.11111111.11111111
10nnnnnn.nnnnnnnn.HHHHHHHH.HHHHHHHH n=16,384(214) H=65,536(216)

Class C
192. 0. 0. 0 = 11000000.00000000.00000000.00000000
223.255.255.255 = 11011111.11111111.11111111.11111111
110nnnnn.nnnnnnnn.nnnnnnnn.HHHHHHHH n=2,097,152(221) H=256(28)

Class D
224. 0. 0. 0 = 11100000.00000000.00000000.00000000
239.255.255.255 = 11101111.11111111.11111111.11111111
1110XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX

Class E
240. 0. 0. 0 = 11110000.00000000.00000000.00000000
255.255.255.255 = 11111111.11111111.11111111.11111111
1111XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX

2 Equations:

Usable Subnets = (2^n)–2 , where N = power of bits assigned

Usable Hosts = (2^n)–2 , where N = power of bits remaining

Power of N: N7  N6  N5  N4  N3  N2  N1  N0

Equal: 128 64 32 16 8 4 2 1
N = 2 bits
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: