chapter 18 mobile ip jose alcid david chapman aaron trank comp429 spring 2006

42
Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Upload: brittney-benson

Post on 26-Dec-2015

218 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Chapter 18Mobile IP

Jose AlcidDavid Chapman

Aaron Trank

COMP429 Spring 2006

Page 2: 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

Page 3: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Overview

•Registration Message Format

•Communication With Foreign Agent

•Datagram Transmission And Reception

•The Two-Crossing Problem

•Communication With Computers On the Home Network

Page 4: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

QUIZ

• You’ll have the chance to win 2 AMC movie tickets!!

Page 5: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 6: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 7: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 8: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobile IP Characteristics

• IETF devised a technology to permit IP mobility

•Officially named IP Mobility Support

•Popularly called:

Page 9: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 10: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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 long-

duration moves (e.g., a user who takes a portable computer on a business trip)

Page 11: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 12: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobile IP

Page 13: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobile IP Operation

• Mobile IP is designed for macroscopic mobility rather than continuous, high-speed movement

WHY?

Page 14: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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)

Page 15: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobile IP

But Wait!

There’s More!

Page 16: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 17: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobile IP versus Standard IP

Page 18: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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?

Page 19: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 20: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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)

Page 21: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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)

Page 22: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobile IP versus DHCP

Page 23: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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.

Page 24: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006
Page 25: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 26: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobility agent advertisement extension

FieldsType Type field ICMP = 16 (information reply)Length Size of the extension msg in octets excluding

Type & Length fields

Sequence Sequence number for the message, allows recipient to determine when a msg is lost

Code Defines a specific feature of the agent Lifetime Specifies a max amount of time in secs that the

agent is willing to accept registration requestsCare-of-addr Second address for the Mobile host

Type (16) Length Sequence Num

Lifetime Code Reserved

Care-Of Address

0 8 16 24 31

Page 27: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobility agent advertisement extension

Code Bits0 Agent supports reversed tunneling1 Unused (must be zero)2 Agent uses Generic Route Encapsulation3 Agent uses minimal encapsulation4 Agent functions as foreign agent5 Agent functions as home agent6 The agent is busy and is not accepting registrations7 Registration with an agent is required even when using a co-

located care-of-address

Type (16) Length Sequence Num

Lifetime Code Reserved

Care-Of Address

0 8 16 24 31

Page 28: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 29: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 30: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 31: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Registration Message Format

Type (1 or 3) Flags/Code Lifetime

Home Address

Home Agent

Care-Of-Address (request only)

Identification (64bits)

Extensions…

0 8 16 24 31

FieldsType 1 = registration request, 3 = registration replyFlags/Code 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.

Lifetime Specifies number of seconds the registration is validHome addr Mobile’s static IP home addressHome agent Home agents IP address

Page 32: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Registration Message Format0 8 16 24 31

Fields cont…Care-of addr Mobile’s temporary foreign addressIdentification64 bit number generated by the Mobile. Used to match

requests with incoming replies. Prevents Mobile from accepting old messages.

Extensions 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

Type (1 or 3) Flags/Code Lifetime

Home Address

Home Agent

Care-Of-Address (request only)

Identification (64bits)

Extensions…

Page 33: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006
Page 34: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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

Page 35: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006
Page 36: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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.

Page 37: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobile IP: Encapsulation Options

Version = 4

IHL Type of service Total Length

Identification Flags Fragment Offset

Time To Live Protocol = 4 Header Checksum

Source Address (home agent address)

Destination Address (care-of-address)

Version = 4

IHL Type of service Total Length

Identification Flags Fragment Offset

Time To Live Protocol Header Checksum

Source Address (home agent address)

Destination Address (care-of-address)

IP Payload

New

IP H

eader

Old

IP H

eader

Page 38: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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.

Page 39: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobile IP: Encapsulation Options

Mod

ified

IP H

eader

Min

imal

forw

ard

ing

Header

Version = 4

IHL Type of Service Total Length

Identification Flags Fragment Offset

Time To Live Protocol = 55 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)

               

Page 40: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

Mobile IP Tunneling

Across Internet

Page 41: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

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.

Page 42: Chapter 18 Mobile IP Jose Alcid David Chapman Aaron Trank COMP429 Spring 2006

References

• www.cs.wisc.edu/~pb/640/

• www.cs.okstate.edu/~saranga• www.wi-fiplanet.com/tutorials/article.php/

2205821 • www.cisco.com/univercd/cc/td/doc/

product/software/ios120/120newft/120t/120t1/mobileip.htm