Lecture 7: Mobile IP (Part 1) Dr. Reynold Cheng
This lecture is based on the textbook “W. Stallings, Wireless Communications and Networks, Prentice Hall, 2005”, the slides (prepared by Tom Fronckowiak) and figures provided at the Web site of the textbook and the lecture notes of Prof. Henry Chan and Prof. Victor Leung (with his permission). 1
Class Objectives Overview of Mobile IP Discovery Registration Tunneling
2
Mobile IP Uses
Enable computers to maintain Internet connectivity while moving from one Internet attachment point to another. Mobile/Nomadic – user's point of attachment changes dynamically and all connections are automatically maintained despite the change. Each time an Internet connection is established/changed, software in the point of attachment (ISP) grants a new, temporarily assigned IP
This address is used for FTP, Web connection, etc. The user or the application should be hidden from this change.
3
IP Address Format
4
Delivery of an IP Datagram
In an IP address, The
network portion is used by routers to move a datagram from the source computer to the network to which the target computer is attached The host portion is used to deliver the IP datgram to destination
The IP address is known to higher layers (e.g.,TCP) What if the IP address changes but TCP connections remain active? Mobile
IP for address forwarding 5
Terminology of Mobile IP
A mobile node is assigned to a particular network – home network. The IP address on the home network is static – home address. The mobile node can move to another network – foreign network. The mobile node registers with a network node on the foreign network – foreign agent. The mobile node gives a care-of address to its home agent – agent on the home network A
care-off address identifies the foreign agent’s location 6
Mobile IP Scenario 1.
Server X transmits a datagram to mobile node A, the datagram (with A’s home address) is routed to A’s home network.
2.
Tunneling - A’s home agent encapsulates the incoming datagram with A’s care-of address and retransmits the datagram. This IP datagram is routed to the foreign agent.
3.
The foreign agent strips off the outer IP header and delivers the original datagram to A.
4.
When A sends IP traffic to X, it uses X’s IP address.
5.
The datagram from A to X travels directly across the Internet to X. 7
Capabilities of Mobile IP
Discovery – a mobile node uses a discovery procedure to identify prospective home and foreign agents. Registration – a mobile node uses an authenticated registration procedure to inform the home agent of its care-of address. Tunneling – this mechanism is used to forward IP datagrams from a home address to a care-of address. 8
Protocol Support for Mobile IP
9
Mobile IP Terminology (RFC 2002)
10
Mobile IP Terminology (RFC 2002)
11
Class Objectives Overview of Mobile IP Discovery Registration Tunneling
12
Discovery
Each mobile node determines if it is attached to its home network or a foreign network. Transition from the home network to a foreign network (e.g., handoff) can occur at any time without notification to the network layer. For
a mobile node, discovery is a continuous process.
13
Process of Discovery
An agent issues a router advertisement ICMP message periodically (once every 7-10 minutes). ICMP provides feedback messages about problems during communication. e.g.,
the datagram cannot reach its destination
Each mobile node listens for agent advertisement messages. Compares
the network portion of the router's IP address with the network portion of the home address. If these network portions do not match, then the mobile node knows it is on a foreign network. 14
Mobile IP Agent Advertisement Message
15
Fields for ICMP Router Advertisement
Type: type of ICMP message Code: parameters for the message Checksum: for error checking purposes Num addrs: number of addresses Entry size: Two 32-bit words, for each router (i.e., router address + preference level) Time to live: how long the message will remain valid Router address: IP address Preference level: preference level for the IP address
16
Fields for ICMP Router Advertisement
A router typically has 1 single IP address Multiple IP addresses needed if the router has multiple physical connections (interfaces) to the network The preference level is used by a host to decide which router is the best to use The preference level is set by the network administrator 17
Preference of Routers: Example
•D wants to send data but doesn’t know which router is the best to use •If most traffic from LAN Z is local, R2 is assigned a higher preference level •If most traffic is remote, R3 is set a higher preference level 18
Fields for Agent Advertisement
Type = 16: agent advertisement Length = 6+4C bytes (C: number of care-of addresses) Sequence number: no. of agent advertisement messages counted from initialization Lifetime (seconds): how long a registration will remain valid R: Registration with this foreign agent is necessary B: Busy (i.e., cannot handle new mobile nodes) H: Can serve as an Home agent F: Can serve as a Foreign agent M: Can support minimal encapsulation G: Can support GRE encapsulation V: Can support Van Jacobson header compression (RFC 1144)
http://www.javvin.com/protocol/rfc1144.pdf
Care-of addresses: care-of addresses provided by the agent
19
Fields for Prefix-length Extension
Type = 19 Length = C (C: number of care-of addresses) Prefix-length: number of bits that specifies the network number
20
Agent Solicitation Foreign agents are expected to issue agent advertisement messages periodically. If a mobile node needs the agent information immediately, it can issue an ICMP router solicitation message.
Any
agent receiving this message will then issue an agent advertisement.
21
ICMP router solicitation message
22
Move Detection
A mobile node may move from one network to another network due to some handoff mechanisms without IP level being aware. Agent
discovery process is intended to detect such a move.
Algorithms to detect move: Lifetime
field Network Prefix
23
Move Detection Using Lifetime Field
A mobile node uses the lifetime field as a timer for agent advertisements. If the timer expires before the mobile node receives another advertisement, then the node assumes it has lost contact with the agent. Meantime, if another advertisement from another agent is received, the mobile node registers with this new agent. Otherwise, agent solicitation is used to find an agent. 24
Move Detection Using Network prefix A mobile node checks if any newly received agent advertisement messages are on the same network as the node's current care-of address. If it is not, the mobile node assumes it has moved and registers with this agent
25
Co-Located Addresses
If a mobile node moves to a network that has no foreign agents, or all foreign agents are busy, it can act as its own foreign agent. The mobile node uses a co-located care-of address. IP
address is obtained by the mobile node associated with the mobile node's current network interface.
Means to acquire co-located address: Temporary
IP address obtained through an Internet service, such as DHCP. May be owned by the mobile node as a long-term address for use while visiting a given foreign network. 26