Chapter 4
Chapter 4
IP addressing
IP V4 and IPV6
• An IPv6 address is a 128-bit binary value, which can be
displayed as 32 hexadecimal digits. Colons isolate entries
in a sequence of 16-bit Hexadecimal fields.
• Hexadecimal Colon Notation of IPv6
FDEC:BA98:7654:3210:ADBF:BBFF:2922:FFFF
• An IPv4 address is a 32- bit binary value, which can be
displayed as four decimal digits.
• Dotted-Decimal Notation of IPv4
128.11.3.31
cont.
IPv4 ADDRESSES:
• 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
Address Space:
• A protocol such as IPv4 that defines addresses has an
address space. An address space is the total number of
addresses used by the protocol.
• 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
cont.
.
cont.
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.
• In classful addressing, a large part of the available
addresses were wasted
• 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.
• Classless Addressing To overcome address depletion and give
more organizations access to the Internet, classless addressing was
designed and implemented.
• In this scheme, there are no classes, but the addresses are still
granted in blocks.
• Address Blocks In classless addressing, when an entity, small or
large, needs to be connected to the Internet, it is granted a block
(range) of addresses.
• The size of the block (the number of addresses) varies based on
the nature and size of the entity.
• For example, a household may be given only two addresses; a
large organization may be given thousands of addresses. An ISP,
as the Internet service provider, may be given thousands or
hundreds of thousands based on the number of customers it may
• Restriction To simplify the handling of addresses, the
Internet authorities impose three restrictions on classless
address blocks:
• 1. The addresses in a block must be contiguous, one after
another.
• 2. The number of addresses in a block must be a power of 2
(1, 2, 4, 8, ... ).
• 3. The first address must be evenly divisible by the number
of addresses.
• Example : a block of 16 addresses granted to a small
organization.
• The addresses are contiguous. The number of addresses is a
power of 2 (16 = 2 )
4
Private IP address:
Class A Address
• The first bit of the first octet is always set to 0 (zero). Thus
the first octet ranges from 1 – 127, i.e.
• Class A addresses only include IP starting from 1.x.x.x to
126.x.x.x only. The IP range 127.x.x.x is reserved for
loopback IP addresses.
• The default subnet mask for Class A IP address is 255.0.0.0
which implies that Class A addressing can have 126
networks (27-2) and 16777214 hosts (224-2).
• Class A IP address format is thus:
0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH
Class B Address
• An IP address which belongs to class B has the first two
bits in the first octet set to 10, i.e.
• Class B IP Addresses range from 128.0.x.x to 191.255.x.x.
The default subnet mask for Class B is 255.255.x.x.
• Class B has 16384 (214) Network addresses and 65534 (216-
2) Host addresses.
• Class B IP address format is:
10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
• The first octet of Class C IP address has its first 3 bits set to
110, that is
Types of NAT
There are 3 ways to configure NAT
• Static NAT
• Dynamic NAT
• Port Address Translation (PAT)
Cont.
Error Reporting
• The error-reporting message defines that the router
encounters a problem when it processes an IP packet, then
it reports a message.
• Error messages are continually transmitted to the original
source because the only data possible in the datagram
around the route is the source and destination IP
addresses.
• The error reporting messages are generally classified into
the following types:
Cont.
IGMP
Unicast routing:
• Most of the traffic on the internet and intranets known as
unicast data or unicast traffic is sent with
specified destination. Routing unicast data over the
internet is called unicast routing.
• It is the simplest form of routing because the destination is
already known.
• Hence the router just has to
look up the routing table and forward the packet to next
hop.
Cont.
c
Cont.
Broadcast routing
• By default, the broadcast packets are not routed and
forwarded by the routers on any network. Routers create
broadcast domains. But it can be configured to forward
broadcasts in some special cases. A broadcast message is
destined to all network devices.
Broadcast routing can be done in two ways (algorithm):
• A router creates a data packet and then sends it to each
host one by one. In this case, the router creates multiple
copies of single data packet with different destination
addresses
• All packets are sent as unicast but because they are sent to
all, it simulates as if router is broadcasting.
Cont.
Multicast Routing
• Multicast routing is special case of broadcast routing with
significance difference and challenges.
• In broadcast routing, packets are sent to all nodes even if
they do not want it. But in Multicast routing, the data is
sent to only nodes which wants to receive the packets.
Routing algorithm
Centralized algorithm:
• It is also known as global routing algorithm as it computes
the least-cost path between source and destination by
using complete and global knowledge about the network.
• This algorithm takes the connectivity between the nodes
and link cost as input, and this information is obtained
before actually performing any calculation.
Isolation algorithm:
• It is an algorithm that obtains the routing information by
using local information rather than gathering information
from other nodes.
Cont.
Distributed algorithm:
• It is also known as decentralized algorithm as it computes
the least-cost path between source and destination in an
iterative and distributed manner.
• In the decentralized algorithm, no node has the
knowledge about the cost of all the network links.
Cont.
Adaptive routing algorithm is used by dynamic The Non-Adaptive Routing algorithm is used by
Usage
routing. static routing.
Thank you