Lecture 16 IP Addressing
Lecture 16 IP Addressing
3
Binary to DDN conversion
Example 1
Solution
We replace each group of 8 bits with its equivalent decimal number
(see Appendix B) and add dots for separation:
a. 129.11.11.239
b. 193.131.27.255
c. 231.219.139.111
d. 249.155.251.15
Example 2
Solution
We replace each decimal number with its binary equivalent:
a. 01101111 00111000 00101101 01001110
b. 11011101 00100010 00000111 01010010
c. 11110001 00001000 00111000 00001100
d. 01001011 00101101 00100010 01001110
Example 3
Solution
a. There should be no leading zeroes (045).
b. We may not have more than 4 bytes in an IPv4 address.
c. Each byte should be less than or equal to 255.
d. A mixture of binary notation and dotted-decimal notation.
IPv4 Addressing Classification
• Classful Addressing
• Classless Addressing
19.12
Class Net ID Host ID Binary DDN No of No of Default CIDR
bits bits networ host/N mask
ks w
A 8 24 0 0-127 2^7=12 2^24 255.0.0 /8
(2^31) 8 .0
B 16 16 10 128- 2^14 2^16 255.25 /16
(2^30) 191 5.0.0
C 24 8 110 192- 2^21 2^8 255.25 /24
(2^29) 223 5.255.0
D NA NA 1110 224- NA NA NA NA
(2^28) 239
E NA NA 1111 240- NA NA NA NA
(2^28) 255
19.14
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 byte is 14; the class is A.
d. The first byte is 252; the class is E.
• Thank You
• Discussion & Doubt session will be in
lecture.