MN Ip .111.1, tb. T' THE SILICON CONTROLLED RECTIFIER AND ...
MN Lec 9 Mobile IP
-
Upload
zargham-khan -
Category
Documents
-
view
216 -
download
0
Transcript of MN Lec 9 Mobile IP
-
8/13/2019 MN Lec 9 Mobile IP
1/48
Mobile IP
Lec#9
-
8/13/2019 MN Lec 9 Mobile IP
2/48
Lecture Objectives
Present the basic principles of addressing in IPnetworks
Describe the problem of mobility with IP andconsider alternative solutions
Describe the operation of Mobile IP
-
8/13/2019 MN Lec 9 Mobile IP
3/48
Agenda
IP addressing Node mobility and IP Mobile IP
o Foreign agent discoveryo Home agent registrationo Packet delivery through tunnelingo Route optimization
-
8/13/2019 MN Lec 9 Mobile IP
4/48
IP Addressing
IPv4 addresseso Uniquely identify an interfaceo 32 bits longo Consist of a network identifier and a host identifier
Routing outside of the destination hosts subnet isusually based on the network identifier, while thehost identifier is only used within the destinationssubnet
IPv6 uses 128-bit addresses
Network Identifier Host Identifier
0 31
-
8/13/2019 MN Lec 9 Mobile IP
5/48
Five Classes of IP Addresses
IP addressing was originally based on five classes ofaddresseso A router can interpret the network and host fields by
examining the first few bits of the IP address
Class B 1 0 netid hostid
Class C 1 1 0 hostidnetid
Class D 1 1 1 0 multicast address
Class E 1 1 1 1 reserved for future use
Class A 0 netid0 1 2 3 4 8
16
24
31
hostid
-
8/13/2019 MN Lec 9 Mobile IP
6/48
CIDR
Classless Inter-Domain Routing (CIDR) wasintroduced to remedy problems with the rigidclasses of IP addresseso Defined in RFCs 1517-1520
Generalize the notion of subnet addressing Allows a flexible definition of the boundary between
the network identifier and the host identifier Example
o IP address: 10.1.9.52o Subnet mask: 255.255.252.0 (22-bit network identifier)o Network: 10.1.8.0/22o 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
-
8/13/2019 MN Lec 9 Mobile IP
7/48
A Problem With IP Addressing
An IP address serves two different functionso The namefor an interface (host) ando The locat ion(subnet) of the interface (host) in the network
IP address is the only name carried in an IPdatagramo DNS can be used to map one or more symbolic names to one or
more IP addresses, but a symbolic name is not carried in thedatagram and has no meaning once the DNS lookup iscompleted
Network identifier in the IP address is used by routers
to deliver to the destination subnet
o The IP address is associated with the location or subnet of thedestination host
IP address used by the applications to identify theendpoints
-
8/13/2019 MN Lec 9 Mobile IP
8/48
IP Routing
Router uses routing table to direct packets to theappropriate interface
a
b
c
3.0.0.2 3.0.0.3 3.0.0.4
4.0.0.5 4.0.0.6
Router
Dest = 3.0.0.4
Target Interface2.0.0.0/24 a3.0.0.0/24 b4.0.0.0/24 c
-
8/13/2019 MN Lec 9 Mobile IP
9/48
Traditional Routing for a Mobile Host
Host moving to another network is unreachable
a
b
c
3.0.0.2 3.0.0.3 3.0.0.4
4.0.0.5 4.0.0.6
Router
Dest = 3.0.0.4
3.0.0.4
X
Mobi le
Host
Target Interface2.0.0.0/24 a3.0.0.0/24 b4.0.0.0/24 c
-
8/13/2019 MN Lec 9 Mobile IP
10/48
Definitions
Home l ink Link assigned the same network prefixas the prefix of the hosts IP addresso For example, link 3.0.0.0/24
Foreign l inkAny link where the network prefixdiffers from the prefix of the hosts IP addresso For example, link 4.0.0.0/24
Mobi l i tyThe ability of a host to change itsattachment from one link to another whilemaintaining communications and not changing its IPaddress (transparently to corresponding host)o Host can change from home link to foreign link (or foreign
link to another foreign link) without a change in IP addressand without a disruption in communication
-
8/13/2019 MN Lec 9 Mobile IP
11/48
Solutions for Mobile Hosts (1)
Host-specific routingo Add routes for the mobile host to routing tables at routerso Solution is not scalable since updates and unique entries
would be needed for every mobile host Change IP address
o
Mobile host can change its address to the foreign linksnetwork prefixo Need to register new IP address with DNS, resulting in added
load on the DNS server and networko Communications, e.g., TCP connections, would be disruptedo Changing host IP address does not enable mobi l i ty, but it
does enable nomadic i ty
-
8/13/2019 MN Lec 9 Mobile IP
12/48
Solutions for Mobile Hosts (2)
Source routingo Use loose source routing to specify a path to the foreign link
(router interface) and then to the mobile nodes interfaceo Source host must determine address of foreign link, which is
not a standard function for a host
Use link level (Layer 2) mobility
o Some Layer 2 protocols support mobility (e.g., betweenaccess points in IEEE 802.11 infrastructure networks)
o Requires that the mobile host not leave the local IP subnet Mobile IP
o Extension to IP routing to support mobile nodes in a
scaleable and secure mannero Mobile IP allows a host to move to a foreign network, but still
maintain its home IP address
-
8/13/2019 MN Lec 9 Mobile IP
13/48
Abstract Functions Needed to SupportMobility
Readdressing at the home network Associating (in the location directory) the home
address and the care-of-address of the mobile nodeand 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
-
8/13/2019 MN Lec 9 Mobile IP
14/48
Mobile IP Addressing
Really need two addresses o One address for locat ing(routing to) the hosto Another address for ident i fy ing(naming) a communications
end-pointo Standard IP uses one address for both functions
Addresses in Mobile IPo Home addressKnown IP address for the hosto Home network(home link)Destination network associated
with the home addresso Foreign netwo rk(foreign link)Network associated with the
visited or foreign linko Care-of add ressIP address on the foreign link used to
locate the host
-
8/13/2019 MN Lec 9 Mobile IP
15/48
Mobile IP Overview: Data Flow
Home
Agent
ForeignAgent
CorrespondentNode (Host)
10.0.8.0/24
10.4.5.0/24
10.0.8.510.0.8.5
10.4.5.43
10.4.5.43
MobileHost
10.0.8.5
10.0.8.5
10.92.2.3
10.92.2.3
-
8/13/2019 MN Lec 9 Mobile IP
16/48
Mobile IP Elements
Mob ile Host (MH)Host that changes its attachment point fromone network or subnetwork to another Home Agent (HA)
o Specialized router on mobile nodes home network that tunnelsdatagrams for delivery to the mobile host
o Maintains current location information for the mobile nodeo Implements the readdressing function
Foreign Agent (FA)o Specialized router on foreign network that provides routing services to
the mobile host while registeredo May serve as default router for registered mobile hostso Implements the reverse readdressing function when the datagram is
delivered to the care-of-address Correspondent Node (CN)Communicates with mobile host
-
8/13/2019 MN Lec 9 Mobile IP
17/48
Mobile IP Operation (1)
Mobile (foreign and home) agents advertise theiravailability using agent-advertisement messageso Mobile host may optionally solicit an agent-advertisement
message Mobile host receives agent-advertisement 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 networko Foreign agent care-of addresso Colocated care-of address
-
8/13/2019 MN Lec 9 Mobile IP
18/48
Mobile IP Operation (2)
Mobile host registers new care-of address with homeagent, possibly via a foreign agento Registration requesto Registration reply
Home agent intercepts datagrams sent to the mobile
nodes home address and tunnels datagrams to theregistered care-of address
Tunneled datagram receivedo At foreign agent and delivered to mobile node, oro Directly at the mobile node (colocated)
Mobile host can usually send datagrams directlyback to the correspondent node
-
8/13/2019 MN Lec 9 Mobile IP
19/48
Mobile IP Operation (3)
Datagrams sent by the mobile node are delivereddirectly to the destinationo No need to pass through the home agent
-
8/13/2019 MN Lec 9 Mobile IP
20/48
Mobile IP Procedures
Fall into following areaso 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)o Registration
When the MN is away from home, it registers its care-of-addresswith it HA Either directly with its HA Through a FA, which forwards the registration to the HA
o
Tunneling
HA tunnels the datagram to the care-of-address to deliver to MN
-
8/13/2019 MN Lec 9 Mobile IP
21/48
Mobile IP Procedures
Two ways to acquire care-of-address1. Provides by the FA through its agent advertisementmessages 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 networkinterfaces DHCP Preconfigured in MN
-
8/13/2019 MN Lec 9 Mobile IP
22/48
Mobile IP Procedures
1. Mobile agents (HA or FA) advertise their presence via agentadvertisement messageso A MN can also solicit an agent advertisement message from any local
agent2. MN receives an agent advertisement message and determines
whether it is on its home network or a foreign networko At home networks MN operates without mobility services
o Deregisters it self from HA when returning home from some FA
3. When MN detects an FA, it obtains a care-of-address (either of FA orco-located)
4. MN, away from home registers its new care-of-address with HAthrough registration requests/reply messages possible through FA
5. HA tunnels the datagrams to MN6. Datagrams sent by MN may be delivered to their destination using
standard IP routing mechanisms, without necessarily passingthrough the HA
-
8/13/2019 MN Lec 9 Mobile IP
23/48
Mobile IP Details (1)
Agent advertisement/discoveryo ICMP router discoveryo Mobility agent discovery operationo Agent advertisement and solicitation messages
Registrationo
Registration operation
o Authenticationo Registration request and reply messageso Securityo Example
Datagram delivery (Tunneling)o Encapsulation principles and schemeso ARP issues
1
2
3
-
8/13/2019 MN Lec 9 Mobile IP
24/48
Agent Advertisement/Discovery
Process by which a mobile host o Determines if it is connected to its home network or to a foreign networko Determines when it has moved from one network to anothero Learns the care-of address provided by a foreign agent
Based on extensions to Internet Control Message Protocol (ICMP)router discovery mechanismo Agent advertisementis formed by including a mobility agent
advertisement extension in an ICMP router advertisement messageo Agent sol ic i tat ionmessage is similar to an ICMP Router solicitation
Both messages may not necessary for link layers that alreadyprovide this functionalityo 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
1
-
8/13/2019 MN Lec 9 Mobile IP
25/48
Router Discovery ICMP Operation
Mobile IP extend ICMP router discovery as its primarymechanism for agent discovery Host determines the local router IP address to deliver its
datagrams to hosts on any other link and can monitor theircontinued presence
Involves two ICMP messageso One transmitted by the routero Other transmitted by the hosts themselves
Router discovery message is multicast/broadcast by routers tohosts on the subnet/networko Preceded by an IP headero Normally, the all-systems multicast address (224.0.0.1) is the IP
destination address with IP Time-To-Live (TTL) of 1o Can be unicast directly to a host that sent a router solicitation
message
1
-
8/13/2019 MN Lec 9 Mobile IP
26/48
Router Discovery ICMP Operation
A MN can also be configured with router addresses by usingDHCPo Not recommended, DHCP is quite a complex protocol
Router discovery messages do not constitute a routingprotocolo Enable hosts to discover the existence of neighboring routers, but
not which router is best used to reach the destination If a host chooses a poor first-step router for a particular
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 routerthe default router Router preference level - how eager a router is to have new
hosts using its services
1
1
-
8/13/2019 MN Lec 9 Mobile IP
27/48
Router Discovery ICMP Message (1)
IP Header
ICMP Message
0 8 16 24 31
num addrs
router address (1)..
.
addr entrysz
lifetime
preference (1)
type code checksum
ICMPMessage
ICMPHeader
Router Advertisement
1
-
8/13/2019 MN Lec 9 Mobile IP
28/48
Router Discovery ICMP Message (2)
Type: Type of ICMP message (9)
Code: Used by some types to indicate a specificcondition (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
information for each router address (two words here) Lifetime: Maximum number of seconds that the
router addresses may be considered valid
1
-
8/13/2019 MN Lec 9 Mobile IP
29/48
Router Discovery ICMP Message (3)
Router address (i), i = 1num addrs: Sendingrouters IP addresses on the interface from whichthis message is sent
Preference level (i), i = 1num addrs: Preference ofthis router address relative to other routers on this
subnet (higher values are more preferable)
1
-
8/13/2019 MN Lec 9 Mobile IP
30/48
Router Solicitation ICMP Operation
Host can send router solicitation message forimmediate information Solicitation message can be broadcast or multicast
o Broadcast to the limited-broadcast address (255.255.255.255)o Multicast to the all-routers multicast address (224.0.0.2) with
TTL = 1
Routers reply with a router advertisemento Unicast to the host sending the solicitation
Host processes advertisement in standard way
1
-
8/13/2019 MN Lec 9 Mobile IP
31/48
Router Solicitation ICMP Message
Type: ICMP type (10) Code: code for this type (0) Checksum: checksum over full message Reserved: sent as 0; ignored by receiver
0 8 16 24 31
reserved
type code checksum
1
ChecksumCodeType
1
-
8/13/2019 MN Lec 9 Mobile IP
32/48
Agent Advertisement
An ICMP Router Advertisement that has beenextended also to carry mobility agent advertisementextension
Mobility agent transmits agent advertisements toadvertise its services on a linko Mobile nodes use these advertisements to determine their
current point of attachment to the Internet
Extend router advertisement messages may also carryother extensionso Mobility agent advertisement extensiono Prefix-length extensiono One-byte padding extensiono Future extensions
1
1
-
8/13/2019 MN Lec 9 Mobile IP
33/48
Agent Advertisement
Within an agent advertisement message, ICMP routeradvertisements include the following link layer, IP,and ICMP header fieldso Link layerdestination address
Link layer destination address of a unicast agentadvertisement is required to be the same as the sourcelink-layer address of the agent solicitation that promptedthe advertisement
o IP TTL - requires to be set to 1 for all agent advertisements Destination addressall systems on this link mulicast
address (224.0.0.1) or the limited broadcast address(255.255.255.255)
o ICMP (router discovery fields)
1
Ad i F (2)1
-
8/13/2019 MN Lec 9 Mobile IP
34/48
Advertisement Features (2)
ICMP
o Type = 9 (router advertisement message)o Code
Code = 0 if mobility agent handles common traffic, i.e. it isa router for general IP traffic
Code = 16 if mobility agent does notroute common traffic
(but it must route datagrams from a registered mobilehost)
o Lifetime is maximum time this advertisement is consideredvalid
o Router addresses are usual router addresses that areadvertised (preference may be low)
o Num addrs is the number of advertised router addresses
1
M bili A Ad i E i (1)
1
-
8/13/2019 MN Lec 9 Mobile IP
35/48
Mobility Agent Advertisement Extension (1)
0 8 16 24 31
registration lifetime
type length sequence number
reservedRBHFMG
V
zero or more care-of addresses
Type: 16 Length: 6 + 4*N, where Nis the number of advertised
care-of addresses (4 bytes each) Sequence number: Count of advertisement messages
since agent was initialized
( fol low s ICMP rou ter advert isement f ield
A t Ad ti t E t i (2)1
-
8/13/2019 MN Lec 9 Mobile IP
36/48
Agent Advertisement Extension (2)
Registration lifetime: Lifetime in seconds that thisagent is willing to accept a registration request(65,535 infinity)
Bit fieldso R: Registration required - Foreign agent requires registration
rather than using colocated care-of address (e.g., foraccounting or other policies)o B: Busy -- foreign agent will not accept registrations from new
mobile hosts if seto H: Home agent -- agent offers home agent services on this
linko F: Foreign agent -- agent offers foreign agent services on this
link
1
A t Ad ti t E t i (3)1
-
8/13/2019 MN Lec 9 Mobile IP
37/48
Agent Advertisement Extension (3)
Bit fields (continued)
o M: Minimal encapsulation -- agent can receive datagrams thatcontain minimal encapsulation
o G: Generic routing encapsulation (GRE) -- agent can receivedatagrams that use GRE
o 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 agento Must provide at least one if F = 1o Number of addresses determined by length field
1
A t Ad ti t E t i (4)1
-
8/13/2019 MN Lec 9 Mobile IP
38/48
Agent Advertisement Extension (4)
HA should never claim to be too busy to server MNs on itshome 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 indeedattached to its home network
A FA may indicate that it is too busy to allow new MNs toregister with it, by setting the B bit in the agentadvertisementso 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 B
bit set if the F bit is not also set
Agent Ad ertisement E tension (5)1
-
8/13/2019 MN Lec 9 Mobile IP
39/48
Agent Advertisement Extension (5)
Either the F bit or the H bit is required to be set in themobility agent advertisement extension When a FA wishes to require registration even from
those mobile nodes that have acquired colocatedcare-of-address, it sets R bit to one
Prefix Length Extension
1
-
8/13/2019 MN Lec 9 Mobile IP
40/48
Prefix-Length Extension
May follow the mobility agent advertisementextension Used to indicate the number of bits of network prefix
that apply to each router address listed in the ICMPRouter Advertisement portion of the agent
advertisement portion Type: 19 Length: N, where Nis the value of the num addrs
fields in the ICMP Router Advertisement portion of the
agent advertisement
0 8 16 24 31type length
Prefixlength
One byte Padding Extension
1
-
8/13/2019 MN Lec 9 Mobile IP
41/48
One-byte Padding Extension
Use to align ICMP to even number of bytes If present this extension should be the last extension
in the agent advertisement
0 8
type = 0
Mobile Agent Solicitation Message1
-
8/13/2019 MN Lec 9 Mobile IP
42/48
Mobile Agent Solicitation Message
Same as ICMP router solicitation messageo TTL = 1 required
Used in a slightly different wayo Frequencyo Number of attempts
Advertising by Mobility Agents1
-
8/13/2019 MN Lec 9 Mobile IP
43/48
Advertising by Mobility Agents
If link-layer protocol does notprovide agentdiscovery, mobility agent (HA and FA) musto Send agent advertisement messages (at some maximum rate
with 1 second maximum recommended rate)o Respond to agent solicitation messages
If link-layer protocol doesprovide agent discovery,mobility agent musto Respond to agent solicitation messageso Send agent advertisement messages if site policy requires
additional registration (when R bit is set or as a response to aspecific agent solicitation)
Agent Discovery by Mobile Hosts1
-
8/13/2019 MN Lec 9 Mobile IP
44/48
Agent Discovery by Mobile Hosts
MH sends solicitation only ifo There is no agent advertisement messageo Care-of address not established by link-layer protocol
Agent advertisement provideso Care-of addresso Foreign agent address
Mobile host knows it is on its home link when it seesadvertisement messages from its home agento Mobile host reconfigures routing for home network operationo Issues gratuitous ARP to update any cached ARP entrieso Deregisters with home agent
Agent Discovery by Mobile Hosts1
-
8/13/2019 MN Lec 9 Mobile IP
45/48
Agent Discovery by Mobile Hosts
A MA is required to limit the rate at which it sendsbroadcast or multicast agent advertisementso A recommended maximal rate is once per second
A FA must accept router solicitation even when the IPsource address appears to reside on a different
subnet than the mobility agents interface on whichthe solicitation was received A MA may be configured to send agent
advertisements only in response to an agentsolicitation message
Agent Discovery by Mobile Hosts1
-
8/13/2019 MN Lec 9 Mobile IP
46/48
Agent Discovery by Mobile Hosts
Solicitations should only be sent in the absence ofagent advertisements and when a care-of-address hasnot been determined through link-layer protocol orother means
A node may send three initial solicitations on a given
link, at a maximum rate of one per secondo After this, solicitation rate is required to be reduced (binary
exponential backoff mechanism) so as to limit the overhead onthe local link
In fact, a MN can continue to send out solicitation
indefinitely until a suitable FA finally comes withinrangeo With maximum interval of at least one min
Registration Requires1
-
8/13/2019 MN Lec 9 Mobile IP
47/48
Registration Requires
When a MN receives an agent advertisement with Rbit set, the MN should register through the FA, evenwhen the MN might be able to acquire its owncolocated care-of-addresso Intended to enforce visiting policies (such as accounting)
Returning Home1
-
8/13/2019 MN Lec 9 Mobile IP
48/48
Returning Home
A MN can detect that it has returned to its homenetwork when it receives as agent advertisement fromits 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 homenetwork
In addition, if the home network is using ARP, the MNis required to follow the procedures with regard toARP, proxy ARP, and gratuitous ARP