You are on page 1of 87

18ECC303J – Computer

Communication Networks
Course Credit : 4
Theory : 9 Hours

Reference Text Books


1.Behrouz A. Fehrouzan, “Data communication & Networking”, Mc-Graw Hill, 5th Edition Reprint, 2014.
2. Andrew S.Tanenbaum, “Computer Networks”, Pearson Education India, 5th Edition, 2013.
3. William Stallings, “Data & Computer Communication”, Pearson Education India, 10th Edition, 2014.
Unit 3 – Network Layer

Session 1 Session 2 Session 3


• Introduction to Network • Addressing-Classful • Addressing-Classless
Week 7 Layer
• Need for Internetworking

Session 6 Session 7 Session 8


• Network Layer Protocol- • Internet Protocol(IP)-IPV6 • Routing Protocols- Distance
Week 8 IPV4 Vector& Link State
• Routing Issues-Delivery,
Forwarding and Routing

Session 11 Session 12 Session 13


• Routing Information • Open Shortest Path First- • Border Gateway Protocol-
Week 9 Protocol-RIP OSPF BGP
Objectives
Upon completion you will be able to:

• Recall the Fundamentals of Network layer, its services


•Understand the concept of Internetworking and its need

•Understand IPv4 addresses and classes

• Identify the class of an IP address

• Find the network address given an IP address

• Understand masks and how to use them

• Understand subnets and supernets


3
 Session 1- Introduction Network Layer
• Network layer is responsible for the host- to-
host delivery of datagram.
• It provides services to the transport layer and
receives services from data link layer.
• The network layer is involved at the source host,
destination host, and all routers in the path(R2,
R4, R5, and R7).
• At the source host (Alice), the network layer
accepts a packet from a transport layer,
encapsulates the packet in a datagram, and
delivers the packet to the data-link layer.
• At the destination host (Bob), the datagram is
decapsulated, and the packet is extracted and
delivered to the corresponding transport layer.
• The routers use three layers if they are routing
packets only; however, they may need the
transport and application layers for control
purposes.
• A router in the path is normally shown with two
data-link layers and two physical layers,
because it receives a packet from one network
and delivers it to another network.
Layer Services
Review Question
Why does the network-layer protocol need to provide
packetizing service to the transport layer?
Answer:
• The network and The transport layer communication is between two
hosts.
• This means that each layer has a different source/destination
address pair; each layer needs a different header to accommodate
these pair of addresses.
2. Routing:

• A physical Network is a combination of LANs, WANs and routers that connect


them. Therefore, there is more than one route from the source to the
destination. The network layer is responsible for finding the best one among
these possible routes that called routing.
• The network layer have some specific strategies for defining the best route
called routing protocols, routing protocols help the routers coordinate their
knowledge about the neighborhood and to come up with consistent tables to be
used when a packet arrives.
Review Question
Why is routing the responsibility of the
network layer?
Answer:
• The network layer is the most essential layer
• It deals with the data transferring from one to another place
• It is responsible for end to end (source to destination) packet
delivery
3. Forwarding
• When a router receives a packet from one of its attached networks, it needs to
forward the packet to another attached network.
• forwarding can be defined as the action applied by each router when a packet
arrives at one of its interfaces based on routing table.
• To make this decision, router normally use a decision-making table . It is called
(the forwarding table) or (the routing table).The piece of information can be
destination address or a label
Other Services
• Error Control: a checksum field to the datagram to control any change or
corruption in the header, but not in the whole datagram.
• Flow Control: Flow control regulates the amount of data a source can send
without overwhelming the receiver. The network layer in the Internet does not
directly provide any flow control. The datagrams are sent by the sender when
they are ready.(Why flow control is not provided?)
• Congestion Control: Congestion may occur if the number of datagrams sent by
source computers is beyond the capacity of the network or routers. In this
situation, some routers may drop some of the datagrams.
• Quality of Service: quality of service has become more important in the Internet
especially with multimedia communication. However, to keep the network layer
untouched, these provisions are mostly implemented in the upper layer.
• Security: To provide security for a connectionless network layer, we need to have
another virtual level ( IPSec) that changes the connectionless service to a
connection-oriented service.
 Need for Internetworking
What does Internetworking mean?
Internetworking is the process or technique of
connecting different networks by using intermediary
devices such as routers or gateway devices.
These arbitrary collection of networks are
interconnected to provide some sort of host-to-host
packet delivery service

Need of Internetworking
Internetworking ensures data communication among
networks owned and operated by different entities
using a common data communication and the Internet
Routing Protocol.
Internetworking is only possible when all the
connected networks use the same protocol stack or
communication methodologies.
Internetworking devices
• Internetworking Devices are the product
used to connect networks.
• As computer network grows in size and
complexity, so do the internetworking
devices used to connect them
• Broadly. Following are the Internetworking
Devices:
 Repeater
 Hubs
 Bridges
 Switches
 Routers
 Gateways
• Networking Devices are used to connect
networks.
• Internetworking devices are used to
connect networks.
• An Internet is an interconnection of
individual networks
Review Question
1. Which is called as two layer Switch?
2. Hub operates in which of the layer?
3. _______ does not actually connect two LANS, it connects two segment of the
same LAN.
4. Which potentially operates in all seven layers?
Answer:
1. Bridges, Bridges operate in both the physical and the data link layers of
the OSI model.
2. Hubs, A Hub is a multiport repeater. It is normally used to create
connections between stations in a physical star topology.
3. Repeaters.
4. Gateways.
Internetworking
 Concatenation of Different Networks
Problem 1: Heterogeneity of Networks
 Solution: Layered Protocol Stack (IP over …… )

Problem 2: Scalability in Routing and Addressing


 Solution: Address Hierarchy

 What is IP?
 IP stands for Internet Protocol
 Key tool used today to build scalable, heterogeneous internetworks
 It runs on all the nodes in a collection of networks and defines the infrastructure
that allows these nodes and networks to function as a single logical
internetwork
Service Model
• A good place to start when you build an internetwork is to define its service model
• A service model is the host-to-host services you want to provide
• Service model for an internetwork
 a host-to-host service only if this service can somehow be provided over each of the
underlying physical networks
Two parts
 Global Addressing Scheme
 Provides a way to identify all hosts in the network
 Datagram (Connectionless) model for data delivery
 Best-effort delivery (unreliable service)
 packets are lost
 packets are delivered out of order
 duplicate copies of a packet are delivered
 packets can be delayed for a long time
Session 2- Internet Addressing- Introduction
Notation • Ipv4 uses 32 bit address, or a 4 octet address or a 4-byte
addresses.
• Each connection has a unique address. The address space is
2^32=4,294,967,296(4 billion devices could be connected to the
internet)
• Binary notation(Base 2 notation)
01110101 10010101 00011101 11101010
• Dotted Decimal notation(Base 256 notation)
Notation (cont’d)
• Hexadecimal Notation(Base 16 notation)

each hexadecimal digit is equivalent to four bits


0111 0101 1001 0101 0001 1101 1110 1010
75 95 1D EA
0x75951DEA
- 32 bit address has 8 hexadecimal digits
- Used in network programming
Review Questions
1.Change the following IP addresses from dotted-decimal notation to binary
notation.
a. 111.56.45.78 b. 221.34.7.82
c. 241.8.56.12 d. 75.45.34.78
Solution
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
Review Questions
2. Change the following IP addresses from binary notation to hexadecimal
notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
Solution
Replace each group of 4 bits with its hexadecimal equivalent (see Appendix
B). Note that hexadecimal notation normally has no added spaces or dots;
however, 0X (or 0x) is added at the beginning or the subscript 16 at the end to
show that the number is in hexadecimal.
a. 0X810B0BEF or 810B0BEF16
b. 0XC1831BFF or C1831BFF16
Classful Addressing
Occupation of address space

 In classful addressing, the address space(total number of address used by the


protocol) is divided into five classes: A, B, C, D, and E.
 Class A addresses cover ½ the address space!! Millions of class A addresses
are wasted!
Classful Addressing (cont’d)
 Finding the class in binary notation
Classful Addressing (cont’d)
 Finding the address class
Review Questions
Find the class of each address:
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 10100111 11011011 10001011 01101111
d. 11110011 10011011 11111011 00001111
Review 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 bit is 0; the second bit is 1. This is a class B address.

d. The first 4 bits are 1s. This is a class E address..


Classful Addressing (cont’d)
 Finding the class in decimal notation
Review Questions
Find the class of each address:
a. 227.12.14.87 b.193.14.56.22 c.14.23.120.8
d. 252.5.15.111 e.134.11.78.56
Review Solution

a. The first byte is 227 (between 224 and 239); the class is D.
b. The first byte is 193 (between 192 and 223); the class is C.
c. The first byte is 14 (between 0 and 127); the class is A.
d. The first byte is 252 (between 240 and 255); the class is E.
e. The first byte is 134 (between 128 and 191); the class is B.
Netid and Hostid
• Each IP address is made of two parts; netid and hostid.
• Netid defines a network; hostid identifies a host on that network.
Netid and Hostid (cont’d)
IP addresses are divided into five different classes: A, B, C, D, and E
Class A addresses
• 7 bits for the network part and 24 bits for the
host part
• 126 (= 2^7-2) class A networks (0 and 127 are
reserved)
• each network can accommodate up to 2^24-2
(about 16 million) hosts (again, two are reserved
values)
Class B addresses
• 14 bits for the network part and 16 bits for the
host part
• 65,534 (= 2^16-2) hosts
Class C addresses
• 21 bits for the network part and 8 bits for the (a) Class A (b) Class B (c) Class C
host part
• 2,097,152 (= 22l) class C networks
• 254 hosts (host identifier 255 is reserved for
broadcast, and 0 is not a valid host number)
Classes and Blocks
Blocks in class A
 Class A is divided into 128 blocks (16,777,216 addresses in each
block)with each block having a different netid.

 Millions of class A addresses are wasted.


Classes and Blocks (cont’d)
Class B is divided into 16,384 blocks(65536 addresses in each
block) with each block having a different netid

Many class B addresses are wasted.


Classes and Blocks (cont’d)
Class C is divided into 2,097,152 blocks (256 addresses in each
block)with each block having a different netid.

The number of addresses in a class C block is smaller than the needs of


most organizations
Class D addresses Class E addresses
are used for are reserved for
multicasting; there special purposes;
is only one block in most of the block is
this class. wasted.
Note…
In classful addressing, the network address (the first address in
the block) is the one that is assigned to the organization.

The network address defines the network to the rest of the


Internet.

Given the network address, we can find the class of the address,
the block, and the range of the addresses in the block

The range of address can automatically be inferred from the


network address
Review Questions:
1.Given the network address 17.0.0.0, find the class, the block, and the range of the
addresses.
2. Given the network address 132.21.0.0, find the class, the block, and the range of
addresses.
3. Given the network address 220.34.76.0, find the class, the block, and the range of
addresses
Solution
1. The class is A because the first byte is between 0 and 127. The block has a netid
of 17. The addresses range from 17.0.0.0 to 17.255.255.255.
2. The class is B, the block is 132.21, and the range is 132.21.0.0 to
132.21.255.255.
3. The class is C, the block is 220.34.76, and the range of addresses is 220.34.76.0
to 220.34.76.255
Masking Concept
A mask is a 32-bit binary number that gives the first address in the
block (the network address) when bitwise ANDed with an address in
the block.
Masking concept: Given an address from a block of addresses, we can
find the network address by ANDing with a mask.
Mask (cont’d)
AND Operation

The network address is the beginning address of each block. It can


be found by applying the default mask to any of the addresses in
the block (including itself). It retains the netid of the block and sets
the hostid to zero.
Default Masks

Default masks
Note…
The network address is the beginning address
of each block.

It can be found by applying the default mask to


any of the address in the block (including itself)

It retains the netid of the block and sets the


hosted to zero.
Review Questions:
1.Given the address 23.56.7.91, find the beginning address (network address).

2. Given the address 132.6.17.85, find the beginning address (network address).

3. Given the address 201.180.56.5, find the beginning address (network address).
Solutions:
1.The default mask is 255.0.0.0, which means that only the first byte is preserved and
the other 3 bytes are set to 0s. The network address is 23.0.0.0.

2. The default mask is 255.255.0.0, which means that the first 2 bytes are preserved
and the other 2 bytes are set to 0s. The network address is 132.6.0.0.

3. The default mask is 255.255.255.0, which means that the first 3 bytes are
preserved and the last byte is set to 0. The network address is 201.180.56.0.
Others Issues
Multihomed devices (computers, or
routers)
 A computer that is connected to

different networks
 Having more than one address
Special Addresses
Some parts of the address space in class A, B, C for special addresses

Special addresses
Special Addresses
Network address : an address with the hostid all set to 0s
Special Addresses (cont’d)
Direct Broadcast Address : Used by a router to send a packet to all
hosts in a specific network
Special Addresses (cont’d)
Limited Broadcast Address : all 1s for the netid and hostid (32bits)
Special Addresses (cont’d)
This Host on This Network : used by a host at bootstrap time when it
does not know its IP address
Special Addresses (cont’d)
Specific Host on This Network : used by a host to send a message
to another on the same network
Special Addresses (cont’d)
Loopback Address :
 IP address of the first byte : 127

 Used to test the software on a

machine
 Used by a client process to send a

message to a server process on the


same machine
 “Ping”
Private Addresses
A number of blocks in each class are assigned for private use.
They are not recognized globally. Useful for intranets with more
devices. (Translation tables – NAT router for smaller set
external address mapping)
Class Netid Total Blocks Addresses

Class A 10.0.0 1 2^24

Class B 172.16 to 172.31 16 2^20

Class C 192.68.0 to 192.68.255 256 2^16


Unicast, Multicast, and Broadcast Addresses

Unicast communication.

• Unicast Addresses : one-to-one

Multicast communication.

• Multicast addresses : one-to-many; class D address


• Used as a destination address

Broadcast communication.

• Broadcast addresses : one-to-all


• Allowed only at the local level
• Limited broadcast address (all 1s)
• Direct broadcast address (netid: specific, hostid:
all 0s)
• No broadcasting is allowed at the global level
A Sample Internet with Classful Address
Token Ring LAN (Class C), Ethernet LAN (Class B), Ethernet LAN (Class A) ,
Point-to-point WAN, A Switched WAN
Subnetting and Supernetting
• A network is divided into
several smaller networks with
Subnetting each subnetwork (or subnet)
having its subnetwork address

• Combining several class C


Supernetting addresses to create a larger
range of addresses

IP Addresses are designed with two levels


of hierarchy
Subnetting
Classes A, B, C in IP addressing are designed with two levels
of hierarchy (not subnetted) :Netid and Hostid

This network (141.14.0.0) is a class B and can have 2^16 hosts.


There is only 1 network with a whole-lotta hosts!
Subnetting (cont’d)
Further division of a network into smaller networks called subnetworks
Default mask and Subnet Mask
A process that extracts the address of the physical network
(network/subnetwork portion) from an IP address
Finding the Subnetwork address
Given an IP address, we can find the subnet address by applying the mask to the IP
address. Use binary notation for both the address and the mask and then apply the AND
operation to find the subnet address.
Example
What is the subnetwork address if the destination address is 132.45.34.56 and the
subnet mask is 255.255.240.0?
Solution:
Address ➡ 10000100 00101101 00100010 00111000
Subnet Mask ➡ 11111111 11111111 11110000 00000000
Subnetwork Address ➡ 10000100 00101101 00100000 00000000.
The subnetwork address is 132.45.32.0 (3rd subnet out 16 subnets in 132.45.0.0).
The last address in this subnet is 132.45.47.255. How? Just complement subnet
mask and then ORed with any one of the address in this subnet. Try!
Comparison of a default mask and a subnet mask

With this subnet mask, you have 3 bits for the subnet address (the
pink portion) which equals 8 addresses( i.e. 8 subnets), leaving 13
bits for the Hostid (the blue portion) which equals 2^13 hosts.
Supernetwork
A block of class x addresses
For example,
 An organization that needs 1,000
addresses can be granted four class C
addresses.
 4 class C addresses combine to make one
supernetwork.
 X.Y.35.255 (last address) is a direct
broadcast ID.
 Supernet ID (first address) is X.Y.32.0
 Supernet Mask is 255.255.248.0, ie.,
11111111 11111111 11111100 00000000
Supernetting (cont’d)
4 class C addresses combine to make one supernetwork
In supernetting, we
In subnetting, we need
need the first address
the first address of the
of the supernet and the
subnet and the subnet
supernet mask to
mask to define the
define the range of
range of addresses.
addresses.
Comparison of Subnet, Default and Supernet Mask
Summary
• At the Network layer, a global identification system that uniquely
identifies every host and router is necessary for delivery of
packet from host to host.
• An IPv4 address is 32 bits long and uniquely and universally
defines a host or router on the Internet.
• The portion of the IP address that identifies the net is called the
netid.
• The portion of the IP address that identifies the host or router on
the network is called the hostid.
• An IP address defines a device’s connection to a network.
• There are five classes in IPv4 addresses. Classes A, B, and C
differ in the number of hosts allowed per network. Class D is for
multicasting and Class E is reserved.
Summary
• The class of an address is easily determined by examination of
the first byte.
• Addresses in classes A, B, or C are mostly used for unicast
communication.
• Address in class D are used for multicast communication.
• Subnetting divides on large network into several smaller ones,
adding an intermediate level of hierarchy in IP addressing.\
• Classes A, B and C addresses can be subnetted.
• Supernetting combines several networks into one large one.
Disadvantage of Classful Address:
1. millions of Class A and Class B address are wasted
2. number of addresses available in class C is so small that it cannot cater the needs of organizations
3. Maintenance is time consuming
4. More prone to errors
5. Security issues
Session - 3

• Classless Addressing provides a method to generate any range of IP address


blocks, serving user requirements.
• Unlike Classful Addressing, Classless Addressing does not divide address space
into fixed parts
• The whole idea of classless addressing is divided into variable-length blocks that
belong to no class.
• Number of Addresses in a Block must be a power of 2

Variable-length blocks

 The Classless Inter-Domain Routing, in short CIDR, is a method that is adopted


to distribute and allocate blocks of IP addresses and further assist in IP routing.

 The CIDR was first introduced in 1993 by the Internet Engineering Task Force to
replace the previous Classful addressing scheme on the Internet.
Advantages of classless addressing over classful
addressing:

• Overcomes address depletion and give more organizations access to the Internet
• Classful addressing does not send subnet information.
• Efficient address-space allocation is available in classless addressing.
• Memory is allocated in terms of bits and bytes rather than huge chunks of
contiguous memory.
• It eliminates any class imbalances.
Classless Addressing
Two level addressing: • In Classless Addressing, we can always have the length of the
• Here the prefix defines the network and suffix defines the Prefix(n) of the IP address. You can find at the end of the IP
host. address with a slash (/n).
• Length of prefix depends on the size of block and not fixed ,
it can be 1 to 32.
• Prefix length is given by n
• Suffix length is given by 32-n

• This slash notation in Classless Addressing is formally known


as Classless Inter-Domain Routing (CIDR) notation.

• Here, in a network, the value of “Prefix” will be the same,


but the value of “Suffix” will vary with the number of hosts. • The n after the slash defines the number of bits that are the same
in the every address in the block
• So, the length of Prefix (n) can have value as 1,2, • For instance, if the IPv4 address is in CIDR notation
3,4….,31, and the Suffix value automatically calculated like 192.168.170.82/27, then 27 is the length of Prefix that is the
as 32 – length of Prefix (n). number of bits allocated to the network ID. Also, the suffix length
we can calculate as 32-27 = 5.
Prefix and Prefix Length
• Similar to netid

Table : Prefix lengths


Classless Addressing

CIDR tries to balance the desire to minimize the number of routes that a router needs to know
against the need to hand out addresses efficiently.

CIDR uses aggregate routes


 Uses a single entry in the forwarding table to tell the router how to reach a lot of
different networks
 Breaks the rigid boundaries (of classful addressing) between address classes

The implementation of the CIDR block in Classless Addressing is achieved with three
rules.

1. The allocated block of IP address must have a contiguous unallocated address.


2. The number of IP addresses given to the customer must be in the power of 2.
3. The first address of the address blocks must be evenly divisible by the length of
the block.
Classless Addressing
Extracting Block information Example
1. Number of addresses What is the first address in the block if one of the addresses is
2. First address 167.199.170.82/27?
3. Last address
Solution
 The number of host address from the given block of address is The prefix length is 27, which means that we must keep the
calculated as
first 27 bits as it is and change the remaining bits (5) to 0s.

where N is the number of host addresses, and n is the length


of the Prefix. The following shows the process:
The first address of the block
First address = (given address) AND (network mask) Address in binary: 10100111 11000111 10101010 01010010

Keep the left 27 bits:10100111 11000111 10101010 01000000


The last address of the block
Last address = (given address) Or [NOT (network address)] Result in CIDR notation: 167.199.170.64/27
Classless Addressing
Example (to find first address and last address) Similarly, the Last address we can calculate as below.
IP address 167.199.170.82/27, which is in CIDR notation and belongs to a
Classless address. The given address in binary notation = 10100111 11000111 10101010 01010010
Here, the length of the Prefix (n) = 27 The Not(Network Mask given address) = 00000000 00000000 00000000 00011111
So, using the above formula, the number host (N) = 2^32-27 = 2^5 = 32.
To calculate the first address of the IP address block, we can use the below So, the Last address = (given address) OR [Not(Network Mask from given
formula: address)]

First address = (given address) AND (network mask)


Here, the NOT operator will change the value just opposite (True to False and
The given IP address is 167.199.170.82 False to True), whereas the OR operator follows the addition rule.
So, 0 OR 1 = 1, 1 OR 1 = 1 and 0 OR 0 = 0.
When we convert into a binary number, the whole thing will look as below
.
Given address in binary notation = 10100111 11000111 10101010
01010010
Network mask of given address = 11111111 11111111 11111111 11100000

Here, we will use the AND operator to get the result. For the AND operator,
So, 1 AND 1 = 1, 1 AND 0 = 0 and 0 AND 0 = 0

Now, the Last address would be 10100111 11000111 10101010 01011111


The decimal notation of the Last address would be 167.199.170.95.

From the above example, we have concluded that


167.199.170.82 is the given address,
167.199.170.64 is the First address, and
The result for the First address would be 10100111 11000111 10101010 01000000
167.199.170.95 is the Last address.
The decimal notation of the First address would be 167.199. 170.64
The total number of hosts is 32.
Network address

o A very important concept in IP addressing is the network address.


o When an organization is given a block of addresses, the organization is free to
allocate the addresses to the devices that need to be connected to the Internet.
o The first address is called the network address and defines the organization
network. First address is the one that is used by routers to direct the message sent
to the organization from the outside.
o The first address in a block is normally not assigned to any device; it is used as the
network address that represents the organization to the rest of the world.
o The organization network is connected to the Internet via a router. The router has
two addresses. One belongs to the granted block; the other belongs to the network
that is at the other side of the router. We call the second address x.y.z.t/n because we
do not know anything about the network it is connected to at the other side. All
messages destined for addresses in the organization block (205.16.37.32 to
205.16.37.47) are sent, directly or indirectly, to x.y.z.t/n.
Hierarchy:
IP addresses, like other addresses or identifiers we encounter these days, have levels of hierarchy.

Two level Hierarchy Three level Hierarchy


Through subnetting, we have three levels of hierarchy.
An IP address can define only two levels of Note that , the subnet prefix length can differ for the
hierarchy when not subnetted. subnets .
The n leftmost bits of the address x.y.z.t/n define The structure of classless addressing does not restrict
the network (organization network); the number of hierarchical levels.
the 32 – n rightmost bits define the particular host An organization can divide the granted block of
(computer or router) to the network. addresses into subblocks.
Each subblock can in turn be divided into smaller
The two common terms are prefix and suffix.
subblocks. And so on.
The part of the address that defines the network is One example of this is seen in the ISPs. A national ISP
called the prefix; the part that defines the host is can divide a granted large block into smaller blocks and
called the suffix. assign each of them to a regional ISP. A regional ISP
The prefix is common to all addresses in the can divide the block received from the national ISP into
network; the suffix changes from one device to smaller blocks and assign each one to a local ISP. A
local ISP can divide the block received(for customers)
another.
Address Allocation
The next issue in classless addressing is address allocation

Address allocation is the responsibility of a global authority called the Internet Corporation for
Assigned Names and Addresses (ICANN).

It usually assigns a large block of addresses to an ISP to be distributed to its Internet users.
which in turn, grant small subblocks to individual customers. This is called address
aggregation: many blocks of addresses are aggregated in one block and granted to one ISP.
Summary
In classless addressing, we can divide the address space into variable-length blocks.
There are three restrictions in classless addressing:
 The number of addresses needs to be a power of 2.
 The mask needs to be included in the address to define the block.
 The stating address must be divisible by the number of addresses in the block.
The mask in classless addressing is expressed as the prefix length (/n) in CIDR notation.
To find the first address in a block, we need to apply the mask to one of the addresses.
To find the number of addresses in the block, we calculate 2 32-n, where n is the prefix length.
To find the last address in the block, we add the first address to the number of addresses and subtract one.
We can have both fixed-length and variable-length subnetting. In fixed-length subnetting, the number of addresses in each
subnet is the same. In variable-length subnetting, the number of addresses in each subnet can be different.
In fixed-length subnetting, the number of subnets needs to be a power of 2. There is no such restriction in variable -length
subnetting.
Subnetting increases the value of n.
The global authority for address allocation is ICANN. ICANN normally grants large blocks of addresses to ISPs, which in
turn, grant small subblocks to individual customers.

You might also like