Lecture 19 and 20 IP Addressing
Lecture 19 and 20 IP Addressing
and Networks
1
What is an IPV4 Address?
2
Address Space
…………..
addr1 …………..
addr15
addr2 ………….. …………..
…………..
addr41 addr226
addr31
………….. …………..
3
Address space rule
…………..
…………..
The address space in a protocol
That uses N-bits to define an
Address is:
2N
4
IPv4 address space
232
or
4,294,967,296.
5
Binary Notation
6
Dotted-decimal notation
7
Example 3
Solution
Solution
9
CLASSFUL
ADDRESSING
10
In classful addressing the address space is
divided into 5 classes:
A, B, C, D, and E.
11
Finding the class in binary notation
12
Finding the address class
13
Example 5
14
Example 6
Solution
15
Finding the class in decimal notation
16
Example 7
Solution
• 158.223.1.108
1st byte = 158 (128<158<191) class B
• 227.13.14.88
1st byte = 227 (224<227<239) class D
17
IP address with appending port
number
158.128.1.108:25
thefour octet before colon is the IP address
The number after colon (25) is the port
number
18
Netid and hostid
19
Blocks in class
A
20
Blocks in class B
21
Blocks in class C
22
23
24
25
Network
Addresses
Solution
The 1st byte is between 128 and 191.
Hence, Class B
The block has a netid of 132.21.
The addresses range from
132.21.0.0 to 132.21.255.255.
Mask
29
Default Mask
30
Subnet Mask
31
Subnet Mask
(Cont.)
32
Subnet Mask (Cont.)
The subnet masking process was developed
to identify & extract the Network part of the
address.
A subnet mask, which contains a binary bit pattern
of ones & zeros, is applied to an address to
determine whether the address is on the local
Network.
If it is not, the process of routing it to an outside
network begins.
33
Subnet Mask (Cont.)
34
Subnet Mask (Cont.)
35
A network with two levels of
hierarchy (not subnetted)
36
Note
37
Example 9
38
Solution
AND OPERATION
39
Example 10
Solution
41
Comparison of a default mask and
a subnet mask
42
43
Example 11
Solution
The number of 1s in the default
mask is 24 (class C).
44
Solution (Continued)
45
Solution (Continued)
47
Example 12
Solution
49
Solution (Continued)
The mask is
50
Example 4
51
Exercise
52
Exercise
Let us consider an example of Class B network 172.16.0.0.
What is will be the first and last IP address, if we want to create
6 subnets
53
SUPERNETTING
54
What is supernetting?
55
A
supernetwork
56
Rules:
The number of blocks must be a power of 2 (1,
2, 4, 8, 16, . . .).
The blocks must be contiguous in the address
space (no gaps between the blocks).
The third byte of the first address in the
superblock must be evenly divisible by the number
of blocks. In other words, if the number of blocks is
N, the third byte must be divisible by N.
Example 5
58
Solution
59
60
In supernetting,
we need the first address of
the supernet
and the supernet mask to
define the range of addresses.
61
Comparison of subnet, default,
and supernet masks
62
We need to make a supernetwork out of 16
class C blocks. What is the supernet mask?
Solution
We need 16 blocks. For 16 blocks we need to change four 1s to 0s in
the default mask. So the mask is
11111111 11111111 11110000 00000000
or
255.255.240.0
63
Example 14
64
Solution
Solution
The supernet has 21 1s. The default mask has 24 1s. Since
the difference is 3, there are 23 or 8 blocks in this supernet.
The blocks are 205.16.32.0 to 205.16.39.0. The first
address is 205.16.32.0. The last address is 205.16.39.255. 66