Download presentation
Presentation is loading. Please wait.
Published byElaine Davis Modified over 9 years ago
1
Module E Mobile Network Layer J.-P. Hubaux, N. Vratonjic, M. Poturalski, I. Bilogrevic Mobile Networks http://mobnet.epfl.ch Some slides addapted from Jochen H. Schiller (www.jochenschiller.de) 1
2
2 Enablers of IP mobility Mobile end systems Laptops PDAs Smart-phones … Wireless technologies Wireless LANs (IEEE 802.11) Bluetooth (www.bluetooth.com)www.bluetooth.com Improved batteries (longer lifetime)
3
Problem with IP mobility 3 mail.epfl.ch Assign a new IP address via DHCP IP1 IP2 Need to establish a new TCP connection, old connection broken
4
IP mobility and cellular networks mail.epfl.ch GPRS (or EDGE or UMTS) tunnel IP link Assign IP address Tunnel IP packets Always in the path Assign a new IP address via DHCP IP1 IP2 IP1 4 Possible solution: Generic Access Network (GAN) a.k.a. Unlicensed Mobile Access (UMA)
5
TCP/IP was not designed for mobility Change of IP address means disconnection of the application TCP interprets dropped packets (channel errors, disconnections) as congestion More on this issue in Module F Limitations due to a fundamental design problem The IP address (network layer) has a dual role Network locator (topological point of attachment) for routing purposes Host identifier (unique for a host and TCP/IP stack) 5
6
6 Routing in the Internet Routing is based on the destination IP address Network prefix (e.g. 129.13.42) determines physical subnet Change of physical subnet implies change of IP address (standard IP) The new IP address needs to be topologically correct (belong to the new subnet) to be routable Changing the IP address according to the current location DHCP provides plug-and-play address update Number of drawbacks: Almost impossible to locate a mobile system; long delays for DNS updates TCP connections break Security problems
7
7 Update routing tables? Quick ‘solution’ Keep IP address constant Update routing tables to forward packets to the right location Not feasible Does not scale with number of mobile hosts and frequent changes in location Routers are designed for fast forwarding, not fast updates Routers have limited memory (cannot store separate entry for every mobile host) Route updates consume network throughput Security problems
8
Two main solutions Mobile IP Support mobility transparently to TCP and applications Rely on existing protocols Host Identity Protocol (HIP) A new layer between IP and transport layers Architectural change to TCP/IP structure 8
9
Mobile IP
10
10 Requirements to Mobile IP Transparency Mobile end-systems (hosts) keep their IP address Maintain communication in spite of link breakage Enable change of point of connection to the fixed network Compatibility Support the same Layer 2 protocols as IP No changes to current end-systems and routers 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 may be over a low-bandwidth radio link) World-wide support of a large number of mobile systems
11
11 Terminology Mobile Node (MN) Entity (node) that can change its point of connection to the network without changing its IP address Home Agent (HA) Entity in the home network of the MN, typically a router Registers the MN location, encapsulates and tunnels IP packets to the COA Foreign Agent (FA) System in the current foreign network of the MN, typically a router Decapsulates and forwards the tunneled packets to the MN Care-of Address (COA) Address of the current tunnel end-point for the MN Foreign Agent COA or Co-located COA (no FA, MN performs decapsulation) Actual location of the MN from an IP point of view Co-located COA typically acquired via DHCP Correspondent Node (CN) Communication partner
12
Data transfer to the mobile node: Internet sender FA HA MN home network foreign network receiver 1 2 3 1. Sender sends to the IP address of MN, HA intercepts packet (proxy ARP) 2. HA tunnels packet to COA, here FA, by encapsulation 3. FA forwards the packet to the MN CN 12
13
Data transfer with co-located COA Internet sender HA MN home network foreign network receiver 1 1. Sender sends to the IP address of MN, HA intercepts packet (proxy ARP) 2. HA tunnels packet to co-located COA (MN) by encapsulation 3. MN decapsulates and (internally) delivers packet to home address CN 2 3 13
14
Data transfer from the mobile node Internet receiver FA HA MN home network foreign network sender 4. Sender sends to the IP address of the receiver as usual, FA works as default router 4 CN 14
15
Mobile IP mechanisms Agent Discovery MN discovers its location (home network, foreign network) MN learns a COA Registration MN securely signals the COA to the HA (via the FA) Tunneling HA encapsulates IP packets from CN and sends them to the COA FA (or MN) decapsulates these packets and sends them to the MN 15
16
Agent discovery 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 Agent Solicitation MN can request an Agent Advertisement message with a Agent Solicatation message Helps decrease disconnection time Simple extension of ICMP Router Discovery (ICMP: Internet Control Message Protocol) Other mechanisms can be used to discover the network and the COA (e.g. DHCP) 16
17
type = 16 length = 6 + 4 * #COAs R: registration required B: busy, no more registrations H: home agent F: foreign agent M: minimal encapsulation G: GRE (Generic Routing Encapsulation) r: =0, ignored (former Van Jacobson compression) T: FA supports reverse tunneling reserved: =0, ignored Agent advertisement preference level 1 router address 1 #addresses type addr. sizelifetime checksum COA 1 COA 2 type = 16sequence numberlength 0 781516312423 code preference level 2 router address 2... registration lifetime... RBHFMGr reserved T RFC 1256 17
18
18 Registration 1. Registration request 2. Registration request 4. Registration reply 5. Registration reply 3. If OK, sets up the binding Mobile Node (COA) Home address COA Registration lifetime Mobility Binding Home Agent Foreign Agent Note: with co-located COA, MN sends registation request directly to HA Note: HA can allow for multiple simultanous mobilty bindings. In that case, a packet from CN is forwarded to all active COAs Note: HA can allow for multiple simultanous mobilty bindings. In that case, a packet from CN is forwarded to all active COAs
19
Mobile IP registration request home agent home address type = 1lifetime 0 781516312423 T x identification COA extensions... SBDMGr S: simultaneous bindings B: broadcast datagrams D: decapsulation by MN M: mininal encapsulation G: GRE encapsulation r: =0, ignored T: reverse tunneling requested x: =0, ignored identification: generated by MN, used for matching requests with replies and preventing replay attacks (must contain a timestame and/or a nonce) extensions: mobile-home authentication extension (mandatory) mobile-foreign authentication extension (optional) foreign-home authentication extension (optional) UDP message 19
20
Mobile IP registration reply home agent home address type = 3lifetime 0 78151631 code identification extensions... Example codes: registration successful 0 registration accepted 1 registration accepted, but simultaneous mobility bindings unsupported registration denied by FA 65 administratively prohibited 66 insufficient resources 67 mobile node failed authentication 68 home agent failed authentication 69 requested Lifetime too long registration denied by HA 129 administratively prohibited 131 mobile node failed authentication 133 registration Identification mismatch 135 too many simultaneous mobility bindings UDP message 20
21
Security associations and registration keys Usually, there is a security association (SA) between the home agent (HA) and the mobile node (MN) Possible techniques to establish a registration key between the mobile node and the foreign agent (FA): Make use of Internet Key Exchange (IKE), if available If HA and FA share a SA, the HA can provide the registration Make use of the public key of the FA or of the MN Diffie-Hellman key exchange protocol between FA and MN 21 Mobile Node Home Agent Foreign Agent
22
22 Tunneling Mobile Node Home Agent CNMN Src Dest Payload abcdefghij 1 Binding Foreign Agent Correspondent Node Src Dest 2 HA COA Encapsulated datagram Src Dest Payload CNMN abcdefghij 3 CNMN Src Dest Payload abcdefghij
23
IP-in-IP encapsulation IP-in-IP-encapsulation (RFC 2003, updated by RFCs 3168, 4301, 6040) Care-of address COA IP address of HA TTL IP identification IP-in-IPIP checksum flagsfragment offset lengthDS (TOS)ver.IHL IP address of MN IP address of CN TTL IP identification lay. 4 prot.IP checksum flagsfragment offset lengthDS (TOS)ver.IHL TCP/UDP/... payload 23 IHL: Internet Header Length TTL: Time To Live DS: Differentiated Service TOS: Type of Service
24
Minimal encapsulation Minimal encapsulation (optional) avoids repetition of identical fields e.g. TTL, IHL, version, DS (RFC 2474, old: TOS) only applicable for non fragmented packets, no space left for fragment identification care-of address COA IP address of HA TTL IP identification min. encap.IP checksum flagsfragment offset lengthDS (TOS)ver.IHL IP address of MN original sender IP address (if S=1) Slay. 4 protoc.IP checksum TCP/UDP/... payload reserved 24
25
Generic Routing Encapsulation original header original data new datanew header outer header GRE header original data original header Care-of address COA IP address of HA TTL IP identification GREIP checksum flagsfragment offset lengthDS (TOS)ver.IHL IP address of MN IP address of CN TTL IP identification lay. 4 prot.IP checksum flagsfragment offset lengthDS (TOS)ver.IHL TCP/UDP/... payload routing (optional) sequence number (optional) key (optional) offset (optional)checksum (optional) protocolrec.rsv.ver.CRKSs RFC 1701 RFC 2784 (updated by 2890) reserved1 (=0)checksum (optional) protocolreserved0ver.C 25
26
“Triangle” routing Drawbacks Inefficiency MN sends IP packets with topologically incorrect source For security reasons, router can be configured to drop topologically incorrect packets (ingress filtering) Correspondent Node Home Agent Mobile Node Foreign Agent 26
27
Route Optimization in Mobile IP Route optimization HA provides the CN with the current location of MN (FA) CN sends tunneled traffic directly to FA Optimization of FA handover Packets on-the-fly during FA change can be lost New FA informs old FA to avoid packet loss, old FA now forwards remaining packets to new FA This information also enables the old FA to release resources for the MN 27
28
Route and FA handover optimizations CNHAFAMN Request Update ACK Data MN changes location Registration Update FA new 28 ACK Data Warning Request Update ACK Data Warning New request Data
29
Reverse tunneling Internet receiver FA HA MN home network foreign network sender 3 2 1 1. MN sends to FA 2. FA tunnels packets to HA by encapsulation 3. HA forwards the packet to the receiver (standard case) CN 29
30
Mobile IP with reverse tunneling Reverse tunneling solves ingress filtering problem A packet from the MN encapsulated by the FA is now topologically correct Can cope with mobile routers Protects MN location privacy Multicast and TTL problems solved Reverse tunneling does not solve Optimization of data paths Double triangular routing Problems with firewalls The reverse tunnel can be abused to circumvent security mechanisms (tunnel hijacking) 30
31
31 Firewalls Global Internet FW Foreign Domain Correspondent Domain Home Domain Filtering of outgoing packets: discard packets that seem to emanate from an address external to the domain (even if they are tunneled) Filtering of outgoing packets: discard packets that seem to emanate from an address external to the domain (even if they are tunneled) Filtering of incoming packets: Discard packets that seem to emanate from an address internal to the domain (even if they are tunneled) Filtering of incoming packets: Discard packets that seem to emanate from an address internal to the domain (even if they are tunneled) Possible solutions: Manual configuration Isolation of Mobile Nodes (pockets) Possible solutions: Manual configuration Isolation of Mobile Nodes (pockets) Correspondent Node Home Agent Mobile Node Foreign Agent
32
Mobile IP and IPsec Security in Mobile IP Authentication in registration messages No protection of data transmission (tunneling) IPsec provides general IP layer security Can be used to protect data transmission Can also be used in addition/in place of default registration messages authentication 32
33
IPsec: Brief reminder Provides confidentiality, authentication and integrity IPsec support is optional in IPv4, mandatory in IPv6 Security Association (SA) consists of a suite of cryprographic algorithms and keys Security Parameter Index (SPI) is used for indexing SAs 33 Application TCP or UDP IP Data link Application TCP or UDP IP Data link IPsec mechanisms Data link IP Router Security Association
34
IPsec: Authentication Header Provides authentication and integrity Cannot traverse NATs IP addresses authenticated 34 src IPdst IP...payload IP header Input IP packet: src IPdst IPpayload IP header AH transport mode:...SPIseqauth AH src IP’dst IP’ new IP header AH tunnel mode:...SPIseqauth AH IP headerpayload input IP packet - authenticated with auth
35
IPsec: Encapsulating Security Payload Provides confidentiality, authentication and integrity Outer IP header not authenticated 35 src IPdst IP...payload IP header Input IP packet: src IPdst IP...payload IP header ESP transport mode: SPIseqauth ESP ESP tunnel mode: - encrypted - authenticated with auth src IP’dst IP’...input IP packet IP header SPIseqauth ESP
36
Mobile IPv6 Mobile IPv6 introduces several modifications based on new IPv6 functionality and experiences with Mobile IPv4 No FA, COA is always co-located Two modes of operation: Bidirectional tunnel (between HA and COA) Route optimization (MN informs CN about the COA) Security integrated with IPsec (mandatory support in IPv6) “Soft“ hand-over, i.e. without packet loss, between two subnets is supported MN sends the new COA to its old router The old router encapsulates all incoming packets for the MN and forwards them to the new COA 36
37
IP Micro-mobility support Micro-mobility support: Efficient local handover inside a foreign domain without involving a home agent Reduces control traffic on backbone Especially needed in case of route optimization Example: Hierarchical Mobile IP (HMIP) Important criteria: Security Efficiency, Scalability, Transparency, Manageability 37
38
Hierarchical Mobile IPv6 Operation: Network contains mobility anchor point (MAP) mapping of regional COA (RCOA) to link COA (LCOA) Upon handover, MN informs MAP only gets new LCOA, keeps RCOA HA is only contacted if MAP changes Security provisions: No HMIP-specific security provisions Binding updates should be authenticated (AR: Access Router) MAP Internet AR MN AR MN HA binding update RCOA LCOA old LCOA new 38
39
Hierarchical Mobile IP: Security Advantages: Local COAs can be hidden, which provides at least some location privacy Direct routing between CNs sharing the same link is possible (but might be dangerous) Potential problems: Decentralized security-critical functionality (handover processing) in mobility anchor points MNs can (must!) directly influence routing entries via binding updates (authentication necessary) 39
40
Hierarchical Mobile IP: Other issues Advantages: Handover requires minimum number of overall changes to routing tables Integration with firewalls / private address support possible Potential problems: Not transparent to MNs Handover efficiency in wireless mobile scenarios: Complex MN operations All routing reconfiguration messages sent over wireless link 40
41
Mobile IP summary A mobile network layer compatible with the current deployed Internet protocol stack Issues with Mobile IP Security Authentication with FA can be problematic, because the FA typically belongs to another organization Firewalls Typically mobile IP cannot be used together with firewalls, special set-ups are needed QoS Tunneling makes it hard to give a flow of packets a special treatment needed for the QoS 41
42
Host Identity Protocol (HIP) 42
43
Architectural background Two global name spaces in the current Internet: Domain names IP addresses Recall: IP addresses have a dual role 1.Identifiers 2.Locators Duality makes many things difficult 43
44
New requirements to Internet addressing Mobile Hosts Need to change IP address dynamically Multi-interface hosts Have multiple independent addresses Challenge: Mobile and multi-interface hosts Multiple dynamically changing addresses 44
45
HIP: A new global Internet name space Decouples the name and locator roles of IP addresses Architectural change to TCP/IP structure A new layer between IP and transport layers Introduces cryptographic Host Identifiers Integrates security, mobility and multi-homing Opportunistic host-to-host IPsec ESP End-host mobility, across IPv4 and IPv6 End-host multi-address multi-homing, IPv4/v6 IPv4/v6 interoperability for applications 45
46
HIP: A new layer Sockets bound to Host Identities (HIs), not to IP addresses 46 Transport Host Identity IP layer Link Layer Process Host ID IP address
47
HIP bindings 47
48
HIP overview HIP identifiers Establishing a shared context between two host HIP base exchange Data communication By default protected with IPsec ESP Mobility during data communication HIP locator update Finding a host HIP DNS extensions HIP Rendezvous extension Multihoming 48
49
HIP identifiers Host Identifiers (HIs) A host holds a key pair (private and public key) Host Identifier (HI) = public key HI representation: Host Identity Tag (HIT) HIT = h(HI) (h – cryptographic hash function, 128bits) Advantages: Fixed length makes for easier protocol coding and better manages the packet size cost Independent of cryptographic protocols used for public private keys Collision probability (birthday paradox) With 10 12 hosts P(collision) < 1.5∙10 -15 49
50
HIP base exchange Establishes HIP association (addressing part) HI I ↔ IP I ↔ IP R ↔ HI R Used by the HIP layer to map between HIs and IPs 50 I1: IP I, IP R, HIT I, HIT R R1: IP I, IP R, HIT I, HIT R, DH R, HI R, sig, ESP transform, puzzle I2: IP I, IP R, HIT I, HIT R, DH I, HI I, sig, ESP transform, ESP info, solution R2: IP I, IP R, HIT I, HIT R, sig, ESP info Initiator (I)Responder (R)
51
HIP base exchange 51 I1: IP I, IP R, HIT I, HIT R R1: IP I, IP R, HIT I, HIT R, DH R, HI R, sig, ESP transform, puzzle I2: IP I, IP R, HIT I, HIT R, DH I, HI I, sig, ESP transform, ESP info, solution R2: IP I, IP R, HIT I, HIT R, sig, ESP info Initiator (I)Responder (R) DH I/R – Diffie-Hellman key material sig – signature generated with private key of HI I/R Diffie-Hellman generates a shared secret Signatures protect message integrity prove that hosts possess private keys corresponding to their declared HIs
52
HIP base exchange 52 I1: IP I, IP R, HIT I, HIT R R1: IP I, IP R, HIT I, HIT R, DH R, HI R, sig, ESP transform, puzzle I2: IP I, IP R, HIT I, HIT R, DH I, HI I, sig, ESP transform, ESP info, solution R2: IP I, IP R, HIT I, HIT R, sig, ESP info Initiator (I)Responder (R) ESP transform – supported cryptographic suites ESP info – contains the Security Parameter Index (SPI) ESP keys are generated from the Diffie-Hellman secret Full HIP association (basic case): HI I SPI I R SPI R I IP I IP R SPI I R SPI R I HI R
53
HIP base exchange 53 I1: IP I, IP R, HIT I, HIT R R1: IP I, IP R, HIT I, HIT R, DH R, HI R, sig, ESP transform, puzzle I2: IP I, IP R, HIT I, HIT R, DH I, HI I, sig, ESP transform, ESP info, solution R2: IP I, IP R, HIT I, HIT R, sig, ESP info Initiator (I)Responder (R) Cryptographic puzzle mitigates DoS against R Makes HIP base exchange more costly for I than for R R remains stateless until correct I2 arrives R1: R chooses puzzle from a pre-computed pool I computes solution based on puzzle challenge and HITs I2: R verifies solution and only then allocates state for I
54
Mobility with HIP 54 UPDATE(ESP_INFO, LOCATOR, SEQ) UPDATE(ESP_INFO, SEQ, ACK, ECHO_REQUEST) UPDATE(ACK, ECHO_RESPONSE) Mobile Host IP Address 1 Mobile Host IP Address 2 LOCATOR indicates the new IP address and its lifetime ESP_INFO contains old and new SPIs (can be the same) HIP association is updated accordingly: HI M SPI M C SPI C M IP 1... HI M SPI M C SPI C M IP 2... Correspondent Host new
55
Mobility with HIP UPDATE is protected by HMAC and HIP_SIGNATURE UPDATE is explicitly acknowledged (SEQ and ACK numbers) ECHO_REQUEST and ECHO_RESPONSE verify that MH is reachable at the new address No data is sent to new IP if this verification fails Mitigates DoS attacks against new IP 55 UPDATE(ESP_INFO, LOCATOR, SEQ) UPDATE(ESP_INFO, SEQ, ACK, ECHO_REQUEST) UPDATE(ACK, ECHO_RESPONSE) Mobile Host IP Address 1 Mobile Host IP Address 2 Correspondent Host
56
HIP DNS extensions Traditionally DNS maps domain names to IP addresses HIP-enabled DNS in addition can map a domain name to: Host Identifier (HI) Host Identifier Tag (HIT) Rendezvous Server (RVS) 56
57
HIP and DNS: static case 57 FQDN: Fully Qualified Domain Name FQDN SH Correspondent Host Static Host HI SH, HIT SH, IP SH I1: IP CH, IP SH, HIT CH, HIT SH R1: IP CH, IP SH, HIT CH, HIT SH DNS I2: IP CH, IP SH, HIT CH, HIT SH R2: IP CH, IP SH, HIT CH, HIT SH
58
HIP and DNS: mobile case 58 FQDN: Fully Qualified Domain Name FQDN MH Correspondent Host Mobile Host HI MH, HIT MH, IP RVS I1: IP CH, IP RVS, HIT CH, HIT MH R1: IP CH, IP MH, HIT CH, HIT MH DNS I2: IP CH, IP MH, HIT CH, HIT MH R2: IP CH, IP MH, HIT CH, HIT MH RVS I1: IP RVS, IP MH, HIT CH, HIT MH Mobile Host new IP address (details in RFC 5203) UPDATE IP
59
Multihoming with HIP Multihoming: a host has multiple IP interfaces Increases reliability HIP locator update mechanism enables multihoming Multihomed host provides Correspondent with multiple IP adresses (can also idicate a prefered one) More complex HIP associations RFC recommends separate SPI per physical interface 59 HI SPI pair A SPI pair B SPI pair C IP A (preferred) IP B IP C IP D
60
HIP summary New namespace for the Internet between IP and domain names Integrates security, mobility, and multihoming Main disadvantage: Requires update of the transport layer stack on all end hosts Transparent and scalable Applications for HIP Mobile VPN user VoIP (notably handover) Search in peer-to-peer systems Faster WLAN access control Device peering 60
61
Generic Access Network (GAN) Access to cellular networks over unlicensed spectrum technologies (WiFi, Bluetooth) Unlicensed Mobile Access (UMA) is the commercial name 61 http://www.umatechnology.org/overview/
62
GAN Deployment Initial specifications published in 2004 Written by operators and equipment manufacturers Alcatel, British Telecom, Ericsson, Motorola, Nokia, BlackBerry (ex RIM), Siemens, Sony Ericsson, T-Mobile US Today Some major operators use it 62
63
GAN Characteristics AdvantagesDisadvantages Subscribers Better indoor coverage No roaming charges on WiFi when abroad Single “phone” number, single device Seamless handovers WiFi cellular Hassle of initial setup Higher battery usage (WiFi enabled) Operators Increase coverage at modest cost Reduce load on macro- cells Re-use of existing hotspots Extra infrastructure required Cost of support to costumers 63
64
64 References on Mobile IP RFC 1701 - Generic Routing Encapsulation (GRE) RFC 2003 - IP encapsulation within IP RFC 2004 - Minimal encapsulation within IP RFC 3024 - Reverse Tunneling for Mobile IP (revised) RFC 4721 – Mobile IPv4 Challenge/Response Extensions RFC 5944 – IP Mobility Support for IPv4, Revised RFC 6275 – Mobility support for IPv6
65
References on HIP http://www.openhip.org/ RFC 4423 - Host Identity Protocol (HIP) Architecture RFC 5201 - Host Identity Protocol RFC 5202 - Using the Encapsulating Security Payload (ESP) Transport Format with the Host Identity Protocol (HIP) RFC 5203 - Host Identity Protocol (HIP) Registration Extension RFC 5204 - Host Identity Protocol (HIP) Rendezvous Extension RFC 5206 - End-Host Mobility and Multihoming with the Host Identity Protocol RFC 5207 – NAT and Firewall Traversal Issues of Host Identity Protocol (HIP) Communication RFC 6092 – Basic requirements for IPv6 Customer Edge Routers 65
66
66
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.