PresentationMobileIP

Download Report

Transcript PresentationMobileIP

Chapter 18
Mobile IP
Jose Alcid
David Chapman
Aaron Trank
COMP429 Spring 2006
Overview
• What is Mobile IP?
• Mobility, Routing, and Addressing
• Mobile IP Characteristics
• Mobile IP Operation
• Mobile Addressing Details
• Foreign Agent Discovery
• Agent Registration
Overview
• Registration Message Format
• Communication With Foreign Agent
• Datagram Transmission And
Reception
• The Two-Crossing Problem
• Communication With Computers On
the Home Network
QUIZ
• You’ll have the chance to win 2 AMC
movie tickets!!
What is Mobile IP?
• IETF standard protocol
• Designed to allow mobile users
to move from one network to
another while maintaining their
permanent IP address.
• Described in IETF RFC 3344
Mobility, Routing and Addressing
• Mobile Computing
– Refers to a system that allows computers to
move from one location to another
• The IP addressing scheme makes
mobility difficult
– The host’s address must change
– Routers must propagate a host-specific
route across the entire Internet
• Neither alternative works well
Mobility, Routing and Addressing
• Changing an address breaks all existing
transport-layer connections and may require
restarting some network services
• If the host contacts a server that uses reverse
DNS lookup to authenticate, an additional
change to DNS may be required
• A host-specific routing approach cannot scale
because communicating and storing a route
for each host requires excessive bandwidth
and memory
Mobile IP Characteristics
• IETF devised a technology to permit
IP mobility
• Officially named IP Mobility Support
• Popularly called:
Mobile IP Characteristics
• General Characteristics include:
– Transparency
• Mobility is transparent to applications and
transport layer protocols
• A TCP connection can survive a change in
location provided the connection is not used
during transition
– Interoperability With IPv4
• A host using mobile IP can interoperate with
stationary hosts that run conventional IPv4
software
Mobile IP Characteristics
– Scalability
• The solution permits mobility across the Internet
– Security
• Mobile IP provides security facilities that can be
used to ensure all messages are authenticated
(i.e. to prevent an arbitrary computer from
impersonating a mobile host)
– Macro Mobility
• Mobile IP focuses on the problem of longduration moves (e.g., a user who takes a
portable computer on a business trip)
Mobile IP Operation
• What is the Biggest Challenge?
– Biggest challenge is allowing a host to
retain its address without requiring routers
to learn host-specific routes.
• Mobile IP solves the problem by:
– Allowing a computer to hold two addresses
simultaneously
• A permanent and fixed PRIMARY ADDRESS
• And a SECONDARY ADDRESS that is
temporary
Mobile IP
Mobile IP Operation
• Mobile IP is designed for macroscopic
mobility rather than continuous, highspeed movement
WHY?
Mobile IP Operation
• The reason should be clear:
– OVERHEAD
• Because it requires considerable
overhead after each move, Mobile IP is
intended for situations in which a host
moves infrequently and remains at a
given location for a relatively long period
of time (e.g, hours or days)
Mobile IP
But Wait!
There’s More!
Mobile IP versus Standard IP
• IP assumes end hosts are in fixed physical
locations
– What happens if we move a host between
networks?
• IP addresses enable IP routing algorithms to
get packets to the correct network:
-DHCP is used to get packets to end hosts in
networks
• This still assumes a fixed end host
Mobile IP versus Standard IP
Mobile IP versus Standard IP
• What if a user wants to roam between
networks?
– Mobile users don’t want to know that they
are moving between networks
– Why can’t mobile users change IP when
running an application?
Mobile IP versus Standard IP
• Mobile IP was developed as a means for transparently
dealing with problems of mobile users
– Enables hosts to stay connected to the Internet
regardless of their location
– Enables hosts to be tracked without needing to
change their IP address
– Requires no changes to software of non-mobile
hosts/routers
– Requires addition of some infrastructure
– Has no geographical limitations
– Requires no modifications to IP addresses or IP
address format
– Supports security
• Could be even more important than physically connected routing
Mobile IP Entities
• Mobile Node (MN)
– The entity that may change its point of attachment
from network to network in the Internet
• Detects it has moved and registers with “best” FA
– Assigned a permanent IP called its home address to
which other hosts send packets regardless of MN’s
location
• Since this IP doesn’t change it can be used by long-lived
applications as MN’s location changes
• Home Agent (HA)
–
–
–
–
This is router with additional functionality
Located on home network of MN
Does mobility binding of MN’s IP with its COA
Forwards packets to appropriate network when MN
is away
• Does this through encapsulation (IP in IP Tunneling)
Mobile IP Entities
• Foreign Agent (FA)
– Another router with enhanced functionality
– If MN is away from HA the it uses an FA to
send/receive data to/from HA
– Advertises itself periodically
– Forward’s MN’s registration request
– Decapsulates messages for delivery to MN
• Care-of-address (COA)
– Address which identifies MN’s current location
– Sent by FA to HA when MN attaches
– Usually the IP address of the FA
• Correspondent Node (CN)
– End host to which MN is corresponding (eg. a web
server)
Mobile IP versus DHCP
Two types of care-of addresses
Co-Located
• Mobile computer handles all
forwarding and tunneling itself
• Mobile obtains a local address on
foreign network (e.g. via DHCP)
• Handles details of contacting the
home agent to register
• Advantage: portability
• Disadvantage: Must have special
software
Foreign Agent
• Requires active participant on
foreign network
• Mobile discovers agent when
arrives on foreign network
• Obtains care-of address from
foreign agent †
• Advantage: Mobile computer does
not need extra software
• Disadvantage: Limited access for
Mobile computers
† A foreign agent does not need to assign a unique address. Instead, the agent may assign its IP address.
Foreign Agent Discovery
• Uses ICMP router discovery mechanism
– Routers periodically send ICMP router advertisement messages
• Hosts may send an ICMP router solicitation to prompt for the
advertisement
– A Mobile may also multicast to the all agents group (224.0.0.11)
• If the router acts as a foreign agent then in its reply it will
append a mobility agent extension
• The message type is the same as for ICMP router
advertisements except that if the datagram length specified in
the IP header is greater than the length specified in the ICMP
router discovery message, then the extension is present
Mobility agent advertisement extension
0
8
Type (16)
16
24
Length
31
Sequence Num
Lifetime
Code
Reserved
Care-Of Address
Fields
Type
Length
Sequence
Code
Lifetime
Care-of-addr
Type field ICMP = 16 (information reply)
Size of the extension msg in octets excluding Type &
Length fields
Sequence number for the message, allows
recipient to determine when a msg is lost
Defines a specific feature of the agent
Specifies a max amount of time in secs that the agent
is willing to accept registration requests
Second address for the Mobile host
Mobility agent advertisement extension
0
8
Type (16)
16
24
Length
Lifetime
31
Sequence Num
Code
Reserved
Care-Of Address
Code Bits
0
1
2
3
4
5
6
7
Agent supports reversed tunneling
Unused (must be zero)
Agent uses Generic Route Encapsulation
Agent uses minimal encapsulation
Agent functions as foreign agent
Agent functions as home agent
The agent is busy and is not accepting registrations
Registration with an agent is required even when using a co-located
care-of-address
Communicating with a Foreign Agent
• Foreign Agent may use its address as the
secondary address for the Mobile Host
• How can the foreign agent communicate with
the Mobile host when it does not have a
unique address?
– The Mobile host supplies its hardware address
during the registration.
– The foreign agent will use the hardware address
and home IP address to communicate with the
Mobile host
Communicating with Home Network
• When a host is at a foreign site the home agent can
intercept datagrams that arrive from external
sources and forward them without problems
• A special case arises when the Mobile is at a foreign
site and hosts from the home network attempt to
forward datagrams to the Mobile unit
– Those datagrams will be sent via direct delivery and not be
intercepted by the home agent
– Therefore the home agent must arrange to intercept the
ARP requests on behalf of the Mobile host which acts as a
proxy
Agent Registration
• Before it can receive datagrams at the foreign
location a Mobile host must register with an
agent
• Registration is done via UDP
• The procedure allows a host to:
– Register with a foreign agent
– Register with the home agent to arrange
forwarding
– Renew a registration that is due to expire
– Deregister with the home agent
Registration Message Format
0
8
Type (1 or 3)
16
Flags/Code
24
31
Lifetime
Home Address
Home Agent
Care-Of-Address (request only)
Identification (64bits)
Extensions…
Fields
Type
Flags/Code
Lifetime
Home addr
Home agent
1 = registration request, 3 = registration reply
Bits used in both requests and replies. They are used as result
codes in a registration reply message and specify forwarding details
in a registration request.
Specifies number of seconds the registration is valid
Mobile’s static IP home address
Home agents IP address
Registration Message Format
0
8
Type (1 or 3)
16
Flags/Code
24
Lifetime
Home Address
Home Agent
Care-Of-Address (request only)
Identification (64bits)
Extensions…
Fields cont…
Care-of addr
Identification
Extensions
Mobile’s temporary foreign address
64 bit number generated by the Mobile. Used to match
requests with incoming replies. Prevents Mobile from
accepting old messages.
variable-length field. Each request is required to contain a
mobile-home authentication extension that allows the
home agent to verify the mobile’s identity
31
Two Crossing Problem
• Poor performance within a foreign network
• Spatial locality of reference
– Visiting mobile will tend to communicate with
hosts local to the foreign network
• Crossing internet is more expensive than local
delivery
– AKA 2X problem
Mobile IP: Encapsulation Options
• IP-within-IP: The entire original IP
packet becomes the payload in a new IP
packet.
– The original, inner IP header is unchanged
except that the TTL field is decreased by 1
– The outer header is a full IP header.
Mobile IP: Encapsulation Options
Version
=4
IHL
Type of service
Identification
Time To Live
Total Length
Flags
Protocol = 4
Fragment Offset
Header Checksum
Source Address (home agent address)
Destination Address (care-of-address)
Version
=4
IHL
Type of service
Identification
Time To Live
Protocol
Total Length
Flags
Header Checksum
Source Address (home agent address)
Destination Address (care-of-address)
IP Payload
Fragment Offset
Mobile IP: Encapsulation Options
• Minimal encapsulation: A new,
condensed header is inserted between the
original IP header and the original IP
payload.
– The original IP header is then modified to
form a new outer IP header.
Mobile IP: Encapsulation Options
Version
=4
IHL
Type of Service
Identification
Time To Live
Total Length
Flags
Protocol = 55
Fragment Offset
Header checksum
Source Address (home agent address)
Destination Address (care-of-address)
Protocol
S
Retrieved
Header checksum
Destination address (home address)
Source Address(original sender may not be present)
IP Payload (e.g. TCP segment)
Mobile IP Tunneling
Across Internet
Security in Mobile IP
• Authentication can be performed by all
parties
– Only authentication between MN and HA is
required
– MD5 is the default
• Replay protection
– Timestamps are mandatory
• HA and FA do not have to share any
security information.
References
• www.cs.wisc.edu/~pb/640/
• www.cs.okstate.edu/~saranga
• www.wifiplanet.com/tutorials/article.php/2205821
• www.cisco.com/univercd/cc/td/doc/product
/software/ios120/120newft/120t/120t1/mobil
eip.htm