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

nw layer

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

nw layer

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 120

• UNIT III NETWORK LAYER

7
• Switching: Packet Switching - Internet protocol - IPV4 – IP Addressing
– Subnetting - IPV6, ARP, RARP, ICMP, DHCP
• The network layer in the TCP/IP
protocol suite is responsible for the
host-to-host delivery of messages.
• It provides services to the transport
layer and receives services from the
data-link layer.
• Figure shows the communication between Alice and
Bob at the network layer.
• At the source host, the network layer encapsulates data
received from the transport layer in a network layer
packet.
• At the destination host, the network layer decapsulates
data from the network layer and delivers it to the
transport layer.
• The routers do not do any encapsulation or
decapsulation unless in some special cases when the
packet needs to be fragmented.
• Communication at the network layer
• SERVICES
• Packetizing
• The first duty of the network layer is definitely
packetizing: encapsulating the payload (data received from
the upper layer) in a network-layer packet at the source and
decapsulating the payload from the network-layer packet at
the destination.
• In other words, one duty of the network layer is to carry a
payload from the source to the destination without
changing it or using it.
• The network layer is doing the service of a carrier such as
the postal office, which is responsible for delivery of
packages from a sender to a receiver without changing or
using the contents.
• The source host receives the payload from an upper-layer
protocol, adds a header that contains the source and
destination addresses and some other information that is
required by the network-layer protocol (as discussed later),
and delivers the packet to the data-link layer.
• The destination host receives the network-layer packet from
its datalink layer, decapsulates the packet, and delivers the
payload to the corresponding upper-layer protocol.
• If the packet is fragmented at the source or at routers along
the path, the network layer is responsible for waiting until all
fragments arrive, reassembling them, and delivering them to
the upper layer protocol.
• Routing
• The network layer is responsible for routing a network-
layer packet from its source to the destination.
• A physical network is a combination of networks (LANs
and WANs) and routers that connect them.
• This means that there is more than one route from the
source to the destination.
• The network layer is responsible for finding the best one
among these possible routes.
• The network layer needs to have some specific strategies
for defining the best route.
Error Control
• Although error control also can be implemented in the network
layer, the designers of the network layer in the Internet ignored
this issue for the data being carried by the network layer.
• One reason for this decision is the fact that the packet in the
network layer may be fragmented at each router, which makes
error checking at this layer inefficient.
• The designers of the network layer, however, have added a
checksum field to the datagram to control any corruption in the
header, but not the whole datagram.
• This checksum may prevent any changes or corruptions in the
header of the datagram between two hops and from end to end.
Flow Control
• Flow control regulates the amount of data a source can
send without overwhelming the receiver.
• If the upper layer at the source computer produces data
faster than the upper layer at the destination computer
can consume it, the receiver will be overwhelmed with
data.
• To control the flow of data, the receiver needs to send
some feedback to the sender to inform the latter that it
is overwhelmed with data.
Congestion Control
• Another issue in a network-layer protocol is congestion control.
• Congestion in the network layer is a situation in which too many
datagrams are present in an area of the Internet.
• Congestion may occur if the number of datagrams sent by source
computers is beyond the capacity of the network or routers.
• In this situation, some routers may drop some of the datagrams.
• However, as more datagrams are dropped, the situation may become worse
because, due to the error-control mechanism at the upper layers, the sender
may send duplicates of the lost packets.
• If the congestion continues, sometimes a situation may reach a point where
the system collapses and no datagrams are delivered.
Quality of Service
• As the Internet has allowed new applications such as multimedia
communication (in particular real-time communication of audio and
video), the quality of service (QoS) of the communication has become
more and more important.
• The Internet has thrived by providing better quality of service to
support these applications.
• However, to keep the network layer untouched, these provisions are
mostly implemented in the upper layer.
Security
• Another issue related to communication at the network layer
is security.
• Security was not a concern when the Internet was originally
designed because it was used by a small number of users at
universities for research activities; other people had no access
to the Internet.
• The network layer was designed with no security provision.
• Today, however, security is a big concern.
• To provide security for a connectionless network layer, we
need to have another virtual level that changes the
connectionless service to a connection-oriented service.
PACKET SWITCHING
• A router, in fact, is a switch that creates a connection between an
input port and an output port (or a set of output ports), just as an
electrical switch connects the input to the output to let electricity
flow.
• Although in data communications switching techniques are divided
into two broad categories, circuit switching and packet switching,
only packet switching is used at the network layer because the unit
of data at this layer is a packet.
• At the network layer, a message from the upper layer is divided into
manageable packets and each packet is sent through the network.
• The source of the message sends the packets one by one; the
destination of the message receives the packets one by one.
• The destination waits for all packets belonging to the same
message to arrive before delivering the message to the upper
layer.
• The connecting devices in a packet-switched network still
need to decide how to route the packets to the final
destination.
• Today, a packet switched network can use two different
approaches to route the packets: the datagram approach and
the virtual-circuit approach.
Datagram Approach: Connectionless Service
• When the Internet started, to make it simple, the network
layer was designed to provide a connectionless service in
which the network-layer protocol treats each packet
independently, with each packet having no relationship to
any other packet.
• The idea was that the network layer is only responsible for
delivery of packets from the source to the destination.
• In this approach, the packets in a message may or may not
travel the same path to their destination.
• When the network layer provides a connectionless
service, each packet traveling in the Internet is an
independent entity; there is no relationship between
packets belonging to the same message.
• The switches in this type of network are called routers.
• A packet belonging to a message may be followed by a
packet belonging to the same message or to a different
message.
• A packet may be followed by a packet coming from the
same source or from a different source.
• Each packet is routed based on the information
contained in its header: source and destination
addresses.
• The destination address defines where it should go; the
source address defines where it comes from.
• The router in this case routes the packet based only on
the destination address.
• The source address may be used to send an error
message to the source if the packet is discarded.
Virtual-Circuit Approach: Connection- Oriented Service
• In a connection-oriented service (also called a virtual-circuit
approach), there is a relationship between all packets belonging to
a message.
• Before all datagrams in a message can be sent, a virtual connection
should be set up to define the path for the datagrams.
• After connection setup, the datagrams can all follow the same path.
• In this type of service, not only must the packet contain the source
and destination addresses, it must also contain a flow label, a
virtual-circuit identifier that defines the virtual path the packet
should follow.
• Although it looks as though the use of the label may make
the source and destination addresses unnecessary during the
data transfer phase, parts of the Internet at the network layer
still keep these addresses.
• One reason is that part of the packet path may still be using
the connectionless service.
• Another reason is that the protocol at the network layer is
designed with these addresses, and it may take a while before
they can be changed.
PERFORMANCE
• The upper-layer protocols that use the service of the
network layer expect to receive an ideal service, but
the network layer is not perfect.
• The performance of a network can be measured in
terms of delay, throughput, and packet loss.
• Congestion control is an issue that can improve the
performance.
Delay
• All of us expect an instantaneous response from a
network, but a packet, from its source to its
destination, encounters delays.
• The delays in a network can be divided into four
types: transmission delay, propagation delay,
processing delay, and queuing delay.
• Let us first discuss each of these delay types and
then show how to calculate a packet delay from the
source to the destination.
Transmission Delay
• A source host or a router cannot send a packet instantaneously.
• A sender needs to put the bits in a packet on the line one by one.
• If the first bit of the packet is put on the line at time t1 and the last
bit is put on the line at time t2, transmission delay of the packet is
(t2 − t1).
• Definitely, the transmission delay is longer for a longer packet and
shorter if the sender can transmit faster.
• The transmission delay is

Delaytr = (packet length) / (transmission rate)


Propagation Delay
• Propagation delay is the time it takes for a bit to travel from point
A to point B in the transmission media.
• The propagation delay for a packet-switched network depends on
the propagation delay of each network (LAN or WAN).
• The propagation delay depends on the propagation speed of the
media, which is 3 × 108 m/s in a vacuum and normally much less
in a wired medium; it also depends on the distance of the link.
• Propagation delay is

Delaypg = (distance) / (propagation speed)


Processing Delay
• The processing delay is the time required for a router or a
destination host to receive a packet from its input port,
remove the header, perform an error detection procedure, and
deliver the packet to the output port (in the case of a router)
or deliver the packet to the upper-layer protocol (in the case
of the destination host).
• The processing delay may be different for each packet, but
normally is calculated as an average.
Delaypr = time required to process a packet in a router
or a destination host
Queuing Delay
• Queuing delay can normally happen in a router.
• A router has an input queue connected to each of its input ports to store
packets waiting to be processed; the router also has an output queue connected
to each of its output ports to store packets waiting to be transmitted.
• The queuing delay for a packet in a router is measured as the time a packet
waits in the input queue and output queue of a router.
• We can compare the situation with a busy airport.
• Some planes may need to wait to get the landing band (input delay); some
planes may need to wait to get the departure band (output delay).

Delayqu = time a packet waits in input and output queues in a router


Total Delay
• Assuming equal delays for the sender, routers, and receiver, the total
delay (source-to-destination delay) a packet encounters can be
calculated if we know the number of routers, n, in the whole path.
Total delay = (n + 1) (delaytr + delaypg + delaypr) + (n) (delayqu)
• If we have n routers, we have (n + 1) links.
• Therefore, we have (n + 1) transmission delays related to n routers and
the source, (n + 1) propagation delays related to (n + 1) links, (n + 1)
processing delays related to n routers and the destination, and only n
queuing delays related to n routers.
Throughput
• Throughput at any point in a network is defined as the
number of bits passing through the point in a second, which
is actually the transmission rate of data at that point.
• In a path from source to destination, a packet may pass
through several links (networks), each with a different
transmission rate.
• How, then, can we determine the throughput of the whole
path?
• To see the situation, assume that we have three links, each
with a different transmission rate, as shown in Figure.
• Throughput in a path with three links in a series
• The data can flow at the rate of 200 kbps in link 1.
• However, when the data arrives at router R1, it cannot pass at this rate.
• Data need to be queued at the router and sent at 100 kbps.
• When data arrive at router R2, they could be sent at the rate of 150 kbps,
but there is not enough data to be sent.
• In other words, the average rate of the data flow in link 3 is also 100 kbps.
• We can conclude that the average data rate for this path is 100 kbps, the
minimum of the three different data rates.
• Figure also shows that we can simulate the behavior of each link with
pipes of different sizes; the average throughput is determined by the
bottleneck, the pipe with the smallest diameter. In general, in a path with n
links in series,
• we have
Throughput = minimum {TR1, TR2, …, TRn}
• Although the situation in Figure shows how to calculate the throughput
when the data are passed through several links, the actual situation in the
Internet is that the data normally pass through two access networks and the
Internet backbone, as shown in Figure 7.3.

• Figure 7.3 A path through the Internet backbone


Packet Loss
• Another issue that severely affects the performance of communication is
the number of packets lost during transmission.
• When a router receives a packet while processing another packet, the
received packet needs to be stored in the input buffer waiting for its turn.
• A router, however, has an input buffer with a limited size.
• A time may come when the buffer is full and the next packet needs to be
dropped.
• The effect of packet loss on the Internet network layer is that the packet
needs to be re-sent, which in turn may create overflow and cause more
packet loss.
• A lot of theoretical studies have been done in queuing theory to prevent the
overflow of queues and prevent packet loss.
INTERNET PROTOCOL VERSION 4
• The network layer in the Internet has gone through several versions,
but only two versions have survived: IP Version 4 (IPv4) and IP
Version 6 (IPv6).
• Although IPv4 is almost depleted, we discuss it because there are still
some areas that use this version and also because it is the foundation
for IPv6.
IPv4 Addressing
• The identifier used in the IP layer of the TCP/IP protocol suite to identify the
connection of each device to the Internet is called the Internet address or IP
address.
• An IPv4 address is a 32-bit address that uniquely and universally 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.
Address Space
• A protocol like 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 b bits to define an address, the address
space is 2b because each bit can have two different values (0
or 1).
• IPv4 uses 32-bit addresses, which means that the address
space is 232 or 4,294,967,296 (more than 4 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.
• To make the address more readable, one or more spaces are usually
inserted between each octet (8 bits). Each octet is often referred to as
a byte.
• To make the IPv4 address more compact and easier to read, it is
usually written in decimal form with a decimal point (dot) separating
the bytes.
• This format is referred to as dotted-decimal notation.
• Note that because each byte (octet) is only 8 bits, each
number in the dotted-decimal notation is between 0
and 255.
• We sometimes see an IPv4 address in hexadecimal
notation.
• Each hexadecimal digit is equivalent to 4 bits.
• This means that a 32-bit address has eight hexadecimal
digits.
• This notation is often used in network programming.
• Figure 7.4 shows an IP address in the three discussed
notations.
• Three different notations in IPv4 addressing
Hierarchy in Addressing
• In any communication network that involves delivery, such as a
telephone network or a postal network, the addressing system is
hierarchical.
• In a postal network, the postal address (mailing address) includes the
country, state, city, street, house number, and the name of the mail
recipient.
• Similarly, a telephone number is divided into the country code, area
code, local exchange, and the connection.
• A 32-bit IPv4 address is also hierarchical but is 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).
• Figure 7.5 shows the prefix and suffix of a 32-bit IPv4 address.
• The prefix length is n bits, and the suffix length is (32 − n) bits.
• A prefix can be fixed length or variable length.
• The network identifier in the IPv4 was first designed as a fixed-
length prefix.
• This scheme, which is now obsolete, is referred to as classful
addressing.
• The new scheme, which is referred to as classless addressing,
uses a variable-length network prefix.
• First, we briefly discuss classful addressing; then we
concentrate on classless addressing.
• Hierarchy in addressing
Classful Addressing
• When the Internet started, an IPv4 address was designed with a
fixed-length prefix, but to accommodate both small and large
networks, 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 (classes
A, B, C, D, and E), as shown in Figure 7.6.
• This scheme is referred to as classful addressing.
• Although classful addressing belongs to the past, it helps us to
understand classless addressing.
• Occupation of the address space in classful addressing
• In class A, the network length is 8 bits, but because the first bit,
which is 0, defines the class, we can have only 7 bits as the
network identifier.
• This means there are only 27 = 128 networks in the world that
can have a class A address.
• In class B, the network length is 16 bits, but because the first 2
bits, which are (10)2, define the class, we can have only 14 bits
as the network identifier.
• This means there are only 214 = 16,384 networks in the world
that can have a class B address.
• All addresses that start with (110)2 belong to class C.
• In class C, the network length is 24 bits, but because 3 bits define
the class, we can have only 21 bits as the network identifier.
• This means there are 221 = 2,097,152 networks in the world that
can have a class C address.
• Class D is 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.
Address Depletion
• The reason that classful addressing has become obsolete is address
depletion.
• Because 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 being available for organizations
and individuals that needed to have an Internet connection.
• To understand the problem, let us think about class A.
• This class can be assigned to only 128 organizations in the world,
but each organization would need to have one single network
(seen by the rest of the world) with 16,777,216 nodes (computers
in this single network).
• Because there were only a few organizations that are this large,
most of the addresses in this class were wasted (unused).
• Class B addresses were designed for midsize organizations, but
many of the addresses in this class also remained unused.
• Class C addresses have a completely different design flaw.
• 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 E addresses were almost never used, wasting the whole
class.
Classless Addressing
• With the growth of the Internet, it was clear that a larger address space
was needed as a long-term solution.
• The larger address space, however, requires that the length of IP
addresses also be increased, which means the format of the IP packets
needs to be changed.
• Although the long-range solution has already been devised and is called
IPv6 (discussed in Section 7.5), a shortterm solution was also devised to
use the same address space but to change the distribution of addresses to
provide a fair share to each organization.
• The short-term solution still uses IPv4 addresses, but it is called
classless addressing.
• In other words, the class privilege was removed from the distribution to
compensate for the address depletion.
• There was another motivation for classless addressing.
• During the 1990s, Internet Service Providers (ISPs) came into
prominence.
• An ISP is an organization that provides Internet access and services
for individuals, small businesses, and midsize organizations that do
not want to create an Internet site and become involved in providing
Internet services (such as electronic mail) for their employees.
• An ISP is granted a large range of addresses and then subdivides the
addresses (in groups of 1, 2, 4, 8, 16, and so on), giving a range of
addresses to a household or a small business.
• The customers are connected via a dial-up modem, DSL, or cable
modem to the ISP.
• However, each customer needs some IPv4 addresses.
• In 1996, the Internet authorities announced a new architecture called classless
addressing.
• In classless addressing, variable-length blocks are used that belong to no classes.
• We can have a block of 1 address, 2 addresses, 4 addresses, 128 addresses, and
so on.
• In classless addressing, the whole address space is divided into variable-length
blocks.
• The prefix in an address defines the block (network); the suffix defines the node
(device).
• Theoretically, we can have a block of 20, 21, 22, …, 232 addresses.
• One of the restrictions is that the number of addresses in a block needs to be a
power of 2.
• An organization can be granted one block of addresses.
• Figure shows the division of the whole address space into nonoverlapping
blocks.
Prefix Length: Slash Notation
• The first question that we need to answer in classless addressing is
how to find the prefix length if an address is given.
• Because the prefix length is not inherent in the address, we need to
separately give the length of the prefix.
• In this case, the prefix length, n, is added to the address, separated
by a slash.
• The notation is informally referred to as slash notation and
formally as classless interdomain routing (CIDR, pronounced
cider) strategy.
• An address in classless addressing can then be represented as
shown in Figure
Extracting Information from an Address
• Given any address in the block, we normally like to
know three pieces of information about the block to
which the address belongs: the number of addresses,
the first address in the block, and the last address.
• Because the value of prefix length, n, is given, we can
easily find these three pieces of information.
• 1. To find the first address, we keep the n leftmost
bits and set the (32 − n) rightmost bits all to 0s.
• 2. 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
desired 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.
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).
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
bitwise 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)].
Network Address
• The preceding examples show that, given any address, we can find all
information about the block.
• The first address, the network address, is particularly important
because it is used in routing a packet to its destination network.
• For the moment, let us assume that an internet is made up of m
networks and a router with m interfaces.
• When a packet arrives at the router from any source host, the router
needs to know to which network the packet should be sent and from
which interface the packet should be sent out.
• When the packet arrives at the network, it reaches its destination host
using linklayer addressing,.
Block Allocation
• The next issue in classless addressing is block allocation.
• How are the blocks allocated?
• The ultimate responsibility of block allocation is given to a global
authority called the Internet Corporation for Assigned Names and
Numbers (ICANN).
• However, ICANN does not normally allocate addresses to individual
Internet users.
• It assigns a large block of addresses to an ISP (or a larger organization
that is considered an ISP in this case).
• For the proper operation of the CIDR, two restrictions need to be applied
to the allocated block.
• 1. The number of requested addresses, N, needs to be a power of 2. The
reason is that N = 232−n or n = 32 − log2 N. If N is not a power of 2, we
cannot have an integer value for n.
• 2. The requested block needs to be allocated where there are a contiguous
number of available addresses in the address space. However, there is a
restriction on choosing the first address in the block. The first address
needs to be divisible by the number of addresses in the block. The reason
is that the first address needs to be the prefix followed by (32 − n) number
of 0s. The decimal value of the first address is then
First address = (prefix in decimal) × 232−n = (prefix in decimal) × N
• IP Address to Decimal
The IP address is “base 256”, to convert 192.168.1.2 to decimal
(base 10)
The formula is: 192 x (256)^3 + 168 x (256)^2 + 1 x (256)^1 + 2
(256)^0 = ? ...
Subnetting
• More levels of hierarchy can be created using subnetting.
• An organization (or an ISP) that is granted a range of
addresses may divide the range into several subranges and
assign each subrange to a subnetwork (or subnet).
• Note that nothing stops the organization from creating more
levels.
• A subnetwork can be divided into several sub-subnetworks.
• A sub-subnetwork can be divided into several sub-sub-
subnetworks, and so on.
• Designing Subnets The subnetworks in a network should be carefully
designed to enable the routing of packets.
• We assume the total number of addresses granted to the organization is N, the
prefix length is n, the assigned number of addresses to each subnetwork is
Nsub, and the prefix length for each subnetwork is nsub.
• Then the following steps need to be carefully followed to guarantee the
proper operation of the subnetworks.
Finding Information about Each Subnetwork
After designing the subnetworks, the information about each
subnetwork, such as first and last address, can be found using the
process we described to find the information about each network in the
Internet.
Example 7.6
• Figure 7.11 shows how four small blocks of addresses are
assigned to four organizations by an ISP.
• The ISP combines these four blocks into one single block and
advertises the larger block to the rest of the world.
• Any packet destined for this larger block should be sent to this
ISP.
• It is the responsibility of the ISP to forward the packet to the
appropriate organization.
• This is similar to the routing we find in a postal network.
• All packages coming from outside a country are sent first to the
capital and then distributed to the corresponding destination.
NEXT GENERATION IP (IPV6)
• The address depletion of IPv4 and other shortcomings of this protocol
prompted a new version of IP protocol in the early 1990s.
• The new version, which is called Internet Protocol version 6 (IPv6) or IP
new generation (IPng), was a proposal to augment the address space of
IPv4 and at the same time redesign the format of the IP packet and revise
some auxiliary protocols such as ICMP.
• It is interesting to know that IPv5 was a proposal, based on the OSI model,
that never materialized.
• The main changes needed in the new protocol were as follows: larger
address space, better header format, new options, allowance for extension,
support for resource allocation, and support for more security.
• The implementation of theses changes made it necessary to create a new
version of the ICMP protocol, ICMPv6.
IPv6 Addressing
• The main reason for migration from IPv4 to IPv6 is the small size of
the address space in IPv4.
• In this section, we show how the huge address space of IPv6 prevents
address depletion in the future.
• We also discuss how the new addressing responds to some problems in
the IPv4 addressing mechanism.
• An IPv6 address is 128 bits or 16 bytes (octets) long, 4 times the
address length in IPv4.
Abbreviation
• Although an IPv6 address, even in hexadecimal format, is very long,
many of the digits are zeros.
• In this case, we can abbreviate the address.
• The leading zeros of a section can be omitted.
• Using this form of abbreviation, 0074 can be written as 74, 000F as F,
and 0000 as 0.
• Note that 3210 cannot be abbreviated.
• Further abbreviation, often called zero compression, can be applied to
colon hex notation if there are consecutive sections consisting of zeros
only.
• We can remove all the zeros altogether and replace them with a double
semicolon.
• FDEC:0:0:0:0:BBFF:0:FFFF → FDEC::BBFF:0:FFFF

• Note that this type of abbreviation is allowed only once per address.
• If there is more than one run of zero sections, only one of them can be
compressed.
Mixed Notation
• Sometimes we see a mixed representation of an IPv6 address: colon hex
and dotted-decimal notation.
• This is appropriate during the transition period in which an IPv4 address
is embedded in an IPv6 address (as the rightmost 32 bits).
• We can use the colon hex notation for the leftmost six sections and 4-
byte dotted-decimal notation instead of the rightmost two sections.
• However, this happens when all or most of the leftmost sections of the
IPv6 address are zeros.
• For example, the address (::130.24.24.18) is a legitimate address in IPv6,
in which the zero compression shows that all 96 leftmost bits of the
address are zeros.
Three Address Types
• In IPv6, a destination address can belong to one of three categories: unicast,
anycast, and multicast.
• Unicast Address
• A unicast address defines a single interface (computer or router).
• The packet sent to a unicast address will be routed to the intended recipient.
• Anycast Address
• An anycast address defines a group of computers that all share a single address.
• A packet with an any cast address is delivered to only one member of the group, the
most reachable one.
• An any cast communication is used, for example, when there are several servers that
can respond to an inquiry.
• The request is sent to the one that is most reachable.
• The hardware and software generate only one copy of the request; the copy reaches
only one of the servers.
• IPv6 does not designate a block for any casting; the addresses are assigned from the
unicast block.
• Multicast Address
• A multicast address also defines a group of computers.
• However, there is a difference between any casting and
multicasting. In any casting, only one copy of the packet is
sent to one of the members of the group; in multicasting
each member of the group receives a copy.
• As we will see shortly, IPv6 has designated a block for
multicasting from which the same address is assigned to
the members of the group.
• It is interesting that IPv6 does not define broadcasting,
even in a limited version.
• IPv6 considers broadcasting as a special case of
multicasting.
• Address Space Allocation
• Like the address space of IPv4, the address space of IPv6
is divided into several blocks of varying size and each
block is allocated for a special purpose.
• Most of the blocks are still unassigned and have been set
aside for future use.
• Table 7.5 shows only the assigned blocks.
• In this table, the last column shows the fraction each block
occupies in the whole address space.
Global Unicast Addresses
• The block in the address space that is used for unicast (one-to-one)
communication between two hosts in the Internet is called the global unicast
address block.
• CIDR for the block is 2000::/3, which means that the 3 leftmost bits are the
same for all addresses in this block (001).
• The size of this block is 2125 bits, which is more than enough for Internet
expansion for many years to come.
• An address in this block is divided into three parts: global routing prefix (n
bits), subnet identifier (m bits), and interface identifier (q bits), as shown in
Figure 7.41.
• The figure also shows the recommended length for each part.
• The global routing prefix is used to route the packet through the
Internet to the organization site, such as the ISP that owns the block.
• Because the first 3 bits in this part are fixed (001), the rest of the 45
bits can be defined for up to 2 45 sites (a private organization or an
ISP).
• The global routers in the Internet route a packet to its destination site
based on the value of n.
• The next m bits (16 bits based on recommendation) define a subnet in
an organization.
• This means that an organization can have up to 2 16 = 65,536 subnets,
which is more than enough.
• The last q bits (64 bits based on recommendation) define the interface
identifier.
• The interface identifier is similar to the hostid in IPv4 addressing
although the term interface identifier is a better choice because, as
we discussed earlier, the host identifier actually defines the
interface, not the host.
• If the host is moved from one interface to another, its IP address
needs to be changed.
• In IPv4 addressing, there is not a specific relation between the
hostid (at the IP level) and link-layer address (at the data-link
layer) because the linklayer address is normally much longer than
the hostid.
• The IPv6 addressing allows this relationship.
• A link-layer address whose length is less than 64 bits can be
embedded as the whole or part of the interface identifier,
eliminating the mapping process.
• Two common link-layer addressing schemes can be
considered for this purpose: the 64-bit extended unique
identifier (EUI-64) defined by IEEE and the 48-bit link-layer
address defined by Ethernet.
DHCP: Dynamic Host Configuration Protocol
• Application
• simplification of installation and maintenance of networked computers
• supplies systems with all necessary information, such as
• IP address,
• DNS server address,
• domain name,
• subnet mask,
• default router etc.
• enables automatic integration of systems into an Intranet or the Internet, can be used to
acquire a COA for Mobile IP
• Client/Server-Model
• the client sends via a MAC broadcast a request to the DHCP server (might be via a DHCP relay)

DHCPDISCOVER

DHCPDISCOVER
server client

client relay
• DHCP relay agent is any TCP/IP host which is used to forward
request and replies between DHCP server and client when the server
is present on the different network.
• Relay agents receive DHCP messages and then generate a
new DHCP message to send out on another INTERFACE.
• A client sends requests using MAC broadcasts to reach all
devices in the LAN.
• A DHCP relay might be needed to forward requests across
inter-working units to a DHCP server.
• The client broadcasts a DHCPDISCOVER into the subnet.
• There might be a relay to forward this broadcast.
• In the case shown, two servers receive this broadcast and
determine the configuration they can offer to the client.
• One example for this could be the checking of available IP
addresses and choosing one for the client.
• Servers reply to the client’s request with DHCPOFFER and
offer a list of configuration parameters.
• The client can now choose one of the configurations offered.
• The client in turn replies to the servers, accepting one of the
configurations and rejecting the others using
DHCPREQUEST.
• If a server receives a DHCPREQUEST with a rejection, it
can free the reserved configuration for other possible clients.
• The server with the configuration accepted by the client now
confirms the configuration with DHCPACK.
• This completes the initialization phase.
DHCP - protocol mechanisms

server client server


(not selected) initialization (selected)
DHCPDISCOVER DHCPDISCOVER
determine the determine the
configuration configuration
DHCPOFFER DHCPOFFER
collection of replies
time

selection of configuration
DHCPREQUEST DHCPREQUEST
(reject) (options) confirmation of
configuration
DHCPACK
initialization completed

release
DHCPRELEASE delete context
• If a client leaves a subnet, it should release the configuration
received by the server using DHCPRELEASE.
• Now the server can free the context stored for the client and
offer the configuration again.
• The configuration a client gets from a server is only leased for
a certain amount of time, it has to be reconfirmed from time to
time.
• Otherwise the server will free the configuration.
• This timeout of configuration helps in the case of crashed
nodes or nodes moved away without releasing the context.
• DHCP is a good candidate for supporting the
acquisition of care-of addresses for mobile nodes.
• The same holds for all other parameters needed, such
as addresses of the default router, DNS servers, the
timeserver etc.
• A DHCP server should be located in the subnet of the
access point of the mobile node, or at least a DHCP
relay should provide forwarding of the messages
DHCP characteristics
• Server
• several servers can be configured for DHCP, coordination not
yet standardized (i.e., manual configuration)
• Renewal of configurations
• IP addresses have to be requested periodically, simplified
protocol
• Options
• available for routers, subnet mask, NTP (network time
protocol) timeserver, SLP (service location protocol)
directory, DNS (domain name system)
ARP AND RARP PROTOCOLS

You might also like