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

Chapter 3- Network Layer and Ip_addressing_and_subnetting

Chapter 3 discusses the Internet Protocol (IP) and its versions, IPv4 and IPv6, detailing their addressing methods, packet fragmentation, and the differences between public and private addresses. It also covers subnetting strategies to manage IP addresses efficiently, including the use of subnet masks and Classless Inter-Domain Routing (CIDR). The chapter emphasizes the importance of subnetting for network performance and the need for a larger address space due to the growing number of internet-connected devices.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Chapter 3- Network Layer and Ip_addressing_and_subnetting

Chapter 3 discusses the Internet Protocol (IP) and its versions, IPv4 and IPv6, detailing their addressing methods, packet fragmentation, and the differences between public and private addresses. It also covers subnetting strategies to manage IP addresses efficiently, including the use of subnet masks and Classless Inter-Domain Routing (CIDR). The chapter emphasizes the importance of subnetting for network performance and the need for a larger address space due to the growing number of internet-connected devices.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 61

.

chapter 3- Network Layer


& 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.
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.
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.
Internet Protocol Version 6 (IPv6)
SIPP (Simple Internet Protocol Plus)
• Maintains good features of IPv4, discards bad ones.

• Not compatible with IPv4

• Compatible with all other Internet protocols including


TCP, UDP, ICMP, DNS, etc.

• Main features:

– Long addresses (128 bits) ⇒ supports billions of hosts.


– Simplified, fixed size header ⇒ routers can process packets faster.
– Support for authentication and privacy
– Better support for type of service.
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).
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
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

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


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.
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)
Private Address
 It means If the internetwork is limited to one organization, the IP addresses
need only be unique within that organization. Only networks that interface
with public networks such as the Internet need public addresses. Using
public addresses on the outside and private addresses for inside networks is
very effective.
Private Addresses:-
three ranges of IP addresses as private:
 10.0.0.0 through 10.255.255.255
 172.16.0.0 through 172.31.255.255
 192.168.0.0 through 192.168.255.255
Cont…
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
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.
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.
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.
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
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.
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 2 x -2,
where (x) is the number of unmasked bits (0’s) .
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 2 y

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


11000000, the number of ones gives us =4
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.
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.
 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
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.
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.
Cont…
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
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
Example
5
Example 6
IPv6 Addressing

Monday, April 7, 2025 49


Why Do We Need a Larger
Address Space?
 Internet population
Approximately 973 million users in November 2005
Emerging population and geopolitical and address space
 Mobile users
PDA, pen-tablet, notepad, and so on
Approximately 20 million in 2004
 Mobile phones
Already 1 billion mobile phones delivered by the industry
 Transportation
1 billion automobiles forecast for 2008
Internet access in planes – Example: Lufthansa

Monday, April 7, 2025 50


Networking Today
Networks in Our Past and Daily Lives
The Internet will be transformed after IPv6 fully replaces its less
versatile parent years from now.
Nevertheless, IPv4 is in no danger of disappearing overnight.
Rather, it will coexist with and then gradually be replaced by
IPv6.
This change has already begun, particularly in Europe,
Japan, and Asia Pacific.
These areas are exhausting their allotted IPv4 addresses,
which makes IPv6 all the more attractive.
 In addition to its technical and business potential, IPv6 offers a
virtually unlimited supply of IP addresses.
The existing IPv4 provides some 2 billion useable addresses
with its 32‑bit address space.

Monday, April 7, 2025 52


 IPv6, because of its generous 128-bit address space, will
generate a virtually unlimited stock of addresses—enough to
allocate more than the entire IPv4 Internet address space to
everyone on the planet.
 Consequently, some countries, such as Japan, are
aggressively adopting IPv6.
 As of October 1, 2003, even in North America, where Internet
addresses are abundant, the U.S. Department of Defense
(DoD) mandated that all new equipment purchased be IPv6-
capable.
 In fact, the department intends to switch entirely to IPv6
equipment by 2008.
 As these examples illustrate, IPv6 enjoys strong momentum.

Monday, April 7, 2025 53


Larger Address Space

IPv4
 32 bits or 4 bytes long
=4,200,000,000 possible addressable nodes
~
IPv6
 128 bits or 16 bytes: four times the bits of IPv4
3.4 * 1038 possible addressable nodes
~
= 340,282,366,920,938,463,374,607,432,768,211,456
= 5 * 10 addresses per person
28
~
~
=

Monday, April 7, 2025 54


 IPv6 increases the number of address bits by a factor of 4, from 32
to 128.
 This factor enables a very large number of addressable nodes;
however, as in any addressing scheme, not all the addresses are
used or available.
 Current IPv4 protocol address use is extended by applying
techniques such as NAT and temporary address allocations.
 But the manipulation of data payload by intermediate devices
challenges (or complicates) the advantages of peer-to-peer
communication, end-to-end security, and quality of service (QoS).
 IPv6 gives every user multiple global addresses that can be used for
a wide variety of devices, including cell phones, personal digital
assistants (PDAs), and IP-enabled vehicles.

Monday, April 7, 2025 55


 Increasing the number of bits for the address
also increases the IPv6 header size.
 Because each IP header contains a source
and a destination address, the size of the
header fields that contains the addresses is
256 bits for IPv6 compared to 64 bits for
IPv4.

Monday, April 7, 2025 56


IPv6 Address Representation
 x:x:x:x:x:x:x:x, where x is a 16-bit hexadecimal field
 Leading zeros in a field are optional:
2031:0:130F:0:0:9C0:876A:130B
 Successive fields of 0 can be represented as ::, but only once per
address.
Examples:

2031:0000:130F:0000:0000:09C0:876A:130B

2031:0:130f::9c0:876a:130b

FF01:0:0:0:0:0:0:1 >>> FF01::1

0:0:0:0:0:0:0:1 >>> ::1

0:0:0:0:0:0:0:0 >>> ::

Monday, April 7, 2025 57


IPV4 Vs IPV6
IPv4

 An IPv4 address consists of four bytes (32


bits). These bytes are also known as octets.
 Ex: 234.5.67.190.086
 Each sub area can vary from 000 to 255
(2power8 = 256)
 --- . --- . --- . ---
 0.0.0.0 through 255.255.255.255
 total of 32 bits
 2 power32 4 billion addresses
IPv6
 IPv6 addresses are 16 bytes (128 bits) long
 2 power 128 unique addresses
 Typically written as:

hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh
 hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh

 each byte in turns is represented as a pair of


hexadecimal numbers, like in the following
example:
 E3D7:0000:0000:0000:51F4:9BC8:C0A8:642
0

You might also like