Professional Documents
Culture Documents
Lecture 9
Mobile Networks:
IP Addressing and Mobile IP
Lecture Objectives
Present the basic principles of addressing in IP
networks
Describe the problem of mobility with IP and
consider alternative solutions
Describe the operation of Mobile IP
Agenda
IP addressing
Node mobility and IP
Mobile IP
Foreign agent discovery
Home agent registration
Packet delivery through tunneling
Route optimization
IP Addressing
IPv4 addresses
Uniquely identify an interface
32 bits long
Consist of a network identifier and a host identifier
31
Network Identifier
Host Identifier
addresses
A router can interpret the network and host fields by
Class A
01234
0 netid
16
24
31
Class B
10
Class C
110
netid
Class D
1110
multicast address
Class E
1111
hostid
netid
hostid
hostid
CIDR
Classless Inter-Domain Routing (CIDR) was
10.1.9.52
Subnet mask: 255.255.252.0 (22-bit network identifier)
Network:
10.1.8.0/22
Packets with address in the range 10.1.8.0-10.1.11.255 will be
routed to network 10.1.8.0/22 based on the first 22 bits
datagram
DNS can be used to map one or more symbolic names to
IP Routing
Router uses routing table to direct packets to the
appropriate interface
Target
2.0.0.0/24
3.0.0.0/24
4.0.0.0/24
Interface
a
b
c
3.0.0.2
3.0.0.3
4.0.0.5
4.0.0.6
3.0.0.4
b
a
Dest = 3.0.0.4
Router
Target
2.0.0.0/24
3.0.0.0/24
4.0.0.0/24
Interface
a
b
c
3.0.0.2
3.0.0.3
a
Dest = 3.0.0.4
Router
3.0.0.4
Mobile
Host
4.0.0.5
4.0.0.6
3.0.0.4
9
Definitions
Home link Link assigned the same network prefix
10
11
12
Mobile IP
Mobile IP allows a host to move to a foreign network,
August 2002.
C. E. Perkins, Mobile IP: Design Principles and Practices,
Addison-Wesley, Reading, MA, 1998.
J. D. Solomon, The Internet Unplugged, Prentice Hall PTR,
Upper Saddle River, NJ, 1998.
IETF Working Groups
Mobility for IPv4:
http://www.ietf.org/html.charters/mip4-charter.html
Mobility for IPv6:
http://www.ietf.org/html.charters/mip6-charter.html
13
Mobile IP Addressing
Really need two addresses
One address for locating (routing to) the host
Another address for identifying (naming) a communications
end-point
Standard IP uses one address for both functions
Addresses in Mobile IP
Home address Known IP address for the host
Home network (home link) Destination network associated
with the home address
Foreign network (foreign link) Network associated with the
visited or foreign link
Care-of address IP address on the foreign link used to
locate the host
14
10.92.2.3
Correspondent
Node (Host)
10.0.8.5
10.0.8.5
10.92.2.3
10.4.5.43
10.0.8.0/24
10.4.5.0/24
Foreign
10.4.5.43
Agent
10.0.8.5
Mobile
10.0.8.5
Host
15
Mobile IP Elements
Mobile Host (MH) Host that changes its attachment
16
message
17
18
19
20
21
Agent Discovery
22
23
ICMP
Header
IP Header
ICMP
Message
ICMP Message
8
16
24
31
type
code
checksum
num addrs addr entr sz
lifetime
router address (1)
preference (1)
..
.
Mobile Networks: IP Addressing and Mobile IP
24
condition (0)
Checksum: Checksum over full message
Num addrs: Number of addresses advertised in this
message
Addr entry size: The number of 32-bit words of
information for each router address (two words here)
Lifetime: Maximum number of seconds that the
addresses may be considered valid
25
26
immediate information
Solicitation message can be broadcast or multicast
Broadcast to the limited-broadcast address
(255.255.255.255)
Multicast to the all-routers multicast address (224.0.0.2) with
TTL = 1
27
type
16
code
reserved
24
31
checksum
28
Agent Advertisement
29
additional registration
30
operation
Issues gratuitous ARP to update any cached ARP entries
Deregisters with home agent
31
Link layer
Destination address should match link layer source address
for agent solicitation
IP
TTL = 1 (local subnet only)
Destination address is
All-systems multicast address (224.0.0.1), or
Limited-broadcast address (225.225.225.225)
32
ICMP
Type = 9 (router advertisement message)
Code
Code = 0 if mobility agent handles common traffic, i.e. it
is a router for general IP traffic
Code = 16 if mobility agent does not route common traffic
(but it must route datagrams from a registered mobile
host)
Lifetime is maximum time this advertisement is considered
valid
Router addresses are usual router addresses that are
advertised (preference may be low)
Num addrs is the number of advertised router addresses
33
type
length
registration lifetime
16
24
31
sequence number
RBHFMGV
reserved
34
35
this agent
Must provide at least one if F = 1
Number of addresses determined by length field
36
37
Registration
38
39
40
(1)
(2)
Foreign
Agent
FA
(3)
(5)
1.
2.
3.
4.
5.
Home
Agent
HA
(4)
FA advertises service
MH requests service
FA relays request to HA
HA accepts (or denies) request and replies
FA relays reply to MH
41
Authentication (1)
42
Authentication (2)
field in request
43
IP Header
UDP Header
Mobile IP
Message Header
Extensions
44
type
16
24
31
SBDMGVrsv
lifetime
home address
home agent
care-of address
identification
extensions ...
45
46
47
agent
48
49
Source address
Care-of address if colocated care-of address
Otherwise, mobile hosts home address
Destination address
IP address of foreign agent learned through advertisement
message if registering through foreign agent
If IP address not known, all-mobility-agents multicast
address (224.0.0.11) with TTL = 1 and link-layer address set
to agents address
IP address of home agent if registering directly with home
agent
Subnet-directed broadcast of home agent if IP address not
known
50
51
type
16
code
home address
home agent
24
31
lifetime
identification
extensions ...
52
53
54
Source address
Typically copied from the destination address of associated
registration request
If request sent to a multicast or broadcast address, source
address is set to home agents preferred unicast address
Destination address: Copied from the source
55
56
authenticator value
Authentication algorithm
Mode
Shared secret
Shared secret
Shared private key, or
Public/private key pair
57
Authentication Extension
0
type
code
SPI (second two bytes)
16
24
31
Type:
32 Mobile-home authentication
33 Mobile-foreign authentication
34 Foreign-home authentication
Length: 4 plus length of authenticator
SPI: 4-byte SPI
Authenticator: Variable length (SPI)
Mobile Networks: IP Addressing and Mobile IP
58
Order of Extensions
59
registration
Link-layer address of foreign agent (if applicable)
IP destination address of the registration request
Care-of address used in registration
Identification value sent in registration
Originally requested lifetime
Remaining lifetime of pending registration
60
61
62
Example values
Mobile hosts home address
Mobile hosts home agent
Foreign agents link address
Foreign agents care-of address
Mobile nodes source port
Foreign agents source port
Care-of registration lifetime
Home agent-granted lifetime
SPI (mobile node/home agent)
129.34.78.5
129.34.78.254
137.0.0.11
9.2.20.11
1094
1105
60,000 s
35,000 s
302/303
63
Type=9
Code=16
IP Header
S=137.0.0.11
D=255.255.255.255
F=1
Mobile Ext
Life=60,000
COA=9.2.20.11
64
S=1094
D=434
IP Header
S=129.34.78.5
D=137.0.0.11
TTL=64
UDP Header
SPI=302
Mobile IP
Auth Ext
Type=1
Life=60,000
COA=9.2.20.11
HA=129.34.78.254
MH=129.34.78.5
65
UDP Header
S=9.2.20.11
D=129.34.78.254
TTL=64
SPI=302
Mobile IP
Auth Ext
Type=1
Life=60,000
COA=9.2.20.11
HA=129.34.78.254
MH=129.34.78.5
66
UDP Header
S=129.34.78.254
D=9.2.20.11
TTL=64
SPI=303
Mobile IP
Auth Ext
Type=3
Code=0
Life=35,000
HA=129.34.78.254
MH=129.34.78.5
67
UDP Header
S=137.0.0.11
D=129.34.78.5
TTL=1
SPI=303
Mobile IP
Auth Ext
Type=3
Code=0
Life=35,000
HA=129.34.78.254
MH=129.34.78.5
68
Datagram Delivery
69
Tunneling Basics
Source
Destination
Tunnel
Encapsulation
Decapsulation
70
Original
IP Header
Original IP
Payload
Original
IP Header
Original IP
Payload
Other
Optional
Headers
Mobile Networks: IP Addressing and Mobile IP
71
Outer IP header
Total length is length of entire encapsulated datagram
TOS (DSCP) copied from inner header
If DF flag is set in inner header, also set in outer
Protocol = 4 (IP)
Source address is address of encapsulator
Destination address is address of decapsulator
Optional header fields are generally not copied; others may
be added
72
Proxy ARP
An ARP reply sent by one node on behalf of another node
ARP reply includes proxys link-layer address
Future transmissions will be sent to the proxy
Home agent can proxy ARP for mobile node
Gratuitous ARP
ARP request or reply sent in order to update ARP caches at
other nodes
Nodes are required to update their caches
Home agent does gratuitous ARP to update ARP caches on
local network after change in registration or deregistration
Mobile host does gratuitous ARP when it returns home
73
correspondent node
supported in IPv6
IPv6 also uses only colocated care-of addresses
74
Corresponding
Host
Home
Agent
Datagram 1
Datagram 2
Binding update
Tunnel
Foreign
Agent
ACK
Mobile
Host
Mobile Networks: IP Addressing and Mobile IP
75
Summary
IP addressing presents problems for mobile hosts
Mobile IP is a solution for truly mobile operation
Home agents and foreign agents provide mobility support
Dynamic Host Configuration Protocol (DHCP), Network
Address Translation (NAT), etc. can be used for nomadic
operation
Major operations
Agent discover
Registration
Datagram delivery through tunneling
Route optimization and IPv6 offer improvements on
basic Mobile IP
Mobile Networks: IP Addressing and Mobile IP
76