Transcript Chapter 19

Mobile IP
Chapter 19
Introduction
• Mobile IP is designed to allow portable computers
to move from one network to another
• Associated with wireless technologies
– A notebook computer attached to a wireless LAN does
not affect IP
– A desktop computer that is unplugged and plugged into
another network requires reconfiguring IP
Characteristics
• Transparency
• Interoperability with IPv4
– With conventional IP hosts and other mobile hosts
• Scalability
– Permits mobility across the Internet
• Security
– Ensures authentication; others cannot impersonate
• Macro mobility
– Focus is on long-duration moves, not like cellular
Mobile IP Operation
• The biggest challenge for mobile IP
– allowing a host to retain its address without requiring
routers to learn host-specific routes
• The solution
– Allowing the host to have two addresses
simultaneously
• the permanent address is fixed
– this is its home network
• the secondary address is temporary, valid only when the
computer is in a given location
– this is a foreign network
– the host sends the secondary address to an agent at home
Mobile IP Operation
– The agent intercepts datagrams sent to the mobile host’s
primary address and uses IP-in-IP encapsulation to
tunnel to the secondary address
– If the mobile host moves again, it gets a new secondary
address and tells the home agent of its new location
– When the mobile host returns home, it contacts the
home agent to deregister, and the agent will stop
intercepting datagrams
– Mobile IP is intended for infrequent moves and a host
that remains at a given location for some time
Mobile Addressing
• The temporary address, a care of address is not
known or used by applications
– Only IP software on the mobile and agents on the home
or foreign networks use the temporary address
– Two types of care-of addresses
• Co-located care-of address
– requires the mobile host to handle all forwarding itself
– works on existing structure, extra software is required
– applications use home address, lower layers use care-of
• Foreign agent care of address
– host discovers a foreign agent (router) and gets a care-of
address
Foreign Agent Discovery
• Agent discovery uses ICMP’s router discovery
– Routers periodically send ICMP router advertisement
messages and allow hosts to send ICMP router
solicitation to prompt for an advertisement
• A mobile that does not knowan agent’s IP address can
multicast to the all agents group (224.0.0.11) on page 324
– Router dicovery messages can be extended to allow
foreign agent advertisement or mobile advertisement
solicitation
• Mobility extensions do not use a separate ICMP message type
Foreign Agent Discovery
– A mobile host knows that an extension is present when
the datagram length in the IP header is greater than the
length of the ICMP router discovery message
– The extension in Figure 19.1 is appended to the router
discovery message
• Length of the extension message, not including type and length
(8 bits)
• Lifetime is maximum seconds that the agent will accept
registration requests (infinity is all ones)
• Codes are shown in Figure 19.2
Agent Registration
• A mobile host must register so that it can receive
datagrams at a foreign location
–
–
–
–
It registers with an agent on the foreign network
It registers with its home agent to request forwarding
It renews a registration if it is about to expire
It deregisters when it gets back home
• If it has a co-located care-of address, the host handles the
registration
• If the care-of address is from a foreign agent, the host
sends registration requests to the foreign agent and the
foreign agent contacts the home agent on its behalf
Registration Messages
• All registration messages are sent using UDP
• Agents listen to well-known port 434
• The message format
– Begins with a set of fixed-size fields followed by
variable-length extensions as in Figure 19.3
•
•
•
•
•
•
Type: request or reply
Flags: forwarding details
Lifetime: how long is the registration valid?
Home address: permanent IP address of mobile host
Home agent address
Care-of address: temporary IP address of mobile host
• Identification: a number used to match requests with replies
Communication with a Foreign
Agent
• How do we overcome the problem of a foreign
agent assigning a non-unique IP for a care-of
address?
– When a mobile host sends to a foreign agent, the host
uses its home address as the IP source address
– When the foreign agent sends to the mobile host, the
agent uses the mobile’s home address as the IP
destination address
– Address binding is done by using information that was
captured by the agent at registration time
Datagram Transmission and
Reception
• The mobile host creates a datagram with the
address of the host it is sending to as the
destination and the home address as the source
– The shortest path is taken from the foreign network to
the destination
– The reply does not take the shortest path; instead it goes
to the home address and is sent to the care-of address
using IP-in-IP
• Using a foreign agent: the care-of address on the outer
datagram specifies the foreign agent which decapsulates it
• Using a co-located address: the encapsulated datagram goes
directly to the mobile host
The Two-Crossing Problem
• Major disadvantage of mobile IP: inefficient
routing
– Look at Figure 19.5 which shows routing problems
when M communicates with D
– A route optimization possibility
• Use a host-specific route for the mobile host
– The problem remains for any destination that does not
receive the host-specific route
Communication with Computers
on the Home Network
• Normally, the home agent is the router to which
the mobile host’s home network connects to the
rest of the internet
– Before forwarding a datagram, the home agent looks at
its table of mobile hosts to determine if the host is at
home or at a foreign network
– For traffic that is generated local to the home agent, the
agent listens for ARP requests that specify the mobile
as a target, and answer with their own IP address - this
is proxy ARP (see page 150)
Summary
• Mobile IP allows a computer to move from one
network to another
– A mobile host obtains a temporary care-of address
– Applications use the home address, underlying software
uses the care-of address to deliver across a foreign
network
• When a mobile host detects that it has moved:
– it obtains a co-located care-of address
– or discovers a foreign agent which assigns a care-of @
Summary
– the mobile registers with its home agent and requests
the agent to forward datagrams
• When registration is complete, mobile hosts can
communicate with arbitrary computers on the
internet
– Datagrams sent by the mobile are forwarded to the
specified destination
– Datagrams are sent back first to the home network and
then to the mobile host on the foreign network
For Next Time
• Read Chapter 20
• Quiz over Chapter 20