0% found this document useful (0 votes)
191 views50 pages

Internet Protocol Version4 (Ipv4) & Subnetting Strategy

IPv4 is the currently used version of the Internet Protocol. It uses 32-bit addresses to uniquely identify devices connected to the Internet. IPv4 addresses are divided into network and host portions using subnet masks. Common strategies to conserve IPv4 addresses include using private addressing ranges and Classless Inter-Domain Routing (CIDR) blocks.

Uploaded by

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

Internet Protocol Version4 (Ipv4) & Subnetting Strategy

IPv4 is the currently used version of the Internet Protocol. It uses 32-bit addresses to uniquely identify devices connected to the Internet. IPv4 addresses are divided into network and host portions using subnet masks. Common strategies to conserve IPv4 addresses include using private addressing ranges and Classless Inter-Domain Routing (CIDR) blocks.

Uploaded by

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

.

Internet Protocol Version4 (IPv4)


& Subnetting Strategy
The Internet Protocol (IP)
• The Internet Protocol is the corner-stone of the TCP/IP
architecture. All computers in the Internet understand IP.
• The main tasks of IP are:
➢The addressing of the computers, and the fragmentation of
packets.

There are two types of Internet Protocol:

• Internet Protocol version 4 (IPv4): currently used version of Internet


Protocol.

• Internet Protocol version 6 (IPv6): the upcoming replacement for IPv4. It


contains some major improvements and new features.
2
IPv4 Address:
• 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.
• Connectionless protocol
• Fragments (divides) packets where necessary
• Addressing via 32 bit Internet addresses

• However, it contains no functions for end-to-end message


reliability or flow control. IP makes the ‘best effort’ to forward
packets to the next destination, but does not guarantee
delivery because it is connectionless.

3
Cont…

The IP address can be classify into two classes:

➢Public address:
This address considered as any valid address assigned to any
user, and the organization who is responsible for registering IP
ranges called Internet Service Providers (ISPs), and this address
will be unique.

➢Private Address:
Any number or address assigned to a device on a private TCP/IP
Local Area Network that is accessible only within the Local Area
Network.

4
Internet addresses

Each network interface connected to the Internet has a unique


address consisting of two parts:

➢Network address, address of the network within the Internet


(used by gateways for routing IP packets between networks).

➢Host address, address of the computer within the network


(used for delivering packets to a particular network interface
within the network).

5
Internet address format
• The 32-bit IP address is separated into four 8-bit octets,
allowing each octet to have a value ranging from 0 to 255.

• Furthermore, the IP address is logically separated into two


distinct components: the network ID and the host ID. The
network ID is used to identify the subnet upon which the host
resides. The host ID is used to identify the host itself within the
given subnet.

➢IP addresses can be displayed in three typical formats:


• Binary notation Binary notation is the format that systems on
the network use to process the address. An example of binary
notation is 11000000.10101000.00000001.01100100.
• Hexadecimal notation Hexadecimal notation is the format
typically used when identifying IPv6 addresses. An example of
hexadecimal notation of an IPv4 address is C0.A8.01.64
6
Cont…
• Dotted-decimal notation Dotted-decimal notation is the format that is
typically used for displaying the IP address in a human-readable format. An
example of dotted-decimal notation is 192.168.1.100

7
Figure 3: Structure of IP Address
Classes of IP addresses
• Different networks have different sizes. Basically, there are many small
networks and few large networks.

• To provide efficient use of 32-bit address space, IPv4 defined several


address classes and associated address formats:

➢Class A: allows 128 networks, 16 million hosts each.


The IP address start from 1.0.0.0 to 127.255.255.255, and the mask address is
255.0.0.0

➢Class B: allows 16,382 networks, 65,534 hosts each.


The IP address start from 128.0.0.0 to 191.255.255.255, and the mask address
is 255.255.0.0

8
Classes of IP addresses
➢Class C: allows 2 million networks, 254 hosts each.

The IP address start from 192.0.0.0 to 223.255.255.255, and the


mask address is 255.255.255.0

➢Class D: multicast networks The IP address start from


224.0.0.0 to 239.255.255.255.

➢Class E: reserved for future use. From 240 to 255 and the
255.255.255.255 used for broadcast to all the subnet.

9
Cont..
• One of the benefits of classful addresses is that they provide a hierarchy to
the network through the use of the network ID. This translates into an
efficient routing environment because it is easy for a router to determine
what networks can be grouped together and treated as a single routing entry.

10
IPv4 Address Structure
Network and Host Portions
• An IPv4 address is a 32-bit hierarchical address that is made up of a
network portion and a host portion.

• When determining the network portion versus the host portion, you must
look at the 32-bit stream.
• A subnet mask is used to determine the network and host portions.
IPv4 Address Structure
The Subnet Mask
• To identify the network and host portions of an IPv4 address, the subnet
mask is compared to the IPv4 address bit for bit, from left to right.

• The actual process used


to identify the network
and host portions is
called ANDing.
IPv4 Address Structure
The Prefix Length
• A prefix length is a less cumbersome method used to identify a subnet
mask address. Prefix
Subnet Mask 32-bit Address
Length
• The prefix length is the
255.0.0.0 11111111.00000000.00000000.00000000 /8
number of bits set to 1 in
255.255.0.0 11111111.11111111.00000000.00000000 /16
the subnet mask.
255.255.255.0 11111111.11111111.11111111.00000000 /24

255.255.255.128 11111111.11111111.11111111.10000000 /25


• It is written in “slash
255.255.255.192 11111111.11111111.11111111.11000000 /26
notation” therefore, count
the number of bits in the 255.255.255.224 11111111.11111111.11111111.11100000 /27

subnet mask and prepend 255.255.255.240 11111111.11111111.11111111.11110000 /28

it with a slash. 255.255.255.248 11111111.11111111.11111111.11111000 /29

255.255.255.252 11111111.11111111.11111111.11111100 /30


IPv4 Address Structure
Determining the Network: Logical AND
• A logical AND Boolean operation is used in determining the network address.
• Logical AND is the comparison of two bits where only a 1 AND 1 produces
a 1 and any other combination results in a 0.
• 1 AND 1 = 1, 0 AND 1 = 0, 1 AND 0 = 0, 0 AND 0 = 0
• 1 = True and 0 = False
• To identify the network
address, the host IPv4
address is logically ANDed,
bit by bit, with the subnet
mask to identify the
network address.
IPv4 Address Structure
Network, Host, and Broadcast Addresses
• Within each network are three types of IP
addresses:
• Network address
• Host addresses
• Broadcast address Network Portion
Host
Portion
Host Bits

Subnet mask
255 255 255 0
255.255.255.0
11111111 11111111 11111111 00000000
or /24
Network address 192 168 10 0
All 0s
192.168.10.0 or /24 11000000 10100000 00001010 00000000
First address 192 168 10 1 All 0s and a
192.168.10.1 or /24 11000000 10100000 00001010 00000001 1
Last address
192 168 10 254 All 1s and a
192.168.10.254
11000000 10100000 00001010 11111110 0
or /24
Broadcast address
192 168 10 255
192.168.10.255 All 1s
11000000 10100000 00001010 11111111
or /24
Strategies to Conserve Addresses
• Several strategies have been developed and implemented to help
the Internet community on how provides a good managing of IP
addresses. These strategies help reduce the load on Internet
routers and help administrators use globally unique IP addresses
more efficiently. There are two common strategies, which are:

• Private Addressing
• Classless Inter-Domain Routing (CIDR)

16
Types of IPv4 Addresses
Public and Private IPv4 Addresses
• As defined in in RFC 1918, public IPv4 addresses are globally routed between
internet service provider (ISP) routers.

• Private addresses are common blocks of Network Address


RFC 1918 Private Address Range
and Prefix
addresses used by most organizations
to assign IPv4 addresses to internal 10.0.0.0/8 10.0.0.0 - 10.255.255.255

hosts. 172.16.0.0/12 172.16.0.0 - 172.31.255.255

192.168.0.0/16 192.168.0.0 - 192.168.255.255


• Private IPv4 addresses are not unique
and can be used internally within any
network.
• However, private addresses are not globally routable.
Types of IPv4 Addresses
Routing to the Internet
• Network Address Translation (NAT) translates private IPv4 addresses to
public IPv4 addresses.

• NAT is typically
enabled on the edge
router connecting to
the internet.

• It translates the
internal private
address to a public
global IP address.
Cont…

19
Cont...
• There are two ways to convert the private address to public address:
1. Network Address Translation (NAT).
This technique has been used to convert the private address to public address,
the NAT allowing us to access the internet and get services. The basic idea, is
that technique used pool of public addresses and assign for each private
address one public address. Thus, this way is inefficient due to the fact that
there are cost and delay associated with this operation. The table and the figure
below show how the NAT make the mapping.

Private Address Public Address


192.68.5.1 200.1.1.2
192.68.5.2 200.1.1.3
192.68.5.3 200.1.1.3

20
Cont..
2. Port Address Translation (PAT).
It’s another technique used to convert the private address to public. During PAT,
each computer on LAN is translated to the same IP address (public), but with a
different port number assignment. This way is much better than the NAT because
we can use one public address to translate any private address, therefore we saved
the cost. The table below shows the process of the PAT

Private Address Port address Public Address Port Number


192.68.1.3 50133 200.0.1.2 1
192.68.1.5 63887 200.0.1.2 2

• The port address will be any random number in the allowed range, that the
device created it when wants to access the internet.
• The packet will contain the port number that assign to the device that wants to
access the internet and through this port number, the router when get the
response message will translate it and make map this message to it is private
address based on the port number.

21
Types of IPv4 Addresses
Special Use IPv4 Addresses
Loopback addresses
• 127.0.0.0 /8 (127.0.0.1 to 127.255.255.254)
• Commonly identified as only 127.0.0.1
• Used on a host to test if TCP/IP is operational.

Link-Local addresses
• 169.254.0.0 /16 (169.254.0.1 to 169.254.255.254)
• Commonly known as the Automatic Private IP Addressing (APIPA) addresses or
self-assigned addresses.
• Used by Windows DHCP clients to self-configure when no DHCP servers are
available.
Types of IPv4 Addresses
Legacy Classful Addressing
RFC 790 (1981) allocated IPv4
addresses in classes
• Class A (0.0.0.0/8 to 127.0.0.0/8)
• Class B (128.0.0.0 /16 – 191.255.0.0 /16)
• Class C (192.0.0.0 /24 – 223.255.255.0 /24)
• Class D (224.0.0.0 to 239.0.0.0)
• Class E (240.0.0.0 – 255.0.0.0)

• Classful addressing wasted many IPv4


addresses.

Classful address allocation was replaced with


classless addressing which ignores the rules of
classes (A, B, C).
Types of IPv4 Addresses
Assignment of IP Addresses
• The Internet Assigned Numbers Authority (IANA) manages and allocates blocks of
IPv4 and IPv6 addresses to five Regional Internet Registries (RIRs).

• RIRs are responsible for


allocating IP addresses to ISPs
who provide IPv4 address
blocks to smaller ISPs and
organizations.
Addressing without Subnets
• If we have a class B with a Flat Network, the number of host will be more
than 216=65536 hosts,
• So the problem is here, that managing this network with this number of host
is too tricky and the performance of this network will get down because of
the heavy load. In other word, any single broadcast can slowdown the
network.

• Therefore, the solution is the subnetting. Subnetting means divide or separate


the single network into multiple networks that can reduce the loading from
one network.
• The advantage of using subnetting is:-
1. Reduce the traffic and the increase the performance.
2. The smaller network can easier to manage.

25
Subnetting
• As the number of distinct local networks grows, managing them
become a serious headache. Every time a new network is
installed the system administrator must contact NIC to get a
new network number.

• The solution to the problem is to allow a network to be split into


several independent parts for internal use but still act like a
single network to the outside world. In the internet literature
these parts are called subnets.

26
Subnet masks:-
• A mask is a 32-bit binary number that is expressed in dotted decimal
notation. By default, a mask contains two fields, the network field and the
host field. These correspond to the network number and the locally
administered part of the network address. When an administrator subnets,
they are adjusting the way they view the IP address. Table 1: Default masks
for classful addressing

27
Cont…
➢Routers and hosts still assume class subnet masks by default:
• Class A /8 255.0.0.0
• Class B /16 255.255.0.0
• Class C /24 255.255.255.0

• The figure below gives an example to class C mask address:

The first three octets represent the network part and the last octet represent the
host part.

28
Cont...
• There three important things that should be taken into our account when we
thinking about subnetting:-

1. Network address – the first one

2. Broadcast address – the last one

3. Host addresses – everything in between

As well as, to find the number of hosts per subnet. We can use formal 2x -2,
where (x) is the number of unmasked bits (0’s) .

29
Cont...
• For example, in 11000000, the number of zeros gives us 26 – 2 =62 hosts. In
this example, there are 62 hosts per subnet and we make subtract because the
first IP address reserve for the network address and the last one for the
network broadcast.

• While when we want to find number of networks, we can use this formal 2y

Where Y represent the number of masked bits, (1’s). For example, in


11000000, the number of ones gives us 22 =4

30
Reserved and Restricted Addresses
• In any subnet, there are certain addresses that cannot be assigned
to an individual device because they have a special purpose. The
subnet address is the first address in a range that identifies the
subnet. The broadcast address is the last address in the range, and
all hosts on the subnet receive traffic if anything is sent to it.

• Assume that a subnet address is 172.31.9.0 with a mask of


255.255.255.0. The subnet address is 172.31.9.0, and the
broadcast address is 172.31.9.255.

31
Classless Inter-Domain Routing (CIDR)
• Classless Inter Domain Routing (CIDR) is a method for
assigning IP addresses without using the standard IP address
classes like Class A, Class B or Class C. In CIDR , an IP
address is represented as A.B.C.D /n, where "/n" is called the IP
prefix or network prefix. The IP prefix identifies the number of
significant bits used to identify a network.

• Example, 192.9.205.22 /18 means, the first 18 bits are used to


represent the network and the remaining 14 bits are used to
identify hosts.

32
➢ It’s basically the method that ISPs (Internet Service Providers) use to
allocate an amount of addresses to a company, a home—a customer.
They provide addresses in a certain block size

➢ When you receive a block of addresses from an ISP, what you get will
look something like this: 192.168.10.32/28. This is telling you what your
subnet mask is. The slash notation (/) means how many bits are turned on
(1s).

➢ The Class A default subnet mask, which is 255.0.0.0. This means that the
first byte of the subnet mask is all ones (1s), or 11111111. When referring
to a slash notation, you need to count all the 1s bits to figure out your mask.
The 255.0.0.0 is considered a /8 because it has 8 bits that are 1s—that is, 8
bits that are turned on

33
Subnetting Class C Addresses
✓In a Class C address, only 8 bits are available for defining the hosts
✓ that subnet bits start at the left and go to the right without skipping
bits. This means that the only Class C subnet masks can be the
following:

The Fast Way Method: Subnetting a Class C Address


start by using the second subnet mask available with a Class C address, which
borrows 2 bits for subnetting 192 = 11000000
The 1s represent the subnet bits, and the 0’s represent the host bits available in
each subnet. 192 provides 2 bits for subnetting and 6 bits for defining the hosts in
each subnet.
34
35
36
37
Example 4
An organization has purchased the Class C Address 216.21.5.0 and would like
to use it to address the following 5 networks. (A=80, B=45, C=25)

38
Cont…

39
Cont…
• Third: Use increment to find the network ranges.

No. Subnet address First valid address Last valid Address Broadcast address
1 216.21.5.0 216.21.5.1 216.21.5.30 216.21.5.31
2 216.21.5.32 216.21.5.33 216.21.5.62 216.21.5.63
3 216.21.5.64 216.21.5.65 216.21.5.94 216.21.5.95
4 216.21.5.96 216.21.5.97 216.21.5.126 216.21.5.127
5 216.21.5.128 216.21.5.129 216.21.5.158 216.21.5.159
6 216.21.5.160 216.21.5.161 216.21.5.190 216.21.5.191
7 216.21.5.192 216.21.5.193 216.21.5.222 216.21.5.223
8 216.21.5.224 216.21.5.225 216.21.5.254 216.21.5.255

40
Cont…

216.21.5.33--62
216.21.5.1--30 216.21.5.129--158

216.21.5.97--126

216.21.5.65--94

41
Example 5

42
VLSM
IPv4 Address Conservation
Given the topology, 7 subnets are required (i.e, four LANs and three WAN links) and the largest
number of host is in Building D with 28 hosts.

• A /27 mask would provide 8 subnets of 30 host IP addresses and therefore support this
topology.
VLSM
IPv4 Address Conservation (Cont.)
However, the point-to-point WAN links only require two addresses and
therefore waste 28 addresses each for a total of 84 unused addresses.

• Applying a traditional subnetting scheme to this scenario is not very efficient and is wasteful.

• VLSM was developed to avoid wasting addresses by enabling us to subnet a subnet.


VLSM
VLSM
• The left side displays the traditional subnetting scheme (i.e.,
the same subnet mask) while the right side illustrates how
VLSM can be used to subnet a subnet and divided the last
subnet into eight /30 subnets.

• When using VLSM, always begin by satisfying the host


requirements of the largest subnet and continue subnetting
until the host requirements of the smallest subnet are
satisfied.

• The resulting topology with VLSM applied.


VLSM
VLSM Topology Address Assignment
• Using VLSM subnets, the LAN and inter-router networks can be addressed without
unnecessary waste as shown in the logical topology diagram.
Example 6

47
Example 7

48
49
128:

50

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy