Professional Documents
Culture Documents
Lec#6
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
Mobile IP
Mobile IP (or IP mobility) is an Internet Engineering
Task Force (IETF) standard communications protocol that is designed to allow mobile device users to move from one network to another while maintaining a permanent IP address Mobile IP for IPv4 is described in IETF RFC 3344, and updates are added in IETF RFC 4721 Mobile IPv6, the IP mobility implementation for the next generation of the Internet Protocol, IPv6, is described in RFC 3775
Mobile IP
Mobile IP protocol allows location-independent
routing of IP datagrams on the Internet Each mobile node is identified by its home address disregarding its current location in the Internet While away from its home network, a mobile node is associated with a care-of address which identifies its current location and its home address is associated with the local endpoint of a tunnel to its home agent Mobile IP specifies how a mobile node registers with its home agent and how the home agent routes datagrams to the mobile node through the tunnel
Applications
Mobile IP is most often found in wired and wireless
environments where users need to carry their mobile devices across multiple LAN subnets Examples of use are in roaming between overlapping wireless systems, e.g., IP over DVB, WLAN, WiMAX and BWA Currently, Mobile IP is not required within cellular systems such as 3G, to provide transparency when Internet users migrate between cellular towers, since these systems provide their own data link layer handover and roaming mechanisms However, it is often used in 3G systems to allow seamless IP mobility between different packet data serving node (PDSN) domains
IP Addressing
IPv4 addresses Uniquely identify an interface 32 bits long Consist of a network identifier and a host identifier
0
Network Identifier
31
Host Identifier
usually based on the network identifier, while the host identifier is only used within the destinations subnet IPv6 uses 128-bit addresses
addresses
A router can interpret the network and host fields by
Class A
Class B Class C Class D Class E
8 netid netid
16
24
31
hostid
hostid hostid
CIDR
Classless Inter-Domain Routing (CIDR) was
Generalize the notion of subnet addressing Allows a flexible definition of the boundary between
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
destination host
endpoints
IP Routing
Router uses routing table to direct packets to the
3.0.0.2
b
3.0.0.3
3.0.0.4
4.0.0.5
4.0.0.6
Interface a b c
a Router
3.0.0.2
b
3.0.0.3
3.0.0.4
X
Mobile Host
Dest = 3.0.0.4
4.0.0.5
4.0.0.6
3.0.0.4
Definitions
Home link Link assigned the same network prefix
attachment from one link to another while maintaining communications and not changing its IP address (transparently to corresponding host)
Host can change from home link to foreign link (or foreign
link to another foreign link) without a change in IP address and without a disruption in communication
address and the care-of-address of the mobile node and maintaining up-to-date values for the association Delivering the datagram to the care-of-address Inverting the readdressing operation once the datagram arrives at the care-of-address
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
10.4.5.0/24
Mobile IP Elements
Mobile Host (MH) Host that changes its attachment point from
delivered to the care-of-address Correspondent Node (CN) Communicates with mobile host
Components of Mobile IP
message
and decides if it is on a foreign or home network If the mobile node is returning to its home network, it deregisters with its home agent If the mobile host is on a foreign network, it obtains a care-of address on the foreign network
Foreign agent care-of address Colocated care-of address
nodes home address and tunnels datagrams to the registered care-of address Tunneled datagram received
At foreign agent and delivered to mobile node, or
Mobile IP Procedures
Fall into following areas Agent Advertisement/discovery HA and FA may advertise their availability on each link for which they provide service (advertisement) A newly arrived mobile node can send a solicitation on the link to learn if any prospective agents present (discovery) Registration When the MN is away from home, it registers its care-ofaddress with it HA Either directly with its HA Through a FA, which forwards the registration to the HA Tunneling HA tunnels the datagram to the care-of-address to deliver to MN
Mobile IP Procedures
messages Care-of-address is an IP address of the FA Many MNs share the same care-of-address 2. A co-located care-of-address acquired by the MN through some external means, and associates with one of its network interfaces DHCP Preconfigured in MN
Mobile IP Procedures
1.
Mobile agents (HA or FA) advertise their presence via agent advertisement messages
A MN can also solicit an agent advertisement message from any local agent
2.
MN receives an agent advertisement message and determines whether it is on its home network or a foreign network
At home networks MN operates without mobility services Deregisters it self from HA when returning home from some FA
3. 4. 5. 6.
When MN detects an FA, it obtains a care-of-address (either of FA or co-located) MN, away from home registers its new care-of-address with HA through registration requests/reply messages possible through FA HA tunnels the datagrams to MN Datagrams sent by MN may be delivered to their destination using standard IP routing mechanisms, without necessarily passing through the HA
Agent Advertisement/Discovery
Process by which a mobile host
Determines if it is connected to its home network or to a foreign network
Based on extensions to Internet Control Message Protocol (ICMP) router discovery mechanism
Agent advertisement is formed by including a mobility agent
Both messages may not necessary for link layers that already provide this functionality
Different for each kind of link layer
Mobile IP assumes link level connectivity is established by some other means, e.g., association in IEEE 802.11b No authentication is required for agent advertisement and agent solicitation messages
mechanism for agent discovery Host determines the local router IP address to deliver its datagrams to hosts on any other link and can monitor their continued presence Involves two ICMP messages
One transmitted by the router Other transmitted by the hosts themselves
destination address with IP Time-To-Live (TTL) of 1 Can be unicast directly to a host that sent a router solicitation message
protocol
Enable hosts to discover the existence of neighboring routers, but
destination, it should receive an ICMP redirect from that router, which identifies a better one In fact, it is quite often the case that hosts send all such datagram traffic through a single router the default router Router preference level - how eager a router is to have new hosts using its services
ICMP Header
type code checksum num addrs addr entry size lifetime router address (1) preference (1)
. . .
Router Advertisement
condition (0)
Checksum: Checksum over full message Num addrs: Number of router addresses advertised
in this message
Addr entry size: The number of 32-bit words of
this router address relative to other routers on this subnet (higher values are more preferable)
TTL = 1
sent directly to the soliciting host Host processes advertisement as if the advertisement were unsolicited and received at the broadcast or multicast address
Agent Advertisement
also to carry mobility agent advertisement extension Mobility agent transmits agent advertisements to advertise its services on a link
Mobile nodes use these advertisements to determine their
other extensions
Mobility agent advertisement extension Prefix-length extension One-byte padding extension Future extensions
Agent Advertisement
advertisements include the following link layer, IP, and ICMP header fields
Link layer destination address Link layer destination address of a uni-cast agent
advertisement is required to be the same as the source link-layer address of the agent solicitation that prompted the advertisement
IP TTL - requires to be set to 1 for all agent advertisements
address (224.0.0.1) or the limited broadcast address (255.255.255.255) ICMP (router discovery fields)
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
care-of addresses (4 bytes each) Sequence number: Count of advertisement messages since agent was initialized
registration rather than using colocated care-of address (e.g., for accounting or other policies) B: Busy -- foreign agent will not accept registrations from new mobile hosts if set H: Home agent -- agent offers home agent services on this link F: Foreign agent -- agent offers foreign agent services on this link
Bit fields (continued) M: Minimal encapsulation -- agent can receive datagrams that contain minimal encapsulation G: Generic routing encapsulation (GRE) -- agent can receive datagrams that use GRE V: Van Jacobson header compression -- agent supports use of header compression Reserved: sent as 0; ignored by receiver Care-of addresses: care-of addresses provided by
this agent
Must provide at least one if F = 1 Number of addresses determined by length field
home network There can be multiple HAs However, an advertisement from any of the HA on the same network will suffice to inform the MN that it is indeed attached to its home network A FA may indicate that it is too busy to allow new MNs to register with it, by setting the B bit in the agent advertisements
However, it must continue to send agent advertisements so that
any MN already registered with it will know that they have not moved out of the range of FA
An agent advertisement message is not allowed to have a
Either the F bit or the H bit is required to be set in the When a FA wishes to require registration even from
those mobile nodes that have acquired colocated care-of-address, it sets R bit to one
Prefix-Length Extension
0 8 16 24 31
type
length
Prefix length
that apply to each router address listed in the ICMP Router Advertisement portion of the agent advertisement portion Type: 19 Length: N, where N is the value of the num addrs fields in the ICMP Router Advertisement portion of the agent advertisement
type = 0
Use to align ICMP to even number of bytes If present this extension should be the last extension
MH sends solicitation only if There is no agent advertisement message Care-of address not established by link-layer protocol Agent advertisement provides Care-of address Foreign agent address Mobile host knows it is on its home link when it sees
source address appears to reside on a different subnet than the mobility agents interface on which the solicitation was received A MA may be configured to send agent advertisements only in response to an agent solicitation message
agent advertisements and when a care-of-address has not been determined through link-layer protocol or other means A node may send three initial solicitations on a given link, at a maximum rate of one per second
After this, solicitation rate is required to be reduced (binary
Registration Requires
set, the MN should register through the FA, even when the MN might be able to acquire its own colocated care-of-address
Intended to enforce visiting policies (such as accounting)
Returning Home
network when it receives as agent advertisement from its own home agent If so, it should deregister with its home agent Before attempting to deregister, the MN should configure its routing table appropriately for its home network In addition, if the home network is using ARP, the MN is required to follow the procedures with regard to ARP, proxy ARP, and gratuitous ARP