0% found this document useful (0 votes)
103 views

IP Address

IP address is a unique 32-bit address used to identify and connect to devices on a network or the internet. It consists of a network portion and a host portion. Classless Inter-Domain Routing (CIDR) is a method that assigns IP addresses in a more flexible way compared to the old classful addressing system. CIDR uses variable-length subnet masking to divide IP address space into hierarchies of subnets of different sizes.

Uploaded by

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

IP Address

IP address is a unique 32-bit address used to identify and connect to devices on a network or the internet. It consists of a network portion and a host portion. Classless Inter-Domain Routing (CIDR) is a method that assigns IP addresses in a more flexible way compared to the old classful addressing system. CIDR uses variable-length subnet masking to divide IP address space into hierarchies of subnets of different sizes.

Uploaded by

Ankit Rajput
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 42

IP address is an address having information about how

to reach a specific host, especially outside the LAN. An


IP address is a 32 bit unique address having an address
space of 232.
Note
An IPv4 address is 32 bits long.

19.3
Note
The IPv4 addresses are unique
and universal.

19.4
Note
The address space of IPv4 is
232
or 4,294,967,296.

19.5
IPv4 address is divided into two parts

Network ID
Host ID
Figure 19.1 Dotted-decimal notation and binary notation for an IPv4
address

19.8
Example 19.1

Change the following IPv4 addresses from binary notation


to dotted-decimal notation.

Solution
We replace each group of 8 bits with its equivalent decimal
number (see Appendix B) and add dots for separation.

a. ????
b. ????
19.9
Example 19.2

Change the following IPv4 addresses from dotted-decimal


notation to binary notation.

19.10
Solution
We replace each decimal number with its binary
equivalent (see Appendix B).
Example 19.3

Find the error, if any, in the following IPv4 addresses.

19.12
Note
In classful addressing, the address space is divided into five classes:
A, B, C, D, and E.

19.13
Figure 19.2 Finding the classes in binary and dotted-decimal
notation

19.14
Example 19.4

Find the class of each address.

a. 00000001 00001011 00001011 11101111


b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111

19.15
Table 19.1 Number of blocks and block size in classful IPv4
addressing

19.16
Note
In classful addressing, a large part of the available addresses were wasted.

19.17
CIDR
(Classless Inter-Domain Routing) -- also known as supernetting --
is a method of assigning Internet Protocol (IP) addresses that
improves the efficiency of address distribution and replaces the
previous system based on Class A, Class B and Class C networks. 

Classless Inter-Domain Routing (CIDR), also called supernetting,


is a way to more flexibly allocate Internet Protocol (IP) addresses
by creating unique and more granular identifiers for networks and
individual devices. 
CIDR is based on variable-length subnet masking (VLSM), which
enables network engineers to divide an IP address space into a
hierarchy of subnets of different sizes, making it possible to create 
subnetworks with different host counts without wasting large
numbers of addresses.
Table 19.2 Default masks for classful
addressing

19.20
CIDR addresses are made up of two sets of numbers: a prefix,
which is the binary representation of the network address --
similar to what would be seen in a normal IP address -- and a
suffix, which declares the total number of bits in the entire
address.
For example, CIDR notation may look like: 192.168.129.23/17 --
with 17 being the number of bits in the address. IPv4 addresses
allow a maximum of 32 bits.
Computer networks can be broken into many networks or
small networks can be combined to form large networks
depending upon our needs.

This is done by 

• IP subnetting
• Supernetting
Why subnetting?

Suppose we take a network of class A. So, in class A, we have 2² ⁴


hosts. So to manage such a large number of hosts is tedious. So if we
divide this large network into the smaller network then maintaining
each network would be easy.
How does subnetting work?
Suppose we have a class C network having network ID as
201.10.1.0(range of class C 192–223). So the total number of
hosts is 256(for class C host is defined by last octet i.e. 2 ⁸). But, the
total usable host is 254. This is because the first IP address is for
the network ID and the last IP address is Direct Broadcast
Address(for sending any packet from one network to all other
hosts of another network).
Note
Classful addressing, which is almost obsolete, is replaced with classless addressing.

19.25
Figure 19.3 A block of 16 addresses granted to a small
organization

19.26
Note
In IPv4 addressing, a block of
addresses can be defined as
x.y.z.t /n
in which x.y.z.t defines one of the addresses and
the /n defines the mask.

19.27
Note
The first address in the block can be found by setting the rightmost
32 − n bits to 0s.

19.28
Which of the subnet masks we can use for a corporate
network with 300 sub-networks and a maximum of 50
host addresses per subnet and working with only Class
B address.
ANS:] /25 = 255.255.255.128 and /26 = 255.255.255.192
Explanation:] Given that we need to subnet class “B” network.
Required Number of Subnets: 300
And, Maximum of Host address per subnet is: 50
To fulfill these requirements, we can use two combinations of NW bits and Host bits
i.e. we can use 2 different Subnet Masks.
Class “B”: Default Subnet Mask /16 = 255.255.0.0 
1.For 300 Subnets we need to Borrow 9 bits such as, 29 = 512 > 300.
Hence, Network bits = 16 + 9 = 25 
Therefore, Host Bits = 32 – 25 = 7
Maximum of Host address available = 27 – 2 = 126 > 50
Means, both of the requirements are fulfil. So we can use CIDR /25 i.e. Subnet
mask 255.255.255.128.
2.For 300 Subnets we need to Borrow 10 bits such as, 210 = 1024 > 300.
Hence, Network bits = 16 + 10 = 26 
Therefore, Host Bits = 32 – 26 = 6
Maximum of Host address available = 26 – 2 = 64 > 50
Means, both of the requirements are fulfil. So we can use CIDR /26 i.e. Subnet
mask 255.255.255.192.
An organization requires a range of IP addresses to assign one to each
of its 1500 computers. The organization has approached an Internet
Service Provider (ISP) for this task. The ISP uses CIDR and serves the
requests from the available IP address space 202.61.0.0/17. The ISP
wants to assign address space to the organization which will minimize
the number of routing entries in the ISP’s router using route
aggregation. To calculate the address spaces are potential candidates
from which the ISP can allow any one of the organizations?
Subnet Mask for the given IP address:
202.61.0.0/17
⇒ 11111111 11111111 10000000 00000000
⇒ 255.255.128.0
Now, since we need 1500 hosts, so, bits for host address,
= ceiling (log (1500))
2

= ceiling (10.55)
= 11 bits for host address
So, the last 11 bits will be for host addresses:
00000000.00000000 → 00000111.11111111 (0.0 → 7.255)
00001000.00000000 → 00010000.00000000 (8.0 - 15.255)
00001111.11111111 → 00010111.11111111 (16.0 - 23.255)
Sequences are 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 96, 104, 112, 120.
Hence, 64 and 104 are present in the sequence, so 202.61.104.0 / 21 and
202.61.64.0 / 21 are the possible IP addresses.
Your router has the following IP address on Ethernet0: 172.16.2.1/23.
Which of the following can be valid host IDs on the LAN interface
attached to the router?

1.172.16.1.100
2.172.16.1.198
3.172.16.2.255
4.172.16.3.0

A. 1 Only
B. 2 and 3 Only
C. 3 and 4 Only
D. None of the above
What is the maximum number of IP addresses that
can be assigned to hosts on a local subnet that uses
the 255.255.255.224 subnet mask?

A. 14
B. 15
C. 16
D. 30
You need to subnet a network that has 5 subnets, each with at
least 16 hosts. Which classful subnet mask would you use?

A. 255.255.255.192

B. 255.255.255.224

C. 255.255.255.240

D. 255.255.255.248
Why supernetting?

Supernetting is the opposite of Subnetting. In subnetting, a single


big network is divided into multiple smaller subnetworks. In
Supernetting, multiple networks are combined into a bigger network
termed as a Supernetwork or Supernet. 

The routing table contains the entry of a subnet mask for every
network. If there are lots of small networks then the size of the
routing table increases. When the router has a big routing table then
it takes a lot of time for the router to process the routing table.
Supernetting is used to reduce the size of the IP routing table to
improve network routing efficiency.

The main purpose of supernetting is reducing the size of the


routing table on routers.
Supernetting Rules

Just like subnetting, supernetting is about counting in orders of 2 i.e. 2, 4,


8, 16, etc. When you create a supernet, you need to ensure that it covers
only the networks you want to aggregate and not more. In fact, less is
better so as to avoid routing issues
The rules to create supernets are as follows:
•Make sure the networks are contiguous (defined as “next or together
in sequence”).
•Determine the number of networks to be aggregated and ensure that
this number is an order of 2.
•Compare the value of the first non-common octet in the first (lowest)
IP address block in the list of networks to be aggregated to the
number of networks to be aggregated (which is also an order of 2).
The value of the first non-common octet must be:
• Zero (0), or
• A multiple of the number of networks to be aggregated. For
example, 16 is a multiple of 8 but 8 is not a multiple of 16.
Let’s take examples to explain these rules in detail.
Consider the following lists of networks to be
aggregated:

List 1 List 2 List 3 List 4 List 5

192.168.0.0/24 192.168.1.0/24 192.168.0.0/24 192.168.0.0/24 10.4.0.0/16

192.168.1.0/24 192.168.2.0/24 192.168.1.0/24 192.168.1.0/24 10.5.0.0/16

192.168.2.0/24 192.168.2.0/24 10.6.0.0/16

192.168.4.0/24 10.7.0.0/16

We will apply the rules to each list and if any one of the rules is broken, then
we cannot create one supernet for all those networks without causing some
issues.
Rule #1: Contiguous networks

•The networks in List 1 are contiguous because the next subnet after
192.168.0.0/24 is 192.168.1.0/24. Qualifies for next round.
•The networks in List 2 are contiguous because the next subnet after
192.168.1.0/24 is 192.168.2.0/24. Qualifies for next round.
•The networks in List 3 are contiguous because the next subnet after
192.168.0.0/24 is 192.168.1.0/24 and after that is
192.168.2.0/24. Qualifies for next round.
•The networks in List 4 are not contiguous because the next subnet
after 192.168.2.0/24 is 192.168.3.0/24, not 192.168.4.0/24. Does not
qualify for next round.
•The networks in List 5 are contiguous. Qualifies for next round.
Rule #2: Number of networks order of 2

•There are two networks to be aggregated in List 1 which is an


order of 2. Qualifies for next round.
•There are two networks to be aggregated in List 2 which is an
order of 2. Qualifies for next round.
•There are three networks to be aggregated in List 3 which is not
an order of 2. Does not qualify for next round.
•There are four networks to be aggregated in List 5 which is an
order of 2. Qualifies for next round.
Rule #3: Value of non-common octet in first IP block is zero or a multiple
of the number of networks to be aggregated
Note: This rule is dependent on the previous rule being met. For example,
even though 3 is a multiple of 6, 6 is not an order of 2.

•The first non-common octet in List 1 is the 3rd octet i.e. 0 vs. 1. The first
(lowest) IP address block is 192.168.0.0/24. The decimal value of the 3rd
octet in this address block is 0. Qualifies to be aggregated.
•The first non-common octet in List 2 is the 3rd octet i.e. 1 vs. 2. The first
(lowest) IP address block is 192.168.1.0/24. The decimal value of the 3rd
octet in this address block is 1. This value is not zero or a multiple of the
number of networks to aggregated (2). Does not qualify to be aggregated.
•The first non-common octet in List 5 is the 2nd octet i.e. 4 vs. 5 vs. 6 vs. 7.
The first (lowest) IP address block is 10.4.0.0/16. The decimal value of the
2nd octet in this address block is 4. This value is a multiple of the number of
networks to aggregated (4). Qualifies to be aggregated.
Therefore, only Lists 1 and 5 can be aggregated into one supernet without
causing any issues.

You might also like