0% found this document useful (0 votes)
2 views35 pages

Lecture 7

The document discusses Classless Inter-Domain Routing (CIDR), which replaced traditional classful IP addressing to allow for more efficient allocation of IP addresses. It explains how CIDR uses Variable Length Subnet Masking (VLSM) and provides examples of calculating subnet, broadcast, and usable host ranges. Additionally, it covers problems related to CIDR notation and subnetting, illustrating how to determine network addresses, ranges, and the number of addresses in a block.

Uploaded by

alomi4752
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views35 pages

Lecture 7

The document discusses Classless Inter-Domain Routing (CIDR), which replaced traditional classful IP addressing to allow for more efficient allocation of IP addresses. It explains how CIDR uses Variable Length Subnet Masking (VLSM) and provides examples of calculating subnet, broadcast, and usable host ranges. Additionally, it covers problems related to CIDR notation and subnetting, illustrating how to determine network addresses, ranges, and the number of addresses in a block.

Uploaded by

alomi4752
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Finding the Subnet, Broadcast and Useable Host Ranges

Lecture 7
CIDR

1
Introduction
•Prior to 1981, IP addresses used only the first 8 bits
to specify the network portion of the address
•In 1981, RFC 791 modified the IPv4 32-bit address to
allow for three different classes
❑Class A addresses used 8 bits for the network
portion of the address,
❑Class B used 16 bits,
❑Class C used 24 bits.
•This format became known as classful IP
addressing.

2
Solution
•Classless Inter Domain Routing (CIDR) was announced
in September 1993 and is documented in RFCs 1517,
1518, 1519, and 1520.
•CIDR (often pronounced as “cider”) eliminates the
traditional concept of Class A, B, and C addresses
entirely.
•The first 3 bits of the IP address, which have
traditionally been used to determine address class,
are meaningless.
•Likewise first octet address ranges no longer indicate
a particular address class.
•CIDR uses Variable Length Subnet Masking (VLSM)
to help conserve address space.
•Thus, CIDR allows a more efficient allocation of the
3
remaining Internet IP addresses.
Implementation Requirement
•CIDR addresses are issued in blocks known as CIDR
blocks.
•Recall that the first octet is meaningless in
determining how many subnets or host IDs can be
defined for a given CIDR block.
•The only factor that determines the capacity of a
CIDR block is the network prefix assigned by the
Internet authorities when the CIDR block is issued.
•Just as was the case with classful addressing, the
network prefix issued by the Internet authorities
indicates the number of bits used for the major
network ID.

4
Cont.
•These bits are reserved and cannot be used by the
end users for subnet IDs or host IDs. For example, if
a CIDR block was issued with a network prefix of /18,
which would imply that the first 18 bits from left to
right be reserved for the network ID.
•This would leave 14 bits (32–18) for subnet IDs and
host IDs.
•Since 2 raised to the fourteenth power is 16,384,
that is how many host IDs or individual addresses can
be defined for a CIDR block with a network prefix of
/18.
•An important point to remember is that it doesn’t
matter what the assigned major network ID is: All
/18 CIDR blocks are equal in terms of capacity,
regardless of network ID. 5
Cont.
•This is where is becomes important to forget the
traditional view of classful addressing.
•As an example, the following three CIDR addresses
are equivalent, even though they would not be equal
from a classful addressing standpoint:

6
Number of Addresses in a Block

There is only one condition on the number of


addresses in a block; it must be a power of 2 (2, 4,
8, . . .). A household may be given a block of 2
addresses. A small business may be given 16
addresses. A large organization may be given 1024
addresses.

7
CIDR Notation
•CIDR notation of a network address:
[Link]/18
❑"18" says that the first 18 bits are the network
part of the address (and 14 bits are available
for specific host addresses)
•The network part is called the prefix
•Assume that an ISP owns the address block
[Link]/18, which represents 16,384 (232-18=214)
IP addresses
•Suppose a client requires 800 host addresses
•Assign a /22 block (512=29<800<1024=210→
32-10=22), e.g., [Link]/22 gives a block of 1,024
(210) IP addresses.
8
CIDR: Prefix Size vs. Host Space

9
PROBLEMS
P
A small organization is given a block with the
beginning address and the prefix length
[Link]/29 (in CIDR notation). What is the
range of the block?

Solution

The length of the suffix is 32 - 29 or 3. So there are


23 = 8 addresses in this block. If the first address is
[Link], the last address is [Link] (24 + 7
= 31).

10
Solution

11
PROBLEMS
What is the network address if one of the addresses
is [Link]/27? (What is the first address in
the block if one of the addresses is
[Link]/27?)

Solution
The prefix length is 27, which means that we must
keep the first 27 bits as is and change the remaining
bits (5) to 0s. The 5 bits affect only the last byte.
The last byte is 01010010. Changing the last 5 bits to
0s, we get 01000000 or 64. The network address is
[Link]/27.

12
PROBLEMS
What is the first address in the block if one of the
address is [Link]/20?

Answer

The first address is [Link]/20

13
PROBLEMS
Find the number of addresses in the block if one of
the addresses is [Link]/20.

Solution

The prefix length is 20. The number of addresses in


the block is 232-20 or 212 or 4096.

14
PROBLEMS
Find the last address in the block if one of the
addresses is [Link]/20.

Answer

The first address is [Link]/20


The number of addresses in the block is 4096.
To find the last address, we need to add 4095
(4096-1) to the first address.

15
Answer-Cont.
To keep the format in dotted-decimal notation, we
need to represent 4095 in base 256 and do the
calculation in base 256. We write 4095 as 15.255. We
then add the first address to this number (in base
255) to obtain the last address as shown below.

The last address is [Link]/20

16
PROBLEMS
An organization is granted the block [Link]/26. The
organization needs to have four subnets. What are the subnet
addresses and the range of addresses for each subnet?
Solution
The suffix length is 6. This means the total number of addresses
in the block is 64 (26). If we create four subnets, each subnet will
have 16 addresses.

Let us first find the subnet prefix . We need four subnets,


which mean we need to add two more 1s to the site prefix. The
subnet prefix is then /28.

Subnet 1: [Link]/28 to [Link]/28.


Subnet 2: [Link]/28 to [Link]/28.
Subnet 3: [Link]/28 to [Link]/28.
Subnet 4: [Link]/28 to [Link]/28. 17
PROBLEMS
Find the block if one of the addresses is
[Link]/29.

Solution

The number of addresses is 232-29 or 8.


The first address is [Link]/29
The last address is [Link]/29.

18
PROBLEMS
Show a network configuration for the block in the
previous example.

Solution
The organization that is granted the block in the
previous example can assign the addresses in the
block to the hosts in its network.

However, the first address needs to be used as the


network address and the last address is kept as a
special address(limited broadcast address)

19
Cont.

20
Note

•In classless addressing, the last address in the block


does not necessarily end in 255.

•In CIDR notation, the block granted is defined by the


first address and the prefix length.

21
Subnetting

•When an organization is granted a block of addresses,


it can create subnets to meet its needs.

•The prefix length increases to define the subnet


prefix length.

•In fixed-length subnetting, the number of subnets is


a power of 2.

22
PROBLEMS
An organization is granted the block [Link]/26.
The organization needs to have four subnets. What is
the subnet prefix length?

Solution
We need 4 subnets, which means we need to add two
more 1s (log24=2) to the site prefix. The subnet
prefix is then /28.

23
PROBLEMS
What are the subnet addresses and the range of
addresses for each subnet in the previous example?

Solution

24
Cont.

25
Cont.

26
PROBLEM

27
Solution

28
Cont.

29
Cont.

30
Problem

31
Solution

32
Solution

33
Solution

34
Solution

35

You might also like