DrAbiramiAnandhan
1,095 views
119 slides
Oct 06, 2021
Slide 1 of 119
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
About This Presentation
IPV4 details
Size: 2.45 MB
Language: en
Added: Oct 06, 2021
Slides: 119 pages
Slide Content
IPV4 ADDRESSES
IPV4 ADDRESSES
•to identify the connection of each device to the Internet is called the
Internet address or IP address
•IPv4 address is a 32-bit address
•defines the connection of a host or a router to the Internet.
•The IP address is the address of the connection, not the host or the
router, because if the device is moved to another network, the IP
address may be changed.
•IPv4 addresses are unique in the sense that each address defines one,
and only one, connection to the Internet.
•If a device has two connections to the Internet, via two networks, it
has two IPv4 addresses.
•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.
IPV4 ADDRESSES
Address Space
•An address space is the total number of addresses used by the
protocol
•IPv4 uses 32-bit addresses, which means that the address space is 2
b
or 4,294,967,296 (more than four billion).
•If there were no restrictions, more than 4 billion devices could be
connected to the Internet.
Notation
There are three common notations to show an IPv4 address:
•binary notation (base 2),
•dotted-decimal notation (base 256), and
•hexadecimal notation (base 16).
•In binary notation, an IPv4 address is displayed as 32 bits.
A 32-bit IPv4 address is also hierarchical, but divided only into two
parts.
•The first part of the address, called the prefix, defines the network;
•the second part of the address, called the suffix, defines the node
(connection of a device to the Internet).
Hierarchy in Addressing
Hierarchy in Addressing
•A prefixcan be fixed length or variable length.
•The network identifier in the IPv4 was first designed as a fixed-length
prefix. This scheme, is referred to as classfuladdressing.
•The network identifier in the IPv4 uses a variable-length network
prefix. This scheme, which is referred to as classless addressing,
ClassfulAddressing
•IPv4 address was designed with a fixed-length prefix
•three fixed-length prefixes were designed instead of one (n = 8, n =
16, and n = 24)
•The whole address space was divided into five classes (class A, B, C, D,
and E)
•In class A, the network length is 8 bits, but since the first bit, which is 0,
defines the class, we can have only seven bits as the network identifier.
•This means there are only 2
7
= 128 networks in the world that can have a class
A address.
•class B, the network length is 16 bits, but since the first two bits, define the
class, we can have only 14 bits as the network identifier.
•This means there are only 2
14
= 16,384 networks in the world that can have a
class B address.
•first three bits 110 belong to class C.the network length is 24 bits, but since
three bits define the class, we can have only 21 bits as the network identifier.
This means there are 2
21
= 2,097,152
•1110 bits to Class Dis not divided into prefix and suffix. It is used for
multicast addresses.
•All addresses that start with 1111 in binary belong to class E. As in Class D,
Class E is not divided into prefix and suffix and is used as reserve.
•The 32 binary bits are broken into four octets (1 octet = 8 bits).
•Each octet is converted to decimal and separated by a period (dot).
For this reason,
•an IP address is said to be expressed in dotted decimal format (for
example, 172.16.81.100).
•The value in each octet ranges from 0 to 255 decimal, or 00000000 -
11111111 binary.
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1
(128+64+32+16+8+4+2+1=255)
Class A Address
IP starting from 1.x.x.x to 126.x.x.x only
Class B Address
128.0.x.x to 191.255.x.x.
Class C Address
192.0.0.x to 223.255.255.x.
Class D Address
224.0.0.0 to 239.255.255.255.
Class E Address
240.0.0.0 to 255.255.255.254.
Q1
•What is the size of the address space in each of the following
systems?
•a. A system in which each address is only 16 bits
•b. A system in which each address is made of six hexadecimal digits
•c. A system in which each address is made of four octal digits
Ans:
•2
16
•16
6
•8
4
Rewrite the following IP addresses
using binary notation:
•a. 110.11.5.88
•b. 12.74.16.18
•c. 201.24.44.32
Find the class of the following classfulIP addresses:
a.130.34.54.12
b.200.34.2.1
c.245.34.2.8
Find the class of the following classfulIP addresses:
a.130.34.54.12
•Class B
b.200.34.2.1
•Class C
c.245.34.2.8
•Class D
Address Depletion
•The addresses were not distributed properly
•the Internet was faced with the problem of the addresses being
rapidly used up, resulting in no more addresses available for
organizations and Individuals that needed to be connected to the
Internet.
•Class A can be assigned to only 128 organizations in
the world, but each organization needs to have a
single network with 16,777,216 nodes (computers in
this single network). Since there may be only a few
organizations that are this large, most of the
addresses in this class were wasted (unused).
•Class Baddresses were designed for midsize
organizations, but many of the addresses in this class
also remained unused.
•Class Caddresses have a completely different flaw in
design. The number of addresses that can be used in
each network (256)was so small that most companies
were not comfortable using a block in this address
class.
•Class Eaddresses were almost never used, wasting
the whole class.
Advantage of ClassfulAddressing
•easily find the class of the address and, since the prefix length for
each class is fixed,
•the prefix length in classfuladdressing is inherent in the address;
•no extra information is needed to extract the prefix and the suffix
•To improve address depletion, two strategies
were proposed
•Subnettingand
•Supernetting
Subnetting and Supernetting
•The process of dividing a network into subnetwork is called as subnetting,
•The process of combining small networks into a large network is called
supernetting.
•In subnetting, the numbers of bits of network addresses are increased
•In supernettingthe number of bits of host addresses is increased.
•Supernetting is designed to make the routing process more convenient.
•It reduces the size of routing table information; therefore, it consumes less
space in the router’s memory.
Subnetting
•single IP network : Problems with Large Networks
•Subnetting is the technique of partitioning a large network into
smaller networks
•Subnettingis a technique of partitioning an individual physical
network into several small-sized logical sub-networks. These
subnetworksare known as subnets.
•The Subnettingbasically convertthe host bits into the network bits
it can divide its network in four subnets.
same network
after Subnetting.
Without any Subnetting,
all computers will work
in a single large network.
Advantages-
•It improves the security.
•The maintenance and administration of subnets is easy.
Types of Subnetting
Fixed length subnetting also called asclassful
subnettingdivides the network into subnets where-
•All the subnets are of same size.
•All the subnets have equal number of hosts.
•All the subnets have same subnet mask.
Variable length subnetting also called asclassless
subnettingdivides the network into subnets where-
•All the subnets are not of same size.
•All the subnets do not have equal number of hosts.
•All the subnets do not have same subnet mask.
Step 1 : Identifying network portion and host portion in an IP address
-Subnetting can only be done in host portion.
-Subnet mask is used to distinguish the network portion from host
portion in an IP address.
Example-01:
•Consider-
•We have a big single network having IP Address 200.1.2.0.
•We want to do subnetting and divide this network into 2 subnets.
•For creating two subnets and to represent their subnet IDs, we require 1
bit.
•So, We borrow one bit from the Host ID part.
•After borrowing one bit, Host ID part remains with only 7 bits.
•If borrowed bit = 0, then it represents the first subnet.
•If borrowed bit = 1, then it represents the second subnet.
•IP Address of the two subnets are-
•200.1.2.00000000 = 200.1.2.0
•200.1.2.10000000 = 200.1.2.128
For 1st Subnet-
•IP Address of the subnet = 200.1.2.0
•Total number of IP Addresses = 2
7
= 128
•Total number of hosts that can be configured = 128 –2(Reserved bits/special
address) = 126
•Range of IP Addresses =
[200.1.2.00000000, 200.1.2.01111111] = [200.1.2.0, 200.1.2.127]
•Direct Broadcast Address = 200.1.2.01111111 = 200.1.2.127
•Limited Broadcast Address = 255.255.255.255
For 2nd Subnet-
•IP Address of the subnet = 200.1.2.128
•Total number of IP Addresses = 2
7
= 128
•Total number of hosts that can be configured = 128 –2 = 126
•Range of IP Addresses =
[200.1.2.10000000, 200.1.2.11111111] = [200.1.2.128, 200.1.2.255]
•Direct Broadcast Address = 200.1.2.11111111 = 200.1.2.255
•Limited Broadcast Address = 255.255.255.255
Example-02:
•Consider-
•We have a big single network having IP Address 200.1.2.0.
•We want to do subnetting and divide this network into 4 subnets.
Answer
•Clearly, the given network belongs to class C.
•For creating four subnets and to represent their subnet IDs, we
require 2 bits.
•So,
•We borrow two bits from the Host ID part.
•After borrowing two bits, Host ID part remains with only 6 bits.
Answer (cont..)
•If borrowed bits = 00, then it represents the 1st subnet.
•If borrowed bits = 01, then it represents the 2nd subnet.
•If borrowed bits = 10, then it represents the 3rd subnet.
•If borrowed bits = 11, then it represents the 4th subnet.
•IP Address of the four subnets are-
•200.1.2.00000000 = 200.1.2.0
•200.1.2.01000000 = 200.1.2.64
•200.1.2.10000000 = 200.1.2.128
•200.1.2.11000000 = 200.1.2.192
For 1st Subnet-
•IP Address of the subnet = 200.1.2.0
•Total number of IP Addresses = 2
6
= 64
•Total number of hosts that can be configured = 64 –2 = 62
•Range of IP Addresses = [200.1.2.00000000, 200.1.2.00111111] =
[200.1.2.0, 200.1.2.63]
•Direct Broadcast Address = 200.1.2.00111111 = 200.1.2.63
•Limited Broadcast Address = 255.255.255.255
For 2nd Subnet-
•IP Address of the subnet = 200.1.2.64
•Total number of IP Addresses = 26 = 64
•Total number of hosts that can be configured = 64 –2 = 62
•Range of IP Addresses = [200.1.2.01000000, 200.1.2.01111111] =
[200.1.2.64, 200.1.2.127]
•Direct Broadcast Address = 200.1.2.01111111 = 200.1.2.127
•Limited Broadcast Address = 255.255.255.255
For 3rd Subnet-
•IP Address of the subnet = 200.1.2.128
•Total number of IP Addresses = 26 = 64
•Total number of hosts that can be configured = 64 –2 = 62
•Range of IP Addresses = [200.1.2.10000000, 200.1.2.10111111] =
[200.1.2.128, 200.1.2.191]
•Direct Broadcast Address = 200.1.2.10111111 = 200.1.2.191
•Limited Broadcast Address = 255.255.255.255
For 4th Subnet-
•IP Address of the subnet = 200.1.2.192
•Total number of IP Addresses = 26 = 64
•Total number of hosts that can be configured = 64 –2 = 62
•Range of IP Addresses = [200.1.2.11000000, 200.1.2.11111111] =
[200.1.2.192, 200.1.2.255]
•Direct Broadcast Address = 200.1.2.11111111 = 200.1.2.255
•Limited Broadcast Address = 255.255.255.255
In decimal notation IP address : 192.168.10.10
Subnet mask : 255.255.255.0
In binary notation IP address : 11000000.10101000.00000001.00001010
Subnet mask : 11111111.11111111.11111111.00000000
On bits (1) represents network address bits(0) represents host address
Examples of IP address with subnet mask in decimal format
10.10.10.10
255.0.0.0
172.168.1.1
255.255.0.0
192.168.1.1
255.255.255.0
Examples of IP address with subnet mask in binary
format
00001010.00001010.00001010.00001010
11111111.00000000.00000000.00000000
10101100.10101000.00000001.00000001
11111111.11111111.00000000.00000000
11000000.10101000.00000001.00000001
11111111.11111111.11111111.00000000
Reserved network bits and host bits cannot be used in Subnetting.
IP
Class
First IP Address
of class
Last IP Address of
class
Default
Subnet Mask
Default
Network bits
Host bits Reserved host
bits
A 0.0.0.0 127.255.255.255255.0.0.0 First 8 bits9 to 30 31, 32
B 128.0.0.0 191.255.255.255255.255.0.0First 16 bits17 to 30 31, 32
C 192.0.0.0 223.255.255.255255.255.255.0First 24 bits25 to 30 31, 32
Subnetting
For example
•if a network in class A is divided into four subnets, each
subnet has a prefix of n
sub= 10.
•At the same time, if all of the addresses in a network are
not used,
•subnettingallows the addresses to be divided among
several organizations.
•to divide a large block into smaller ones
Subnetting
•The network is first reached using the netid, and then the specific
host is reached using the hostid.
•This addressing scheme approaches all networks as if they are just
one large network with several hosts
need of subnetting
•Hosts on the network could not be organized into groups.
•With this scheme, you could not create separate networks for
departments within an organization.
•All networks would be at the same level. If all hosts were connected
to the same physical network
•bandwidth would be quickly consumed during peak usage hours.
•All users would be sending and receiving over the same cable.
In this example, all our hosts are connected to the same
physical network.
dividing a large Class B network into three
smaller subnetworks.
•The router now knows that the original 142.15.3.0 network has been
subnettedinto two smaller subnetworks.
The router interprets IP address information in the following manner:
•The first two bits, or octets, 143.15, are used to define the netid
(143.15.0.0 or 143.15.4.0).
•The third octet is used to define the subnetid(143.15.4.0 or
143.15.5.0).
•The last octet is used to define the hostid—for example, 143.15.5.31.
•Netid—Defines the entire site within the organization
•Subnetid—Defines the physical subnetwork
•Hostid—Identifies each host connected to the subnetwork
when IP information is sent to the network from the Internet, three
steps are involved in routing the information:
•The IP packet is delivered to the site (143.15.0.0).
•The packet is forwarded to the correct subnetwork(143.15.4.0 or
143.15.5.0).
•The packet is delivered to the correct host.
Class B network with and without subnetting:
Class B network without subnetting
Netid Hostid
143.15 .3.20
Class B network with subnetting
Netid Subnetid Hostid
143.15 .3 .20
Subnet masking
•Subnet masking is a process used to extract the physical network
address from an IP address.
•masking may be done whether there is a subnet in place or not.
•If there is no subnet, masking extracts the network address.
•If there is a subnet, masking extracts the subnetworkaddress.
How subnet mask is created
•For example, let’s assume we want to determine the netmaskfor the
192.168.1.0 network.
•In binary format, 192.168.1.0 is written as:
11000000.10101000.00000001.00000000
11000000.10101000.00000001.00000000
•The three leftmost bits are 110, so we know that this is a Class C
address.
•This means that the first 24 bits are used for the netidand the last 8
bits are used for the hostid.
•To determine the netmask, set all the network bits to 1and all the
host bits to zero.
•In binary format, this is:
11111111.11111111.11111111.00000000
•Converted to decimal format, this gives us a netmaskof
255.255.255.0.
Example
•A network has 10.0.0.0 for the netid.
•In binary format, this address translates to:
00001010.00000000.00000000.00000000
Solution:
•When we set all the network bits to 1 and all the host
bits to 0, we get:
11111111.00000000.00000000.00000000
•Decimal part : 255.0.0.0
Type of subnetting: VLSM & FLSM
•VLSM (Variable Length Subnet Mask)is a technique
which partitions IP address space into subnets of
different sizes and prevent memory wastage.
•when the number of hosts is same in subnets, that is
known as FLSM (Fixed Length Subnet Mask).
•Supernetting was devised to make the routing process more
convenient.
•Additionally, it reduces the size of routing table information so that it
could consume less space in the router’s memory.
•to combine several class C blocks into a larger block to be attractive
to organizations that need more than the 256 addresses available in a
class C block
Supernetting
Network address and Broadcast address
•In each network there are two special addresses;
•network address and broadcast address.
•Network address represents the network itself while broadcast
address represents all the hosts which belong to it. These two
addresses can’t be assigned to any individual host in network. Since
each subnet represents an individual network, it also uses these
two addresses.
(N-2)
Subnetting
•network bits are converted into host bits.
•Subnetting process is performed to slow down the depletion of the IP
addresses.
•It allows the administrator to divide the single class A, class B and class C
into small segments.
•VLSM (Variable Length Subnet Mask) and
•FLSM (Fixed Length Subnet Mask).
•The process of partitioning the IP address space into a subnet of different
size is called a Variable Length Subnet Mask.
•VLSM reduces the wastage of memory.
•The process of partitioning the IP address space into a subnet of the same
size is called a Fixed Length Subnet Mask.
Classless Addressing
(Supernetting)
CIDR (Classless Inter-Domain Routing)
•It is a supernettingtechnique where the several subnets are
combined together for the network routing.
•It is scheme used to route the network traffic across the internet.
Supernetting
•supernettingis the method used for combining the
smaller ranges of addresses into larger space.
•several networks are merged into a single network
Classless
Addressing
Classless Addressing
•To reduce the wastage of IP addresses in a block, we use Classless Addressing
•the classless addressing assigns a block of addresses to the customer according
to its requirementwhich prevents the wastage of addresses.
•variable-length blocks are used that belong to no classes.
•This block contains the required number of IP Addresses as demanded by the
user.
•The classless IPv4 addressing does not divide the address space into classes like
classful addressing. It provides a variable-length of blocks, which have a range
of addresses according to the need of users.
•This block of IP Addresses is called as a Classless Inter Domain Routing (CIDR)
block.
•The 32 binary bits are broken into four octets (1 octet = 8 bits).
•Each octet is converted to decimal and separated by a period (dot).
•The value in each octet ranges from 0 to 255 decimal, or
00000000 to11111111 binary.
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1 (128+64+32+16+8+4+2+1=255)
Here is a sample octet conversion when not all of the bits are set to 1.
0 1 0 0 0 0 0 1
0 64 0 0 0 0 0 1 (0+64+0+0+0+0+0+1=65)
And this sample shows an IP address represented in both binary and
decimal.
Class Anetwork(net ID),node (Host ID),node,node
Class Bnetwork,network,node,node
Class Cnetwork,network,network,node
In a Class A address : network address of 0.0.0.0 –255.0.0.0
In a Class B address : network address of 0.0.0.0 –255.255.0.0
In a Class C address : network address of 0.0.0.0 –255.255.255.0
Variable-Length Blocks
•The whole address space (2^32 addresses) is divided into blocks of
different sizes
•In classless addressing, the whole address space is divided into
variable length blocks.
•Addresses have two parts:
•subnet or prefix, The prefix in an address defines the block (network);
•Host -defines the node (device).
•The prefix in an address defines the block (network);
•the suffix defines the node (device).
•Define a block of 2 addresses, is that the number of addresses in a
block needs to be a power of 2.
Classless Addressing
Network part (All 1s)Host part (All 0s)
Total no.ofhost connected in this network = 2
no.ofzeros
=2
16 -2
(Here 2isreserved IP and Network IP)
=2¹⁴ = 2×2×2×2×2×2×2×2×2×2×2×2×2×2 = 16384
Network mask (only calculate all 1s) = 255.255.0.0
Prefix Length: Slash Notation (/)
172.31.0.0/18
(16
th
next value : To take next value to set subnetwork start)
Last bit value add to previous : 32+32
64+32
96+32
128+32
168+32
192+32
224+32 ( 256 –not valid so stop the process )
Extracting Information from an Address
•Given any address in the block, to know three pieces of information
about the block to which the address belongs:
1.the number of addresses,
2.the first address in the block, and
3.the last address.
Since the value of prefix length, n, is given, we can
•easily find these three pieces of information,
Type 1Technique:
Extracting Information from an Address
•three pieces of information about the block to which the address belongs:
1.the number of addresses -The number of addresses in the block is found as
N = 2
32−n
2.the first address in the block -To find the first address, we keep the n
leftmost bits and set the (32 − n) rightmost bits all to 0s.
3.the last address -To find the last address, we keep the n leftmost bits and
set the (32 − n) rightmost bits all to 1s.
Example
•A classless address is given as 167.199.170.82/27. We can find the above
three pieces of information as follows.
1.The number of addresses in the network is 2
32 − n
= 2
32 − 27 =
2
5
= 32
addresses.
2.Convert 167.199.170.82 into binary values
10100111 11000111 10101010 01010010
To fine First address: 167.199.170.64/27
10100111 11000111 10101010 01000000
3. The last address can be found by keeping the first 27 bits and changing the
rest of the bits to 1s.
Address: 167.199.170.82/27 10100111 11000111 10101010 01011111
Last address: 167.199.170.95/27 10100111 11000111 10101010 01011111
Type 2 : Address Mask
•Another way to find the first and last addresses in the block is to use
the address mask.
•The address mask is a 32-bit number in which the n leftmost bits are
set to 1s and the rest of the bits (32 -n) are set to 0s.
•A computer can easily find the address mask because it is the
complement of (2
(32-n)
-1).
Address Mask
•Another way to find the first and last addresses in the block is to use the
address mask.
•find the address mask because it is the complement of (2
32 − n
− 1).
•1. The number of addresses in the block N = NOT (mask) + 1.
•2. The first address in the block = (Any address in the block) AND(mask).
•3. The last address in the block = (Any address in the block) OR [(NOT (mask)].
Network Address and Mask
Network address –It identifies a network on internet.
•Using this, we can find range of addresses in the network and total
possible number of hosts in the network.
Mask –It is a 32-bit binary number that gives the network address in
the address block
The default mask in different classes are :
•Class A –255.0.0.0
•Class B –255.255.0.0
•Class C –255.255.255.0
Address Mask
•The reason for defining a mask in this way is that it can be
used by a computer program to extract the information in
a block, using the three bit-wise operations NOT, AND,
and OR.
1. The number of addresses in the block N = NOT (mask) +
1.
2. The first address in the block = (Any address in the
block) AND (mask).
3. The last address in the block = (Any address in the
block) OR [(NOT (mask)].
Address Mask
•A classless address is given as 167.199.170.82/27.
•We can find the above three pieces of information
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
•Number of addresses in the block: N = NOT (mask) + 1
= 00000000 00000000 00000000 00011111
= 0.0.0.31 + 1 = 32 addresses
First address:167.199.170.64
First = (address) AND (mask)
10100111 11000111 10101010 01010010
11111111 11111111 11111111 11100000
--------------------------------------------------------
10100111 11000111 10101010 01000000
---------------------------------------------------------
Last address: 167.199.170.95
Last = (address) OR (NOT mask) = 167.199.170.255
10100111 11000111 10101010 01010010
00000000 00000000 00000000 00011111
--------------------------------------------------------
10100111 11000111 10101010 01011111
--------------------------------------------------------
Block Allocation
Block Allocation
Example : Block Allocation
•An organization is granted a block of addresses with the beginning
address 14.24.74.0/24. The organization needs to have 3 subblocksof
addresses to use in its three subnets: one subblockof 10 addresses,
one subblockof 60 addresses, and one subblockof 120 addresses.
Design the subblocks.
Solution
•There are 2
32 –24
= 256 addresses in this block.
•The first address is 14.24.74.0/24;
•the last address is 14.24.74.255/24.
•To satisfy the third requirement, we assign addresses to subblocks,
starting with the largest and ending with the smallest one.
•The number of addresses in the largest subblock, which requires 120
addresses, is not a power of 2. We allocate 128 addresses.
•The subnet mask for this subnet can be found as n1 = 32 -log
2128 =
25.
•The first address in this block is 14.24.74.0/25; the last address is
14.24.74.127/25
•The number of addresses in the second largest subblock,
which requires 60 addresses, is not a power of 2 either.
•We allocate 64 addresses. The subnet mask for this
subnet can be found as n2 = 32 -log
264 = 26.
•The first address in this block is 14.24.74.128/26;
•the last address is 14.24.74.191/26
•The number of addresses in the smallest subblock, which
requires 10 addresses, is not a power of 2 either. We
allocate 16 addresses. The subnet mask for this subnet
can be found as
•n3 = 32 -log
216 = 28.
•The first address in this block is 14.24.74.192/28;
•the last address is 14.24.74.207/28.
If we add all addresses in the previous subblocks, the result
is 208 addresses,
•Which means 48 addresses are left in reserve. The first
address in this range is 14.24.74.208.
•The last address is 14.24.74.255.
Special Addresses
•This-host Address : 0.0.0.0/32 is called the this-host address(It is
used whenever
•a host needs to send an IP datagram but it does not know its own
address to use as the source address.
Limited-broadcast Address
•The only address in the block 255.255.255.255/32 is called the
limited-broadcast address.
•It is used whenever a router or a host needs to send a datagram to all
devices in a network.
•The routers in the network, however, block the packet having this
address as the destination;
•the packet cannot travel outside the network.
Loopback Address
•The block 127.0.0.0/8 is called the loopback address.
•A packet with one of the addresses in this block as the
destination address never leaves the host; it will remain
in the host. Any address in the block is used to test a
piece of software in the machine.
For
•example, we can write a client and a server program in
which one of the addresses in the block is used as the
server address.
•We can test the programs using the same host to see if
they work before running them on different computers
Private Addresses
•Four blocks are assigned as private addresses:
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and
169.254.0.0/16.
Multicast Addresses
•The block 224.0.0.0/4 is reserved for multicast addresses.
Comparison
Basis for comparison Subnetting Supernetting
Basic
A process of dividing a network
into subnetworks.
A process of combining
small networks into a larger
network.
Procedure
The number of bits of network
addresses is increased.
The number of bits of host
addresses is increased.
Mask bits are moved
towards
Right of the default mask.Left of the default mask.
Implementation
VLSM (Variable-length subnet
masking).
CIDR (Classless
interdomainrouting).
Purpose
Used to reduce the address
depletion.
To simplify and fasten the
routing process
Consider the following subnet masks-
•255.0.0.0
•255.128.0.0
•255.192.0.0
•255.240.0.0
•255.255.0.0
•255.255.254.0
•255.255.255.0
•255.255.255.224
•225.255.255.240
For each subnet mask, find-
1.Number of hosts per subnet
2.Number of subnets if subnet mask belongs to class A
3.Number of subnets if subnet mask belongs to class B
4.Number of subnets if subnet mask belongs to class C
5.Number of subnets if total 10 bits are used for the
global network ID
Given subnet mask is255.0.0.0
Q1:
•Number of Net ID bits + Number of Subnet ID bits = 8
•Number of Host ID bits = 24
Q2:
•Since number of Host ID bits = 24,
•So Number of hosts per subnet = 2
24
–2
Q3:
•If the given subnet mask belongs to class A, then
number of Net ID bits = 8.
•Substituting in the above equation, we get-
•Number of Subnet ID bits = 8 –8 = 0
•Thus, there will be only one single network
Q4:
•First two octets of the subnet mask are not
completely filled with 1’s.
•So, given subnet mask can not belong to class B.
Q5:
•First three octets of the subnet mask are not
completely filled with 1’s.
•So, given subnet mask can not belong to class C.
Q6:
•First 10 bits of the subnet mask are not completely
filled with 1’s.
•So, given subnet mask can not use 10 bits for the
Network ID.
Example :
•Given IP address 132.6.17.85 and default class B mask, find the
beginning address (network address).
Solution :
•The default mask is 255.255.0.0,
•which means that the only the first 2 bytes are preserved and the
other 2 bytes are set to 0.
•Therefore, the network address is 132.6.0.0.
Subnet Mask
Convert into subnet mask
•11111111 11111111 11111111 00000000
Convert into subnet mask
•11111111 11111111 11111111 00000000
•255.255.255.0
Method 1 : Example
•A classless address is given as 167.199.170.82/27.
•We can find the above three pieces of information as
follows.
1. The number of addresses in the network is 2
32 -n
•= 2
5
= 32 addresses.
2. To find the first address
•The first address can be found by keeping the first 27 bits
and changing the rest of the bits to 0s.
•Address: 167.199.170.82/27
•10100111 11000111 10101010 01010010
•First address: 167.199.170.64/27
•10100111 11000111 10101010 01000000
3.The last address
•The last address can be found by keeping the first 27
bits and changing the rest of the bits to 1s.
•Address: 167.199.170.82/27
•10100111 11000111 10101010 01011111
•Last address: 167.199.170.95/27
•10100111 11000111 10101010 01011111