CCM 4300 Lecture 18Computer Networks, Wireless and Mobile
Communication Systems
1
Mobility – Mobile IP Part-I
Dr S Rahman
Lesson objectives� To acquire a basic understanding of the basics of Mobile
IPv4 and IPv6, you will:
- Understand principles of MIP & HMIP: (Part-I) mHA, CN, MN, FN, HN, FA, binding updates, CoA, RCoA.
mTriangular rule
2
mTriangular rule
mRoute optimisation
mAvailability and access control.
-Security in MIP (Part-II)mKey distribution
-HMIP (Hierarchical MIP) (Part-II)
-CIP (Cellular IP) (Part-II)
Home Agent (HA)
Correspondent Node (CN)
Mobile Node (MN)
Foreign Network(FN)
Home Network(HN)
Foreign Agent (FA)
Care-of Address (COA)
Facts about Mobile IP• More than 2 billion subscribers
•More than 70% of all digital mobile phones use GSM
•7.3 million people accesses the net via their mobile phones, during the second and third quarters of 2008. (BBC news channel)
•An increase of 25% compared to growth of juts 3% for the PC based net audience-(BBC news channel)
3
audience-(BBC news channel)
• IPv4 can do it all, it will be at a tremendous (unimaginable) cost and complexity
•Only IPv6 offers enough addresses
•IPv6 offers features needed for mobile networking
•IPv6 utilises features to offer seamless roaming
•Network layer roaming enables cost reduction and improve deploy ability
Mobile Network layer
• Mobile phone
• Mobile IP (Internet Protocol)
• Hand-off effects:
• addressing and routing
4
• addressing and routing
• operation of upper layer protocols
• Mobile IPv6
Interworking
TheInternet
IP backbone
BillingVHE
Signalling Gateway
WAP Accounting
Broadcast Networks
Satellite FES
The
Context-aware informationCentre
ISPSIP Proxy Server
The
UMTS
Broadcast Networks(DAB, DVB-T)
GSM / GPRS
IP-based micro-mobility Wireless
LANs
5
Hierarchical Coverage Layers
Global coverage
DAB and DVB-T, DVB-S
Satellite
Regional coverage
IP-based backbone
National coverage
Local area coverageWireless LANs
2G, 3G and 4G Cellular
Personal area coverageWireless PANs
Vertical Handover
Horizontal Handover 6
Vertical Handover (Next Generation Mobility)
WiFiWiFi
UMTS
1. Wired connection at the working desk2. Moving Indoor3. Moving Outdoor4. Moving into a hot-spot
Tor K Moseng, Handoff in Wireless Internet Access
EthernetEthernet
WiFi
UMTS
Ethernet
WiFi
UMTS
Ethernet
WiFi
UMTS
Ethernet
WiFi
UMTS
7
Mobile IP - Introduction
•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.
8
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.•A mobile node has two addresses - a permanent home address and a care of address(CoA), which is associated with the network the mobile node is visiting.
(Ref.: Wikipedia notes)
Mobile IP – Introduction..cont..
Two kinds of entities comprise a Mobile IP implementation:•A home agent - stores information about mobile nodes whose permanent home address is in the home agent's network.•A foreign agent - stores information about mobile nodes visiting its network. Foreign agents also advertise care-of addresses, which are used by Mobile IP. Home agent redirects packets towards the remote address through an IP tunnel by encapsulating the datagram with a new IP header using
9
IP tunnel by encapsulating the datagram with a new IP header using the care of address (CoA) of the mobile node.When acting as transmitter, a mobile node sends packets directly to the other communicating node, without sending the packets through the home agent, using its permanent home address as the source address for the IP packets. This is known as triangular routing.
If needed, the foreign agent could employ reverse tunneling by tunneling the mobile node's packets to the home agent, which in turn forwards them to the communicating node.
Why Mobile IP
� Routing
� based on IP destination address, network prefix (e.g. 129.13.42) determines physical subnet
� change of physical subnet implies change of IP address to have a topological correct address (standard IP) or needs special entries in the routing tables
� Specific routes to end-systems?
10
� Specific routes to end-systems?
� change of all routing table entries to forward packets to the right destination
� does not scale with the number of mobile hosts and frequent changes in the location, security problems
� Changing the IP-address?
� adjust the host IP address depending on the current location
� almost impossible to find a mobile system, DNS updates take to long time
� TCP connections break, security problems
Requirements for Mobile IP• Transparency
– mobile end-systems keep their IP address
– continuation of communication after interruption of link possible
– point of connection to the fixed network can be changed
• Compatibility
– support of the same layer 2 protocols as IP
11
– no changes to current end-systems and routers required
– mobile end-systems can communicate with fixed systems
• Security
– authentication of all registration messages
• Efficiency and scalability
– only little additional messages to the mobile system required (connection typically via a low bandwidth radio link)
– world-wide support of a large number of mobile systems in the whole Internet
Mobile IP: Terminology� Mobile Node (MN)
� system (node) that can change the point of connection to the network without changing its IP address
� Home Agent (HA)� provides several services for the MN and is located in the home network
� system in the home network of the MN, typically a router
� registers the location of the MN, tunnels IP datagrams to the COA
Foreign Agent (FA)
12
� Foreign Agent (FA)� system in the current foreign network of the MN, typically a router
� forwards the tunneled datagrams to the MN, typically also the default router for the MN
� Care-of Address (COA)� address of the current tunnel end-point for the MN (at FA or MN)
� actual location of the MN from an IP point of view
� can be chosen, e.g., via DHCP
� Correspondent Node (CN)� at least one partner is needed - communication partner, it represents the
partner for the MN.
•Home network – is the subnet the MN belongs to with respect to its
IP address. Home address of a mobile device is the IP address
assigned to the device within its home network.
•Foreign network is the current subnet the MN visits and which is
not the home network.
•Care-of address of a mobile device is the network-native IP
address of the device when operating in a foreign network.
Mobile IP: Terminology....cont...
13
address of the device when operating in a foreign network.
•Home agent is a router on a mobile node’s home network which
tunnels datagrams for delivery to the mobile node when it is away
from home. It maintains current location (IP address) information for
the mobile node. It is used with one or more foreign agents.
•Foreign agent is a router that stores information about mobile
nodes visiting its network. Foreign agents also advertise care-of-
addresses which are used by Mobile IP.
•Binding - association of the home address with a care-of address.
Example network
router
HA
MN
14
mobile end-systemInternet
router
routerend-system
FA
home network
foreign
network
(physical home network
for the MN)
(current physical network
for the MN)
CN
Data transfer to the mobile system
HA
MN2
Triangular
15
1. Sender sends to the IP address of MN,
HA intercepts packet
2. HA tunnels packet to COA, here FA,
by encapsulation
3. FA forwards the packet to the MN
Internethome network
foreign
networkFA
receiver
1
3
sender
CN
Data transfer from the mobile system
HA
MN
home network sender
1
16
1. Sender sends to the IP address
of the receiver as usual,FA works as default router
Internet
receiver
FA
home network
foreign
network
sender
CN
CN
router
HA
router
FA
Internet
router
home
networkMN
foreign
network
COA 1. CN wants to send an IP packet to the MN. CN does not need to know anything about the MN’s current location.
2. It sends the packet as usual to the IP address of MN
3. Internet routes the packet to the router responsible for the home network of
MN
Data transfer to the mobile system
17
CN
router
HA
router
FA
Internet
router
1.
2.
3.
home
networkMN
foreign
network
4.
MN4. HA intercepts the packet
and encapsulates and tunneled to the CoA. A new header is put in front of the old IP header
5. FA decapsulates the packet and forwards the original packet with CN as source address and MN as destination address to the MN
Mobile Phone network routingCall set-up
• MS emits beacon:
• IMSI/IMEI unique ID
• beacon heard by BTS
• BTS → BSC → MSC
• MSC:
During call
• Hand-off:
• within area: BTS → BTS
• between areas: BSC → BSC, MSC informed of move to different area
18
• MSC:
• HLR
• VLR
• updates HLR/VLR
• if VLR updated, sends info
to home network for MS
• Network always knows location of MS
• MSC → MSC: updates to
HLR/VLR
• Call maintained during hand-off:
• only last-hop link
• Transparent to user:
• momentary signal loss(?)IMSI: international mobile subscriber identity, MS – Mobile station
IMEI: international mobile equipment identity, MSC – Mobile Services Switching Centre
Mobile IP (1)• Need to support mobileusers:
• Transparency:
• to upper layers
• to remote end-systems
• IPv4: IP address indicates
• Mobile host (MH):
• home network (HN), home agent (HA)
• foreign network (FN),
•foreign agent (FA)
• care-of-address (CoA)
• Communication:
19
• IPv4: IP address indicates
point of attachment toNetwork
• Movement of host means:
• new IPv4 address?
• update routing information?
• Communication:
• HA sends packets to CoA:
IP-in-IP encapsulation
• must reply to ARP for MH
• CoA:
• may be new IP address
• foreign agent
Mobile IP (2)
1) MH arrives at FN, and locates FA (using agent advertisements from FA or by solicitation).
2) MH completes registration procedure with FA.
3) MH updates HA with its new CoA (i.e. the FA).
4) Host A now tries to contact MH. Packets for MH are
20
4) Host A now tries to contact MH. Packets for MH are intercepted by HA
5) HA tunnels the packets from Host A to the CoA for MH (i.e. the FA)
6) The FA de-encapsulates the inner IP packet and transmits the packet locally to MH.
7) The packets from MH to Host A are sent directly from the FN.
Mobile IP (3)
X Security:
• firewalls have to be (dynamically) configured
• authentication:
MH ⇔ FN(?), FA ⇔ HA(?)
√ Transparent to non-mobile hosts
√ Does not break/change existing IP addressing and routing
√ Can be introduced into the network as required
√ Normal (unicast) routers do not
21
MH ⇔ HA
• end-to-end security?
X Hand-off between FAs or FA/HA:
• lost packets(?)
√ Normal (unicast) routers do not need to be modified
X Asymmetric routing:
Packets flowing in i.e. TCP connections flow through different routes to different directions.
• could be inefficient
• QoS
• higher layer protocol operation(e.g. TCP)
� Agent Advertisement� HA and FA periodically send advertisement messages into their physical
subnets
� MN listens to these messages and detects, if it is in the home or a foreign network (standard case for home network)
� MN reads a COA from the FA advertisement messages
� Registration (always limited lifetime!)� MN signals COA to the HA via the FA, HA acknowledges via FA to MN
Network Integration
22
� MN signals COA to the HA via the FA, HA acknowledges via FA to MN
� these actions have to be secured by authentication
� Advertisement� HA advertises the IP address of the MN (as for fixed systems), i.e. standard
routing information
� routers adjust their entries, these are stable for a longer time (HA responsible for a MN over a longer period of time)
� packets to the MN are sent to the HA,
� independent of changes in COA/FA
Registration
MN HAMN FA HA
23
t
t
Handoffs: layer 2 versus Layer 3
Layer 2• No global changes:
• only local last hop
• No routing at layer 2
• No global addressing
Layer 3
• Global, end-system to end-system connectivity
• Addresses have global significance
• Change in layer 3 address is change
Register an FA only
Register a new IP
24
• No global addressing
significance at layer 2
• Need to have same layer 2
technology across network
• Mobility within network:
• no hand-off between network technologies
• Change in layer 3 address is change to network
• Layer 3 address valid across different layer 2 technologies
• Mobility across networks:
• internetworking!
TCP behaviour (1)
Problems
• Layer 2 cell hand-off:
• data loss /corruption (also due to high BER in general)
• no ACK for data
• TCP:
25
• TCP:
• no ACK → slow start
• TCP has degraded performance
• High BER on wireless link (~10-3 - ~10-4 common):
• corrupt data requires end-to-end re-tx (use layer 2 FEC)
• Affects other transport-layer or application-layer protocols:
• real-time applications – errors and packet loss are harmful
TCP behaviour (2)Possible solutions• TCP SACK option: (selective acknowledgment)
• retransmission of missing “holes” in byte stream
• not always implemented
• Use ECN in IP: (explicit congestion notification)
• need to modify TCP interface and applications
26
• need to modify TCP interface and applications
• Link-local re-tx:
• on wireless hop
• need to hold TCP, e.g. at base station
• need re-tx protocol
• Soft hand-off at layer 2: (a cell phone is simultaneously connected to two or more cells during a call.)
• need to use CDMA, which has its own problems
Encapsulation
original IP header original data
new datanew IP header
inner header original dataouter header inner header original data
27
Encapsulation is the mechanism of taking a packet consisting of packet header and data and putting it into the data part of a new packet.The reverse operation, taking a packet out of the data part of another packet, is called decapsulation.
Encapsulation I� Encapsulation of one packet into another as payload
� e.g. IPv6 in IPv4 (6Bone), Multicast in Unicast (Mbone)
� here: e.g. IP-in-IP-encapsulation, minimal encapsulation or GRE (Generic Record Encapsulation)
� IP-in-IP-encapsulation (mandatory, RFC 2003)
� tunnel between HA and COA
28
Care-of address COAIP address of HATTLIP identification
IP-in-IP IP checksumflags fragment offsetlengthDS (TOS)ver. IHL
IP address of MNIP address of CNTTLIP identification
lay. 4 prot. IP checksumflags fragment offsetlengthDS (TOS)ver. IHL
TCP/UDP/ ... payload
Encapsulation II
� Minimal encapsulation (optional)
� avoids repetition of identical fields
� e.g. TTL, IHL, version, DS (RFC 2474, old: TOS)
� only applicable for unfragmented packets, no space left for fragment identificationspace left for fragment identification
29
care-of address COAIP address of HATTLIP identification
min. encap. IP checksumflags fragment offsetlengthDS (TOS)ver. IHL
IP address of MNoriginal sender IP address (if S=1)
Slay. 4 protoc. IP checksum
TCP/UDP/ ... payload
reserved
Generic Routing Encapsulation (GRE)
originalheader
original data
new datanew header
outer headerGRE header
original dataoriginalheader
TTLIP identification
GRE IP checksumflags fragment offset
lengthDS (TOS)ver. IHL
RFC 1701
An example:
Care-of address COA
IP address of HATTL GRE IP checksum
IP address of MNIP address of CN
TTL
IP identification
lay. 4 prot. IP checksum
flags fragment offsetlengthDS (TOS)ver. IHL
TCP/UDP/ ... payload
routing (optional)sequence number (optional)
key (optional)offset (optional)checksum (optional)
protocolrec. rsv. ver.C R K S s
RFC 2784
reserved1 (=0)checksum (optional)protocolreserved0 ver.C
30
Optimisation of packet forwarding� Triangular Routing
� CN to HA, HA to CoA/MN, and MN back to CN
� sender sends all packets via HA to MN
� higher latency and network load (for each RTT)
� “Solutions”
� sender learns the current location of MN (give away your position!)
� direct tunneling to this location
� HA informs a sender about the location of MN
� big security problems!
� Change of FA
� packets on-the-fly during the change can be lost
� new FA informs old FA to avoid packet loss (chaining), old FA now forwards remaining packets to new FA
� this information also enables the old FA to release resources for the MN
31
Change of the foreign agent with the optimized mobile IP
CN HA FAold FAnew MNrequest
updateACK
Direct tunneling is used. HA only provides information about FA
32
t
ACK
data data
MN changes
locationregistration
updateACKdata
data datawarning
update
ACKdata
data
registration
Reverse Tunneling (RFC 2344)
•Mobile Internet Protocol (IP) uses tunneling from the home agent to the mobile node's care-of address, but rarely in the reverse direction.
•Usually, a mobile node sends its packets through a router on the foreign network, and assumes that router on the foreign network, and assumes that routing is independent of source address.
•When this assumption is not true (it is not feasible or desired to have the mobile node send datagrams directly to the internetwork using FA), it is convenient to establish a topologically correct reverse tunnel from the care-of address to the home agent.
33
Reverse tunneling:
HA
MN2
34
Internet
receiver
FA
home network
foreign
network
sender
3
1
3. HA forwards the packet to the
receiver (standard case)
CN
1. MN sends to FA
2. FA tunnels packets to HA
by encapsulation
Mobile IP with reverse tunneling
� Router accept often only “topological correct“ addresses (firewall!)
� a packet from the MN encapsulated by the FA is now topological correct
� furthermore multicast and TTL problems solved (TTL in the home network correct, but MN is to far away from the receiver)
Reverse tunneling does not solve� Reverse tunneling does not solve
� problems with firewalls, the reverse tunnel can be abused to circumvent security mechanisms (tunnel hijacking)
� optimization of data paths, i.e. packets will be forwarded through the tunnel via the HA to a sender (double triangular routing)
� The standard is backwards compatible
� the extensions can be implemented easily and cooperate with current implementations without these extensions
� Agent Advertisements can carry requests for reverse tunneling35
Triangular Routing(Recap)
Home Network
CNCN
Foreign Network
MNMN 36
Routing Optimization(Recap)
Foreign Network
Home Network NetworkNetwork
Internet
CNCN
MNMNFirst attempt
Binding Information
Direct Transmission
37
Routing Optimization (Recap)
Home CNCN
TransmissionBinding Information
Foreign Network
Home Network
MNMN
Optimized route
38
Reverse Tunnelling (Recap)
Foreign Network
Home Network
2
3
NetworkNetworkInternet
CNCN
MNMN14
39
Summary
•Mobile IP:
• Why Mobility required and how is it achieved?
• Mobile IP terminology and use
• Encapsulation and Network integration
• Routing techniques in mobile IP
40
• Routing techniques in mobile IP
� Triangular Routing
� Reverse Tunnelling
� Routing Optimisation