IP addressing schemes
IP addressing schemes



1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1 (128+64+32+16+8+4+2+1=255)

0 1 0 0 0 0 0 1
0 64 0 0 0 0 0 1 (0+64+0+0+0+0+0+1=65)

10. 1. 23. 19 (decimal)
00001010.00000001.00010111.00010011 (binary)


· One component is the network portion of the address, consisting of the network bits.
– The network bits make up the left portion of the address.
– They consist of the first bit up to some boundary, to be discussed later.
· The second component is the host portion of the address, consisting of the host bits.
– The host bits make up the right portion of the address.
– They consist of the remaining bits not included with the network bits.
IP Classes



Class
|
IP Address
|
Network ID
|
Host ID
|
A
|
a.b.c.d
|
a
|
b.c.d
|
B
|
a.b.c.d
|
a.b
|
c.d
|
C
|
a.b.c.d
|
a.b.c
|
d |





Find the class of each address:
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 10100111 11011011 1000119011 01101111
d. 11110011 10011011 11111011 00001111
b. 11000001 10000011 00011011 11111111
c. 10100111 11011011 1000119011 01101111
d. 11110011 10011011 11111011 00001111
Solution:
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C address.
c. The first bit is 0; the second bit is 1. This is a class B address.
d. The first 4 bits are 1s. This is a class E address..
b. The first 2 bits are 1; the third bit is 0. This is a class C address.
c. The first bit is 0; the second bit is 1. This is a class B address.
d. The first 4 bits are 1s. This is a class E address..

Find the class of each address:
a. 227.12.14.87 b.193.14.56.22 c.14.23.120.8
d. 252.5.15.111 e.134.11.78.56
d. 252.5.15.111 e.134.11.78.56
Solution:
a. The first byte is 227 (between 224 and 239); the class is D.
b. The first byte is 193 (between 192 and 223); the class is C.
c. The first byte is 14 (between 0 and 127); the class is A.
d. The first byte is 252 (between 240 and 255); the class is E.
e. The first byte is 134 (between 128 and 191); the class is B.
b. The first byte is 193 (between 192 and 223); the class is C.
c. The first byte is 14 (between 0 and 127); the class is A.
d. The first byte is 252 (between 240 and 255); the class is E.
e. The first byte is 134 (between 128 and 191); the class is B.

Find the class and net ID for each address:
a. 14.23.120.8 b. 227.12.14.87 c. 134.11.78.56
Solution:
a. The first byte is 14 (between 0 and 127); the class is A & Net ID is 14.0.0.0
b. The first byte is 227 (between 224 and 239); the class is D & it is used for multicasting so it does not have any Net ID.
c. The first byte is 134 (between 128 and 191); the class is B & Net ID is 134.11.0.0

Find the class and Host ID for each address:
a. 14.23.120.8 b. 227.12.14.87 c. 134.11.78.56
Solution:
a. The first byte is 14 (between 0 and 127); the class is A & Host ID is 0.23.120.8
b. The first byte is 227 (between 224 and 239); the class is D & it is used for multicasting so it does not have any Host ID.
c. The first byte is 134 (between 128 and 191); the class is B & Host ID is 0.0.78.56