Week 5 IPv4 Addressing
Week 5 IPv4 Addressing
IPv4
Addressing
CONTENTS
Introduction
Notations
Classful addressing
Classless addressing
UTeM
INTRODUCTION
UTeM
NOTATIONS
UTeM
Binary Notation
Display as 32 bits
4 bytes
Each octet referred as a byte
Octet
UTeM
Dotted Decimal Notation
UTeM
Value range every octet are 0 to 255 or 00000000 to
11111111
UTeM
Example
Solution
129.11.11.239
249.155.251.15
UTeM
Example
Solution
01101111 00111000 00101101 01001110
01001011 00101101 00100010 01001110
UTeM
CLASSFUL ADDRESSING
UTeM
Address Classes
5 different classes of address – A,B,C,D & E
Designed to cover the needs of different types
Class A :: First bit is 1
Class B :: 1st bit is 1 and 2nd bit is 0
Class C :: 1st bit is 1, 2nd bit is 1 and 3rd bit is 0
Class D :: 1st bit is 1, 2nd bit is 1, 3rd bit is 1 and 4th is 0
Class E :: All first 4 bit are 1
UTeM
Classes (cont.)
UTeM
Example
Find the class of each address:
00000001 00001011 00001011 11101111
11110011
1111 10011011 11111011 00001111
Solution
The first bit is 0; this is a class A address.
The first 4 bits are 1s; this is a class E address.
UTeM
Example
Solution
The first byte is 227 (between 224 and 239); the class is D.
The first byte is 252 (between 240 and 255); the class is E.
The first byte is 134 (between 128 and 191); the class is B.
UTeM
Netid and Hostid
Class type
netid hostid
4 bytes
UTeM
UTeM
Example
192.168.2.1
Class C which is “192.168.2” is netid while “.1” is hostid
60.5.6.244
Class A which is “60” is netid while “.5.6.244” is host id
UTeM
Classes and Block
UTeM
Block in class A
UTeM
Block in class B
UTeM
Block in class C
UTeM
Network Address
UTeM
Example
UTeM
Broadcast Address
Broadcast address refers to the ability to
address a message that is broadcast to all
stations or hosts on a network.
Abroadcast address has both netid and hostid,
with 1s for all bits in the hostid
All 1s
UTeM
Example
UTeM
Masking
UTeM
Subnetting
UTeM
UTeM
Supernetting
UTeM
Supernetting (cont.)
UTeM
CLASSLESS ADDRESSING
UTeM
Address Block
UTeM
Mask
UTeM
Example
UTeM
Default class C mask is
255.255.255.0 or 111111111.11111111.11111111.00000000
Mask after subnetting
Borrow n value, n=5,
111111111.11111111.11111111.11111000
255.255.255.248 or /29
UTeM
Range of address
192.168.2.0 to 192.168.2.7
192.168.0 is network address
192.168.2.7 is broadcast address
Useable address is 192.168.2.1 to 192.168.2.6
6 addresses
UTeM
or
Range of address
192.168.2.8 to 192.168.2.15
192.168.8 is network address
192.168.2.15 is broadcast address
Useable address is 192.168.2.7 to 192.168.2.14
6 addresses
UTeM
Example
UTeM
Use ANDing proccess
192.168.3.20 AND 255.255.255.240
Convert to binary
11000000101010000000001100010100
11111111111111111111111111110000
11000000101010000000001100010000
192.168.3.16 is network address
192.168.3.23 is broadcast address
UTeM
Example:
i. A block of addresses is granted to a small organization. We
know that one of the addresses is 205.16.37.39/28. What is
the first address (network address) in the block?
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 0, rest is 1s we get
11111111 11111111 11111111 11110000
Using ANDing process
11001101 00010000 00100101 00100000
or
UTeM
19.41 205.16.37.32
Cont.
ii. Find the last address (broadcast address) for the block
Solution
If we set 32 − 28 rightmost bits from 0 to 1, we get
11001101 00010000 00100101 00101111
or
205.16.37.47
Solution
Convert to decimal and adding with 1
1111 = 15 , then + 1
= 16 addresses
UTeM
Any Questions ?