0% found this document useful (0 votes)
10 views33 pages

Ch19 21

The document discusses Mobile IP, an extension of the IP protocol that allows mobile computers to connect to the Internet from any location. It outlines the challenges of addressing mobile hosts, the use of home and care-of addresses, and the roles of home and foreign agents in facilitating mobile communication. Additionally, it covers the phases of agent discovery, registration, and data transfer necessary for mobile hosts to maintain connectivity while moving between networks.

Uploaded by

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

Ch19 21

The document discusses Mobile IP, an extension of the IP protocol that allows mobile computers to connect to the Internet from any location. It outlines the challenges of addressing mobile hosts, the use of home and care-of addresses, and the roles of home and foreign agents in facilitating mobile communication. Additionally, it covers the phases of agent discovery, registration, and data transfer necessary for mobile hosts to maintain connectivity while moving between networks.

Uploaded by

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

Ch:19

Mobile IP
19.1 INTERNET PROTOCOL (IP)

• The network layer in version 4 can be thought of as one main


protocol and three auxiliary ones.
• The main protocol, Internet Protocol version 4 (IPv4), is responsible
for packetizing, forwarding, and delivery of a packet at the network
layer.
• The Internet Control Message Protocol version 4 (ICMPv4) helps IPv4
to handle some errors that may occur in the network-layer delivery.
• The Internet Group Management Protocol (IGMP) is used to help IPv4
in multicasting.
• The Address Resolution Protocol (ARP) is used to glue the network
and data-link layers in mapping network-layer addresses to link-
layer addresses
• IPv4 is an unreliable datagram protocol—a best-effort
delivery service.
• The term best-effort means that IPv4 packets can be
corrupted, be lost, arrive out of order, or be delayed,
and may create congestion for the network.
• If reliability is important, IPv4 must be paired with a
reliable transport-layer protocol such as TCP.
• IPv4 is also a connectionless protocol that uses the
datagram approach. This means that each datagram is
handled independently, and each datagram can follow a
different route to the destination
19.1.1 Datagram Format
• Packets used by the IP are called datagrams.
• Version Number. The 4-bit version number (VER) field defines the version of the IPv4 protocol,
which, obviously, has the value of 4.
• Header Length. The 4-bit header length (HLEN) field defines the total length of the datagram
header in 4-byte words. The IPv4 datagram has a variable-length header.
• Service Type.
• Total Length. This 16-bit field defines the total length (header plus data) of the IP datagram in
bytes.
• Identification, Flags, and Fragmentation Offset. These three fields are related to the
fragmentation of the IP datagram when the size of the datagram is larger than the underlying
network can carry.
• Time-to-live. a datagram may be circulating in the Internet, visiting some networks over and over
without reaching the destination. This may create extra traffic in the Internet. The time-to-live (TTL)
field is used to control the maximum number of hops (routers) visited by the datagram.
• Protocol. In TCP/IP, the data section of a packet, called the payload, carries the whole packet from
another protocol; when the datagram arrives at the destination, the value of this field helps to
define to which protocol the payload should be delivered.
• Header checksum. IP adds a header checksum field to check the header,
but not the payload.
• Source and Destination Addresses
• Options. A datagram header can have up to 40 bytes of options. Options can
be used for network testing and debugging.
• Payload. Payload, or data, is the main reason for creating a datagram.
Payload is the packet coming from other protocols that use the service of IP.
19.1.2 Fragmentation
• A datagram can travel through different networks. Each router decapsulates the
IP datagram from the frame it receives, processes it, and then encapsulates it in
another frame.
• The format and size of the received frame depend on the protocol used by the
physical network through which the frame has just traveled.
• For example, if a router connects a LAN to a WAN, it receives a frame in the LAN
format and sends a frame in the WAN format.
• Maximum Transfer Unit (MTU)
• Each link-layer protocol has its own frame format.
• In other words, when a datagram is encapsulated in a frame, the total size of
the datagram must be less than this maximum size, which is defined by the
restrictions imposed by the hardware and software used in the network.
• The value of the MTU differs from one physical network protocol to another. For
example, the value for a LAN is normally 1500 bytes, but for a WAN it can be
larger or smaller.
• In order to make the IP protocol independent of the physical network, the designers
decided to make the maximum length of the IP datagram equal to 65,535 bytes.
This makes transmission more efficient if one day we use a link-layer protocol with
an MTU of this size. However, for other physical networks, we must divide the
datagram to make it possible for it to pass through these networks. This is called
fragmentation.
• When a datagram is fragmented, each fragment has its own header with most of
the fields repeated, but some have been changed.
• In other words, a datagram may be fragmented several times before it reaches the
final destination.
• A datagram can be fragmented by the source host or any router in the path.
The reassembly of the datagram, however, is done only by the destination
host, Whereas the fragmented datagram can travel through different routes.
• When we talk about fragmentation, we mean that the payload of the IP datagram is
fragmented. However, most parts of the header, with the exception of some
options, must be copied by all fragments.
• The value of the checksum must be recalculated regardless of fragmentation.
Fields Related to Fragmentation
• Three fields in an IP datagram are related to fragmentation: identification, flags, and
fragmentation offset
• The 16-bit identification field identifies a datagram originating from the source host. The
combination of the identification and source IP address must uniquely define a datagram as it
leaves the source host.
• In other words, all fragments have the same identification number, which is also the same
as the original datagram. The identification number helps the destination in reassembling the
datagram. It knows that all fragments having the same identification value should be
assembled into one datagram.
• The 3-bit flags field defines three flags. The leftmost bit is reserved (not used).
• The second bit (D bit) is called the do not fragment bit. If its value is 1, the machine must not
fragment the datagram. If its value is 0, the datagram can be fragmented if necessary.
• The third bit (M bit) is called the more fragment bit. If its value is 1, it means the datagram is
not the last fragment; there are more fragments after this one. If its value is 0, it means this is
the last or only fragment.
• The 13-bit fragmentation offset field shows the relative position of this fragment with
respect to the whole datagram. It is the offset of the data in the original datagram measured in
units of 8 bytes.
19.3 MOBILE IP

• As mobile and personal computers such as notebooks


become increasingly popular, we need to think about
mobile IP, the extension of IP protocol that allows
mobile computers to be connected to the Internet at
any location where the connection is possible.
19.3.1 Addressing
• The main problem that must be solved in providing mobile
communication using the IP protocol is addressing.
• Stationary Hosts
• The original IP addressing was based on the assumption that a host
is stationary, attached to one specific network. A router uses an IP
address to route an IP datagram.
• The address is valid only when the host is attached to the network. If
the network changes, the address is no longer valid
• The IP addresses are designed to work with stationary hosts because
part of the address defines the network to which the host is attached.
Mobile Hosts
• When a host moves from one network to another, the IP addressing structure needs to be
modified. Several solutions have been proposed.
Changing the Address
• One simple solution is to let the mobile host change its address as it goes to the new network.
The host can use DHCP to obtain a new address to associate it with the new network. This
approach has several drawbacks.
• First, the configuration files would need to be changed. Second, each time the computer moves
from one network to another, it must be rebooted. Third, the DNS tables need to be revised so
that every other host in the Internet is aware of the change. Fourth, if the host roams from one
network to another during a transmission, the data exchange will be interrupted.
Two Addresses
• The approach that is more feasible is the use of two addresses. The host has its original address,
called the home address, and a temporary address, called the care-of address.
• The home address is permanent; it associates the host with its home network
• When a host moves from one network to another, the care-of address changes; it is associated
with the foreign network, the network to which the host moves.
• When a mobile host visits a foreign network, it receives its care-of address during the agent
discovery and registration phase, described later.
19.3.2 Agents
• To make the change of address transparent to the rest of the Internet requires
a home agent and a foreign agent.
• We have shown the home and the foreign agents as routers, but we need to
emphasize that their specific function as an agent is performed in the
application layer. In other words, they are both routers and hosts.
• Home Agent
• The home agent is usually a router attached to the home network of the mobile host. The
home agent acts on behalf of the mobile host when a remote host sends a packet to the
mobile host. The home agent receives the packet and sends it to the foreign agent.
• Foreign Agent
• The foreign agent is usually a router attached to the foreign network. The foreign agent
receives and delivers packets sent by the home agent to the mobile host. The mobile host
can also act as a foreign agent. In other words, the mobile host and the foreign
agent can be the same. However, to do this, a mobile host must be able to receive a care-
of address by itself, which can be done through the use of DHCP. In addition, the mobile
host needs the necessary software to allow it to communicate with the home
agent and to have two addresses: its home address and its care-of address.
• This dual addressing must be transparent to the application programs. When the mobile
host acts as a foreign agent, the care-of address is called a collocated care-of
address.
• The advantage of using a collocated care-of address is that the mobile host can move to
any network without worrying about the availability of a foreign agent.
• The disadvantage is that the mobile host needs extra software to act as its own foreign
agent.
19.3.3 Three Phases

• To communicate with a remote host, a mobile host goes through three phases: agent
discovery, registration, and data transfer
• Agent Discovery
• The first phase in mobile communication, agent discovery, consists of two subphases. A
mobile host must discover (learn the address of) a home agent before it leaves
its home network. A mobile host must also discover a foreign agent after it has
moved to a foreign network. This discovery consists of learning the care-of address
as well as the foreign agent’s address. The discovery involves two types of messages:
advertisement and solicitation.
• Agent Advertisement
• When a router advertises its presence on a network using an ICMP router advertisement,
it can append an agent advertisement to the packet if it acts as an agent.
• An agent advertisement is piggybacked to the router advertisement packet.
• Mobile IP does not use a new packet type for agent advertisement; it uses the router advertisement packet of
ICMP, and appends an agent advertisement message
Agent Solicitation

• When a mobile host has moved to a new network and has not received
agent advertisements, it can initiate an agent solicitation. It can use the
ICMP solicitation message to inform an agent that it needs assistance.
• Registration
• The second phase in mobile communication is registration. After a
mobile host has moved to a foreign network and discovered the foreign
agent, it must register. There are four aspects of registration:
• 1. The mobile host must register itself with the foreign agent.
• 2. The mobile host must register itself with its home agent. This is
normally done by the foreign agent on behalf of the mobile host.
• 3. The mobile host must renew registration if it has expired.
• 4. The mobile host must cancel its registration (deregistration) when it
returns home.
• Request and Reply
• To register with the foreign agent and the home agent, the
mobile host uses a registration request and a registration
reply as shown in Figure 19.14.
• Registration Request A registration request is sent from the
mobile host to the foreign agent to register its care-of
address and also to announce its home address and home
agent address. The foreign agent, after receiving and
registering the request, relays the message to the home agent.
IPv6 ADDRESSING
Ch22
IPv6 Addressing
• The main reason for migration from IPv4 to IPv6 is the small size of the
address space in IPv4.
• An IPv6 address is 128 bits or 16 bytes (octets) long, four times the address
length in IPv4.
• 22.1.1 Representation
• Binary notation is used when the addresses are stored in a computer.
• The colon hexadecimal notation (or colon hex for short) divides the
address into eight sections, each made of four hexadecimal digits separated
by colons.
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.
• 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 and replace them with a double
semicolon.
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).
• CIDR Notation
• As we will see shortly, IPv6 uses hierarchical addressing. For this reason, IPv6
allows slash or CIDR notation. For example, the following shows how we can
define a prefix of 60 bits using CIDR. We will later show how an IPv6 address is
divided into a prefix and a suffix.
22.1.2 Address Space
• The address space of IPv6 contains 2^(128) addresses. This
address space is 2^(96) times the IPv4 address—definitely no
address depletion—as shown, the size of the space is

• 340, 282, 366, 920, 938, 463, 374, 607, 431, 768, 211,
456.
• To give some idea about the number of addresses, we assume that
only 1/64 (almost 2 percent) of the addresses in the space can be
assigned to the people on planet Earth and the rest are reserved
for special purposes.
• We also assume that the number of people on the earth is soon to
be 2^(34) (more than 16 billion). Each person can have 288
addresses to use
Three Address Types
• 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 anycast address is delivered to only
one member of the group, the most reachable one.
• Multicast Address
• A multicast address also defines a group of computers. However, there
is a difference between anycasting and multicasting. In anycasting, 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.
• It is interesting that IPv6 does not define broadcasting, even in a limited
version. IPv6 considers broadcasting as a special case of multicasting.
22.1.3 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.
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 three leftmost bits are the same for all addresses in this block
(001). The size of this block is 2^(125) bits.
• An address in this block is divided into three parts: global routing prefix (n bits), subnet
identifier (m bits), and interface identifier (q bits).
• 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. Since the first three bits in this part are fixed (001),
the rest of the 45 bits can be defined for up to 245 sites.
• The next m bits (16 bits based on recommendation) define a subnet in an organization. This
means that an organization can have up to 216 = 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 hostid in IPv4 addressing, although the term interface
identifier is a better choice.
• 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 link-layer address is normally much longer
than the hostid. The IPv6 addressing allows this relationship
Special Addresses
• Addresses that use the prefix (0000::/8) are reserved, but part of this block is
used to define some special addresses.
• The unspecified address is a subblock containing only one address, which is used
during bootstrap when a host does not know its own address and wants to send
an inquiry to find it (see DHCP section).
• The loopback address also consists of one address.
• Dthe transition from IPv4 to IPv6, hosts can use their IPv4 addresses embedded
in IPv6 addresses. Two formats have been designed for this purpose:
compatible and mapped.
• A compatible address is an address of 96 bits of zero followed by 32 bits of
IPv4 address. It is used when a computer using IPv6 wants to send a message to
another computer using IPv6.
• A mapped address is used when a computer already migrated to version 6
wants to send an address to a computer still using version 4.

You might also like