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

mod5

The document discusses subnetting in IPv4 addressing, explaining how to divide a large block of addresses into smaller subnets for different purposes. It provides a detailed example of subnetting a network ID (192.168.4.0 /24) into four subnets, including their network IDs, usable host ranges, and broadcast IDs. Additionally, it covers the importance of IPv6, the structure of IPv4 addresses, and the concept of classful addressing.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

mod5

The document discusses subnetting in IPv4 addressing, explaining how to divide a large block of addresses into smaller subnets for different purposes. It provides a detailed example of subnetting a network ID (192.168.4.0 /24) into four subnets, including their network IDs, usable host ranges, and broadcast IDs. Additionally, it covers the importance of IPv6, the structure of IPv4 addresses, and the concept of classful addressing.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 118

MODULE 5

→ Subnetting Problem
Dr.S.Sivakumar, Associate Professor Senior,
SENSE, VIT
Subnetting
• If an organization was granted a large block in class A or
B, it could divide the addresses into several contiguous
groups and assign each group to smaller networks (called
subnets) or, in rare cases, share part of the addresses
with neighbors.
• Subnetting increases the number of Is in the mask
• The Default mask can help us to find the netid and the
hostid
• For example, the mask for a class A address has eight 1s,
which means the first 8 bits of any address in class A
define the netid; the next 24 bits define the hostid
• This notation is also called slash notation or Classless
Interdomain Routing (CIDR) notation. The notation is
used in classless addressing
Subnetting Problem

Given the network ID as 192.168.4.0 /24, you are suggested to


create three separate networks or subnets for VIT Café. One
subnet is for the office. One subnet is for the front desk and
storage room. Third subnet is for public use. Each Subnet has 64
total Host IDs (this total Host IDs data has to be found & not
mandatory to give in problem)
Build the Subnetting table and your task is to list each network
ID, Subnet Mask, Usable Host ID range, Number of usable host
IDs and Broadcast ID for the given scenario?
Solution:
Initial step is to build a table which has 3 rows comprising of
Subnet, Host and Subnet Mask
Initial Table before Subnetting process

Subnet 1 2 4 8 16 32 64 128 256


Host 256 128 64 32 16 8 4 2 1
Subnet /24 /25 /26 /27 /28 /29 /30 /31 /32
Mask

1. Pattern followed in Subnet (1st row) is, each number is double that of
previous number
2. The 2nd row is no. of total host IDs for each new subnet. Row 2 is
reverse of row 1 (each no. is half of its previous no.) for example /27
means 27 bits network (3 bits ON & 5 bits OFF in 4th octet). Hence
(2^3=8 subnets) and so 32-27=5 & (2^5=32 hosts)
3. Row 3 indicates subnet mask. In this 3 subnets to be constructed, (no
option to choose 3) so the option is to choose 4 subnets which contains
64 total host IDs including network ID and Host ID.
4. Thus /26 is the new subnet mask for these 4 subnets as per the initial
table
SUBNETTING TABLE

Subnet Network ID Subnet Mask Usable No. of Broadcast


no. or Network Host ID usable hosts ID
Mask Range
1 /26
2 /26
3 /26
4 /26

Identified Subnet Mask for given problem as three subnets are required.
Provision is there for 4 subnets only. Hence /26 subnet mask has been chosen
Identifying Network ID and No. of Usable Hosts

Given Network ID in problem was 192.168.4.0


• This 192.168.4.0 is the 1st Network ID
• The 2nd Network ID would be 0+64 =64. (since 64 total hosts)
• That is 192.168.4.64 would be 2nd Network ID
• 3rd Network ID would be 64+64 =128. That is 192.168.4.128
• 4th Network ID would be 192.168.4.192
Next step is to find the no. of usable Host ID ?
NOTE: 64 is total No. of Host IDs for each network.
• But 1st Host ID reserved for Network ID and the last Host ID
reserved for Broadcast ID
• Thus the no. of usable Host IDs is 64 – 2 =62.
• Hence all the 4 subnets will have no. of usable Host IDs as 62
Updated Subnetting Table

Subnet Network ID Subnet Usable Host No. of Broadcast


no. Mask ID Range usable hosts ID
1 192.168.4.0 /26 62

2 192.168.4.64 /26 62

3 192.168.4.128 /26 62

4 192.168.4.192 /26 62
Identification of Broadcast ID ranges
Note → The last Host ID is reserved for Broadcast ID
• Therefore the Broadcast ID for the 1st subnet is 63. That is
192.168.4.63
• Broadcast ID for the 1st subnet is 192.168.4.63 (which was arrived
with reference to 2nd Network ID 64)
• Similarly the Broadcast ID for the 2nd subnet is 127.
• That is 192.168.4.127 (w.r.to 3rd Network ID 128)
• Broadcast ID for the 3rd subnet is 192.168.4.191
• Broadcast ID for the 4th subnet is 192.168.4.255
• Thus “Broadcast ID equals the next Network ID minus 1”
(OR)
Note→ Also once we know 1st Broadcast ID (63), we can simply add
64 to get 2nd Broadcast ID (127) and so on
Identification of Subnet’s Usable Host ID ranges

• Finally need to identify Host ID ranges


• NOTE→ A Subnet’s Host ID range is any ID between its
Network ID and Broadcast ID
• Consider the 1st subnet, 1-62 is between the Network ID ‘0’
and Broadcast ID ‘63’. Therefore the 1st subnet’s Usable Host
ID range is from 192.168.4.1 to 192.168.4.62
• 2nd subnet Host ID range: 192.168.4.65 to 192.168.4.126
• 3rd subnet Host ID range: 192.168.4.129 to 192.168.4.190
• 4th subnet Host ID range: 192.168.4.193 to 192.168.4.254
Final Subnetting Table

Subnet Network ID Subnet Usable Host ID No. of Broadcast ID


no. Mask or Range usable
network hosts
mask
1 192.168.4.0 /26 192.168.4.1 to 62 192.168.4.63
192.168.4.62

2 192.168.4.64 /26 168.4.65 to 62 192.168.4.127


192.168.4.126
3 192.168.4.128 /26 192.168.4.129 to 62 192.168.4.191
192.168.4.190
4 192.168.4.192 /26 192.168.4.193 to 62 192.168.4.255
192.168.4.254
Now we can assign any three out of the four subnets to the VIT Café.
One subnet will be wasted anyway
MODULE 5
IPV4 Classful Addressing and
Classless addressing
Dr.S.Sivakumar, Associate Professor
SENSE, VIT
Module:5 Portions
Module:5 Network Layer 8 hours CO: 5
• Internetworking – IP Addressing – Subnetting
– IPv4 and IPv6– Routing – Distance Vector
and Link State Routing – Routing Protocols
Network Layer: Logical Addressing
• Communication at the network layer is host-to-host
(computer-to-computer); Usually, computers communicate
through the Internet
• The packet transmitted by the sending computer may pass
through several LANs or WANs before reaching the
destination computer. For this level of communication, we
need a global addressing scheme called as Logical Addressing
• IP address to mean a logical address in the network layer of
the TCP/IP protocol suite. The Internet addresses are 32 bits
in length; This gives us a maximum of 232 addresses.
• These addresses are referred to as IPv4 addresses or simply
IP addresses
IP Addressing
• An IPv4 address is a 32-bit address that uniquely and
universally defines the connection of a device (for example, a
computer or a router) to the Internet.
• Currently the IPv4 addresses used in the Internet are unique.
Unique in the sense that each address defines one, and only
one, connection to the Internet.
• Two devices on the Internet can never have the same
address at the same time.
• By using some strategies, an IP address may be assigned to a
device for a certain time period and then taken away and can
be re-assigned to another device
Why IPv6?

• The need for more addresses, in addition to other concerns


about the IP layer, motivated a new design of the IP layer
called the new generation of IP or IPv6 (lP version 6)
• In IPv6, the Internet uses 128-bit addresses that gives a much
greater flexibility in address allocation.
• These addresses are referred to as IPv6 addresses (which
theoretically makes it possible to assign 2 128 addresses)
• IPv4 has had many overlays to handle Internet growth, which
demand increasing maintenance efforts.
Importance of IPv6
• IPv6 networks provide auto-configuration capabilities. They
are simpler, flatter and more manageable for large
installations.
• Compared with the IPv4, IPv6 contains no IP-level checksum,
so the checksum does not need to be recalculated at every
router hop
• Also Directed Data Flows – IPv6 supports multicast rather
than broadcast
IPv4 Addressing
• If a device (Router) operating at the network layer has m
connections to the Internet, it needs to have m addresses.
• The IPv4 addresses are universal in the sense that the addressing
system must be accepted by any host that wants to be connected to
the Internet.
• If a protocol uses N bits to define an address, the address space is
2N because each bit can have two different values (0 or 1) and N
bits can have 2N values
• An address space in IPv4 is the total no. of addresses used by the
protocol. IPv4 uses 32-bit addresses, which means that the
address space is 232 or 4,294,967,296 (more than 4 billion).
• Theoretically, if there were no restrictions, more than 4 billion
devices could be connected to the Internet, but the actual number
is much less because of the restrictions imposed on the addresses
IPv4 Notations
• There are two prevalent notations to show an IPv4 address:
binary notation and dotted decimal notation.
• In binary notation, the IPv4 address is displayed as 32 bits.
Each octet is often referred to as a byte. An IPv4 address
referred to as a 32-bit address or a 4-byte address.
• The following is an example of an IPv4 address in binary
notation: 01110101 10010101 00011101 00000010
• Dotted-Decimal Notation→ To make the IPv4 address more
compact and easier to read, Internet addresses are usually
written in decimal form with a decimal point (dot) separating
the bytes. The following is the dotted-decimal notation of the
above address: 117.149.29.2
Dotted-decimal notation and binary notation
The following example shows an IPv4 address
• 10000000 00001011 00000011 00011111 → Binary notation
• 1x27 . (1x23 +1x21+1x20) . (1x21+1x20) . (1x24+1x23 + 1x 22 + 1x21 + 1x20)
• 128.11.3.31 → Corresponding Dotted-decimal notation after binary to decimal conversion
• We replace each group of 8 bits with its equivalent decimal number and add dots for separation.

Change the following IPv4 addresses from dotted-decimal notation to


binary notation: a. 111.56.45.78 b. 221.34.7.82 ?
Solution: We replace each decimal number with its binary equivalent
(using double-dabble method →that is divide by 2 and writing the
remainders in each step)

a) 111.56.45.78 → 01101111 00111000 00101101 01001110

b) 221.34.7.82→ ?
Dotted-decimal notation and binary notation

Change the following IPv4 addresses from binary to dotted-


decimal notation:
a) 10000001 00001011 00001011 11101111
b) 11000001 10000011 00011011 11111111 ?

Change the following IPv4 addresses from dotted-decimal


notation to binary notation: b. 221.34.7.82 ?
Ans: 11011101 00100010 00000111 01010010
IPv4 addresses

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


a. 111.56.045.78 b. 221.34.7.8.20 c. 75.45.301.14
d. 11100010.23.14.67 ?
Solution:
a. There must be no leading zero (045).
b. There can be no more than four numbers in an IPv4 address.
c. Each number needs to be less than or equal to 255 (301 is
outside this range).
d. A mixture of binary notation and dotted-decimal notation is
not allowed.
Classful Addressing
• IPv4 addressing, at its inception, used the concept of classes
• In classful addressing, the address space is divided into five
classes: A, B, C, D, and E. Each class occupies some part of the
address space.
• We can identify the class of an address when given the
address in binary notation or dotted-decimal notation.
• If the address is given in binary notation, the first few bits
can immediately tell us the class of the address
• If the address is given in decimal-dotted notation, the first
byte defines the class.
Finding Classes in binary & dotted decimal-notation
Finding the Class of given address
Find the class of each address in the following:
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111 ?

Classes and Blocks: One problem with classful addressing is that


each class is divided into a fixed number of blocks with each
block having a fixed size
Solution:
a. The first bit is 0. This is a class A address.
b. The 1st 2 bits are 1; the 3rd bit is 0. This is a
class C address.
c. The first byte is 14 (between 0 and 127); so
class A.
d. The first byte is 252 (between 240 and
255); So class E.
IPv4 addressing
Number of blocks and block size in Classful IPv4 addressing

Class Number of Blocks Block Size Application


A 128 16,777,216 Unicast
B 16,384 65,536 Unicast
C 2,097,152 256 Unicast
D 1 268,435,456 Multicast
E 1 268,435,456 Reserved

Class A addresses were designed for large organizations with a large number of
attached hosts or routers
Class B addresses were designed for midsize organizations with tens of thousands of
attached hosts or routers
Class C addresses were designed for small organizations with a small number of
attached hosts or routers
No of blocks in Class A and B

• Class A contains first byte of net id (255.0. 0.0) and has a


range 0-127 equals 128(127-0 +1). So total no blocks= 128.
• Similarly Class B contains 2 bytes of net id (255.255. 0.0) and
has a range 128-191 equals 64 (191-128 +1).
• So total no of blocks= 64 * 255 (of 2nd byte) = 16,384.
• The total addresses in class C are 536,870,912 which are
divided into 2,097,152 blocks and each block has 256
addresses
Classful Addressing
• A block in class A address is too large for almost any organization.
This means most of the addresses in class A were wasted and
were not used
• A block in class B is also very large, probably too large for many of
the organizations that received a class B block
• A block in class C is probably too small for many organizations
• Class D addresses were designed for multicasting. The Internet
authorities wrongly predicted a need for 268,435,456 groups. This
never happened and many addresses were wasted here too
• Class E addresses were reserved for future use; only a few were
used, resulting in another waste of addresses
• Thus in classful addressing, a large part of the available addresses
were wasted
Netid and Hostid

• In classful addressing, an IP address (4 bytes or 4 octets) in


class A, B, or C is divided into net id and host id. These parts
are of varying lengths, depending on the class of the address
Note →This net id & host id concept does not apply to class D
and class E.
• In class A, one byte defines the net id and three bytes define
the host id.
• In class B, two bytes define the net id and two bytes define
the host id.
• In class C, three bytes define the net id and one byte defines
the host id.
Default masks for Classful addressing
• Mask→ Although the length of the net id and host id is predetermined in
Classful addressing, we can also use a mask (also called default mask), a
32-bit number made of contiguous 1s followed by contiguous 0s. This
default mask concept does not apply to classes D and E.
• The masks for classes A, B, and C are shown in Table below:

Class Binary Dotted-Decimal Notation CIDR

A 11111111 00000000 00000000 255.0.0.0 18


00000000
B 11111111 11111111 00000000 255.255.0.0 116
00000000
C 11111111 11111111 11111111 255.255.255.0 124
00000000
Address Depletion
• The flaws in classful addressing scheme combined with the
fast growth of the Internet led to the near depletion of the
available addresses. Yet the number of devices on the
Internet is much less than the 232 address space
• We have run out of class A and B addresses, and a class C
block is too small for most midsize organizations.
• One solution that has alleviated the problem is the idea of
classless addressing.
• Classful addressing, which is almost obsolete, is replaced
with classless addressing
• To overcome address depletion and give more organizations
access to the Internet, classless addressing was designed and
implemented
Default masks
• The mask can help us to find the netid and the hostid
• For example, the mask for a class A address has eight 1s,
which means the first 8 bits of any address in class A define
the net id; the next 24 bits define the host id
• This notation is also called slash notation or Classless
Interdomain Routing (CIDR) notation. The notation is used in
classless addressing, it can also be applied to classful
addressing.
• Classful addressing is a special case of classless addressing.
Classless addressing
• Classless addressing is also called Classless Inter-Domain Routing
(CIDR). This addressing type helps to allocate IP addresses more
efficiently.
• When the user requires a particular number of IP addresses, this
method assigns a block of IP addresses concerning certain rules and
this block is called a CIDR block and has the required number of IP
addresses.
• Classless addressing concerns the following three rules when
assigning a block:-
Rule 1 – All the IP addresses in the CIDR block must be contiguous.
Rule 2 – The block size should be presentable as a power of 2.
Moreover, the number of IP addresses in the block is equivalent to the
size.
Rule 3 – First IP address of the block must be dividable by the block
size.
Classless addressing

• For example, assume that the classless address is


192.168.1.35/27
• The number of bits for the network portion is 27, and the
number of bits for the host is 5. (32-27)
• Representing the address in binary is as follows.
• 11000000 10101000 00000001 00100011
Subnetting and Supernetting
• If an organization was granted a large block in class A or B, it could divide
the addresses into several contiguous groups and assign each group to
smaller networks (called subnets) or, in rare cases, share part of the
addresses with neighbors.
• Subnetting increases the number of Is in the mask
• The time came when most of the class A and class B addresses were
depleted; however, there was still a huge demand for midsize blocks. The
size of a class C block with a maximum number of 256 addresses did not
satisfy the needs of most organizations. Even a midsize organization
needed more addresses. One solution was supernetting
• In supernetting, an organization can combine several class C blocks to
create a larger range of addresses i.e. several networks are combined to
create a super-network or a supernet.
Subnetting

• If an organization was granted a large block in class A or B,


it could divide the addresses into several contiguous
groups and assign each group to smaller networks (called
subnets) or, in rare cases, share part of the addresses with
neighbors.
• Subnetting increases the number of Is in the mask
• The Default mask can help us to find the netid and the
hostid
• For example, the mask for a class A address has eight 1s,
which means the first 8 bits of any address in class A define
the netid; the next 24 bits define the hostid
• This notation is also called slash notation or Classless
Interdomain Routing (CIDR) notation. The notation is used
in classless addressing
Supernetting
• An organization can apply for a set of class C blocks instead of
just one. For example, an organization that needs 1000
addresses can be granted four contiguous class C blocks.
• The organization can then use these addresses to create one
super network.
• Supernetting decreases the number of Is in the mask
• For example, if an organization is given four class C addresses,
the mask changes from /24 to /22
• classless addressing eliminated the need for supernetting.
OUTLINE
• Functionalities of Network Layer

• Internet Protocol

• IPv4 Addressing (Logical, Global, Unique,


Hierarchical)
• Address Space, Notations

• Classful Addressing

• Subnetting

• Classless Addressing

• Network Address Translation (NAT)


Functions of Network Layer
• Source to Destination Delivery of packets via multiple

networks. (Host To Host Communication)


• Internet Protocol (IP)
• Connectionless protocol

• Relaying packets across network boundaries.


(Internetworking).
• Host Addressing to identify device

IP Addressing Structure
• Dotted decimal structure of a binary IP address
19.4

Note

An IPv4 address is 32 bits long.

Uniquely and universally defines the


connection of a device (for example, a
computer or a router) to the Internet.
19.5

Note

Unique – Each address defines one &


only one connection to Internet

* 2 devices can never have same address at same time *

* Address may be assigned to a device for a time period and


then taken away and assigned to another device *
19.6

Note

The address space of IPv4 is


232 or 4,294,967,296.
19.7

Figure 19.1 Dotted-decimal notation and binary notation for an IPv4 address
IP Addressing Structure
IP Addressing Structure
IP Addressing Structure
• Convert decimal to 8-bit binary
Example 19.1 19.11

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 and add dots for separation.
Example 19.2 19.12

Change the following IPv4 addresses from dotted-decimal


notation to binary notation.

Solution
We replace each decimal number with its binary equivalent
Example 19.3 19.13

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

Solution
a. There must be no leading zero (045).
b. There can be no more than four numbers.
c. Each number needs to be less than or equal to 255.
d. A mixture of binary notation and dotted-decimal
notation is not allowed.
19.14

Note

In classful addressing, the address


space is divided into five classes:
A, B, C, D, and E.
18.15
Figure 18.17: Hierarchy in addressing
19.16

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


19.17

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


18

IP Address Classes (Cont.)

• The 5 IP classes are split up based on the


value in the 1st octet:
19

Network/Host Portions
• The 32 bits of the IP address are divided
into Network & Host portions, with the
octets assigned as a part of one or the
other.

Network & Host Representation


By IP Address Class
Class Octet1 Octet2 Octet3 Octet4

Class A Network Host Host Host

Class B Network Network Host Host

Class C Network Network Network Host


Example 19.4 19.20

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

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 byte is 14; the class is A.
d. The first byte is 252; the class is E.
19.21

Number of blocks and block size in classful IPv4 addressing


Classify and Define IPv4 Addresses
18.23
Figure 18.18: Occupation of the address space in classful addressing
19.24

Note

In classful addressing, a large part of the


available addresses were wasted.

Internet Corporation for Assigned Names & Address (ICA


19.25

Mask can help us to find the netid and


the hostid. (32 bit of contiguous 1 &
0’s)
Default masks for classful addressing

/n notation – Classless Addressing


(Classless Interdomain routing)
19.26

Note

Classful addressing, which is


almost obsolete, is replaced with
classless addressing.
27

Classless Addressing
• Overcome Address Depletion
• No concept of classes
• Address granted in blocks retained
(variable length prefix)
• Depending on Requirement
• Classful is special case of Classless addressing
19.28

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.
18.29
Figure 18.20: Slash notation (CIDR)
18.30
Figure 18.21: Information extraction in classless addressing

Set all
suffix bits
to 0s

Set all
suffix bits
to 1s
19.31

Note

The first address in the block can be


found by setting the rightmost
32 − n bits to 0s.
19.32

Note

The last address in the block can be


found by setting the rightmost
32 − n bits to 1s.
19.33

Note

The number of addresses in the block


can be found by using the formula
232−n.
Example 18.1

A classless address is given as 167.199.170.82/27. We can


find the above three pieces of information as follows. The
number of addresses in the network is 232− n = 25 = 32
addresses. The first address can be found by keeping the
first 27 bits and changing the rest of the bits to 0s.

The last address can be found by keeping the first 27 bits


and changing the rest of the bits to 1s.

18.34
Example 19.6 19.35

A block of 16 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 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, we get
11001101 00010000 00100101 00100000
or
205.16.37.32.
19.36

A block of 16 addresses granted to a small organization

Say one of the addresses is 205.16.37.39/28


Example 19.5 19.37

We can see that the restrictions are applied to this block.


The addresses are contiguous.

The number of addresses is a power of 2 (16 = 24), and the


first address is divisible by 16.
Example 19.7 19.38

Find the last address for the block

Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32 − 28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111
or
205.16.37.47
Example 19.8 19.39

Find the number of addresses

Solution
The value of n is 28, which means that number
of addresses is 2 32−28 or 16.
Example 19.9 19.40

Another way to find the first address, the last address, and
the number of addresses is to represent the mask as a 32-bit
binary (or 8-digit hexadecimal) number. This is
particularly useful when we are writing a program to find
these pieces of information. the /28 can be represented as
11111111 11111111 11111111 11110000
(twenty-eight 1s and four 0s).

Find
a. The first address
b. The last address
c. The number of addresses.
Example 19.9 (continued) 19.41

Solution
a. The first address can be found by ANDing the given
addresses with the mask. ANDing here is done bit by
bit. The result of ANDing 2 bits is 1 if both bits are 1s;
the result is 0 otherwise.
Example 19.9 (continued) 19.42

b. The last address can be found by ORing the given


addresses with the complement of the mask. ORing
here is done bit by bit. The result of ORing 2 bits is 0 if
both bits are 0s; the result is 1 otherwise. The
complement of a number is found by changing each 1
to 0 and each 0 to 1.
Example 19.9 (continued) 19.43

c. The number of addresses can be found by


complementing the mask, interpreting it as a decimal
number, and adding 1 to it.
19.44

Note

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.
19.45

Figure 19.4 A network configuration for the block 205.16.37.32/28


19.46
Example 18.2

Alternate way to find the same for 167.199.170.82/27 using


the mask. The mask in dotted-decimal notation is
256.256.256.224 The AND, OR, and NOT operations can be
applied to individual bytes

18.65
Example 19.6 19.66

A block of 16 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 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, we get
11001101 00010000 00100101 0010000
or
205.16.37.32.
19.67

A block of 16 addresses granted to a small organization

Say one of the addresses is 205.16.37.39/28


19.72

Levels of hierarchy in Telephone Numbering

Hierarchical addressing solves the problem of


devices communicating across networks of
networks
73

Class A Addresses (Cont.)


• There are 16,777,214 Host addresses available
in a Class A address.
• To compute the number of hosts available in
any of the class addresses, where “n”
represents the number of bits in the host
portion:
(2n – 2) = Number of available hosts
• Class A address uses 7 bits to designate
network,
(27 – 2) = 126 or there can be 126 Class A
Networks. (Number of Class A networks)
74

Class A Addresses (Cont.)


• There are 128 Class A Network Addresses,

• but because addresses with all zeros aren’t used &


address 127 is a special purpose address,

• 126 Class A Networks are available.


75

Class B IP Addresses (Cont.)


• So how many Class B Networks can there be?
• Using our formula, (214 – 2), there can be 16,382 Class
B Networks & each Network can have (216 – 2) Hosts,
or 65,534 Hosts.
76

Special Addresses
• A few addresses are set aside for specific purposes.
• Network addresses that are all binary zeros, all binary
ones & Network addresses beginning with 127 are
special Network addresses.
77

Special Addresses (Cont.)


Specific Rules
• Each Network is assigned a network address
& every device or interface (such as a router
port) on the network is assigned a host
address.
• There are only 2 specific rules that govern the
value of the address.
• A host address cannot be designated by all
zeros or all ones.
• These are special addresses that are reserved
for special purposes.
79

Subnetting
• Say Divide Large Block of Class A & B

• Several contiguous groups


• Assign Each group to smaller
networks
• Subnets
• Introduced in Classful addressing
• Increases the number of 1s in mask
• Ex : Class A network divided into 4
subnets. Prefix Length nsub = 10
80

Supernetting
• Time came when A & B depleted 
• Demand for mid-size blocks
• But not meet requirements
• Say 1000 address
• 4 Class C blocks to create one supernetwork

• Classless eliminated need to


supernetting
81

Classless Address Blocks Allocation


1. The addresses in block must be contiguous, one
after another.

2. The number of requested addresses (N) in a block


must be a power of 2.
1. N=232-n (or)
2. n = 32 – log2N

3. The first address must be evenly divisible by the


number of addresses.

You might also like