Download - Mobile IPv4
Mobile IPv4
Folien von Dr. Hannes Hartenstein
NEC Europe Ltd., Heidelberg
Sowie Prof. Dr. Schiller
TU Berlin
May 2001 H. Hartenstein: MobileIPv4 2
Motivation
• Erfolg der Mobilkommunikation, insb. GSM– Sehr gute Mobilitätsunterstützung.– Im wesentlichen nur Sprachdienst.
• Erfolg des Internet– Original-Design für festes Netz.– ‘Vielzahl’ von Datendiensten, hohe Flexibilität.
• Erfolg der Miniaturisierung (Laptops, PDAs ...)• Derzeit: Konvergenz-Trend zu ‘Mobile
Internet’: allgegenwärtiger Zugang zum Internet ‘anywhere, anytime, always on.’
May 2001 H. Hartenstein: MobileIPv4 3
Wunschzettel Mobile Internet
• Kostengünstige Datenübertragung.• Effiziente Datenübertragung. • Mobilität - nicht nur Portabilität.• Mobilitätsunterstützung unabhänging von der
Luftschnittstelle bzw. der Zugangstechnologie.
backbone
UTRAN GPRS WLAN wireline Hiperlan
seamless mobility
May 2001 H. Hartenstein: MobileIPv4 4
Warum keine Mobilität mit (Standard) IP?
R
10.1.1.x
10.2.2.x
All packets with dest.10.2.2.x go here!
All packets with dest.10.1.1.x go here!
10.1.1.1
May 2001 H. Hartenstein: MobileIPv4 5
Vorteil Mobilitäts-Management auf L3
• Generische Mobilitäts-Unterstützung, die dem mobilen Benutzer ein ‘Roaming’ zwischen– verschiedenen Netzbetreibern– festen und drahtlosen Netzen– öffentlichen und privaten Netzen– verschiedenen Zugangstechnologien
erlaubt.
May 2001 H. Hartenstein: MobileIPv4 6
MobileIPv4
• MobileIPv4: beschrieben in RFC 2002 IP Mobility Support (C. Perkins, ed.), 1996
• entwickelt von der IETF Working Group on MIP
“Mobile IP is a modification to IP that allows
nodes to continue to receive datagrams
no matter where they happen to be
attached to the Internet.”
May 2001 H. Hartenstein: MobileIPv4 7
Analogie: Nachsendeantrag
NEC Europe Ltd.
TO
Max Mayer
Privat Street 10
75646 Athome
NEC Europe Ltd.
TO
Max Mayer
c/o Emilia Neugier
10000 Away
Absender verwendet bekannte Adresse
Post adressiert Brief neu
Vermieterin liefert Brief aus
May 2001 H. Hartenstein: MobileIPv4 8
MobileIPv4: Care-of Address
• IP Adresse hat zwei Funktionen:– eindeutige Identifizierung– topologische Information
• Mobile IP: ein Mobile Node (besser: eines seiner Interfaces) hat zwei IP Adressen:– eine home address (feste Adresse)– eine care-of address (COA) abhängig vom ‘point of
attachment’– Also: die zwei Funktionen werden separiert.
May 2001 H. Hartenstein: MobileIPv4 9
MobileIPv4: Terminologie
(MN) Knoten, der den Ort des Netzanschlusses wechseln kann.
(HA) Einheit im „Heimatnetz“ des MN, typischerweise Router;
verwaltet Aufenthaltsort des MN, tunnelt IP-Datagramme zur COA
(FA) Einheit im momentanen „Fremdnetz“ des MN, typischerweise Router;
weiterleiten der getunnelten Datagramme zum MN, stellt meist auch default-Router für den MN dar, stellt COA zur Verfügung.
Mobile NodeMobile Node
Home AgentHome Agent
Foreign AgentForeign Agent
[optional]
May 2001 H. Hartenstein: MobileIPv4 10
Beispiel-Szenario
Internet
Router
Router
Router
Endgerät
FA
HA
MN
Heimatnetz
Fremdnetz
(physikalisches HeimatSubnetz für MN)
(aktuelles physikalisches Subnetz für MN)
CN
May 2001 H. Hartenstein: MobileIPv4 11
Tunnels & Kapselung
• Tunnel allgemein: viritueller Punkt-zu-Punkt Link.
aus: Tanenbaum, Computer Networks.
May 2001 H. Hartenstein: MobileIPv4 12
Kapselung: IP-in-IP
• IP-in-IP-Kapselung (v4) verpflichtend im Mobile IPv4 Standard, RFC 2003 (Perkins)– Tunnel zwischen HA und COA
Care-of Adresse COAIP-Adresse des HAs
TTLIP-Identifikation
IP-in-IP IP-PrüfsummeFlags Fragment Offset
GesamtlängeTOSVer. IHL
IP-(Heimat)-Adresse des MNsOriginale Sender IP-Adresse des CNs
TTLIP-Identifikation
Schicht 4-Protokoll IP-PrüfsummeFlags Fragment Offset
GesamtlängeTOSVer. IHL
TCP/UDP/ ... Nutzlast
May 2001 H. Hartenstein: MobileIPv4 13
Kapselung: Minimale Kapselung• Minimale Kapselung (Perkins, RFC 2004) optional in Mobile IPv4
– vermeidet die Wiederholung gleicher Felder– z.B. TTL, IHL, Version, TOS– kann nur bei unfragmentierten Paketen eingesetzt werden, da
nun kein Platz mehr für eine Fragmentkennung vorgesehen ist
Care-of Adresse COA
IP-Adresse des HAs
TTL
IP-Identifikation
Min. Encap. IP-Prüfsumme
Flags Fragment Offset
GesamtlängeTOSVer. IHL
IP-Adresse des MNs
Originale Sender IP-Adresse (falls S=1)
SSchicht-4-Protokoll IP-Prüfsumme
TCP/UDP/ ... Nutzlast
reserviert
May 2001 H. Hartenstein: MobileIPv4 14
Datentranfer im Foreign Agent Modus
• Foreign Agent: Router im aktuellen Netz vom MN
• FA stellt COA zur Verfügung
• MN ist auf Schicht 2 mit FA verbunden
• FA ist das Ende des Tunnels (HA-FA)
home network 10.1.7.x
192.168.102.100
10.1.7.122; uses192.168.102.100 as COA
HA
FA FA
CN
INET
MN
May 2001 H. Hartenstein: MobileIPv4 15
Datentransfer im Co-COA Modus
• Kein FA: FA-Funktionalität im MN
• MN ist das Ende des Tunnels
• MN benötigt topologisch korrekte COA, z.B. durch DHCP
HA
CN
INET
MN
DHCP
10.1.7
192.168.102
10.1.7.122; gets192.168.102.202 from DHCP Server
May 2001 H. Hartenstein: MobileIPv4 16
Datentransfer vom Mobilrechner
Internet
Empfänger
FA
HA
MN
Heimatnetz
Fremdnetz
Sender
1
1. Sender sendet ganz normal an IP-Adresse des Empfängers, FA dient als Standard-Router
CN
May 2001 H. Hartenstein: MobileIPv4 17
Bislang ...
• ... haben wir uns auf den Datentransfer beschränkt.• Mobile IP führt zu ‘triangle routing’
– nicht optimal!– vergrössert Ende-zu-Ende Verzögerung.
• Zwei Szenarien: mit und ohne FAs– Vorteil FA: Tunnel Endpunkt im Zugangsnetz.– Vorteil co-COA: Keine Abhängigkeit von FAs.
May 2001 H. Hartenstein: MobileIPv4 18
MobileIPv4: Signalisierung
• Wie findet der MN einen FA oder HA?• Wie informiert der MN den HA über den derzeitigen
Aufenthaltsort?
• Im wesentlichen zwei Gruppen von Nachrichten:
– Agent discovery• Router solicitation
• FA advertisements
– Registration
May 2001 H. Hartenstein: MobileIPv4 19
Agent Discovery• Basiert auf ICMP (RFC 792) und ICMP router discovery (RFC 1256)• Solicitation: ICMP router solicitation message• Agent advertisement: ICMP router advertisement + mobility agent
advertisement extension:
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Registration Lifetime |R|B|H|F|M|G|V| reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | zero or more Care-of Addresses | | ... |
• Type: 16; Length: (6+4*N), N number of care-of addresses; seq. number...• Registration Lifetime (in seconds): time the agent is willing to accept any
registrations• Registration required; Busy; Home agent; Foreign agent; Minimum enc.; GRE
enc.; Van Jacobson header compression
May 2001 H. Hartenstein: MobileIPv4 20
Registration
HA
Registration Request
Registration Reply
FA mode:
Co-COA mode:
May 2001 H. Hartenstein: MobileIPv4 21
Registration Request/Reply 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type |S|B|D|M|G|V|rsv| Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Home Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Home Agent | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Care-of Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Identification + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Extensions ... +-+-+-+-+-+-+-+- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Code | Lifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Home Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Home Agent | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Identification + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Extensions ... +-+-+-+-+-+-+-+-
wird alsUDP Packetgesendet(Dest. Port434)
May 2001 H. Hartenstein: MobileIPv4 22
Registration Request• Type 1 (registration request)
• S simultaneous bindings (HA retain its prior mobility bindings)
• B broadcast datagrams
• D decapsulation (mobile node is using a colocated care-of-addr.)
• M minimal encapsulation • G GRE encapsulation
• V Van Jacobsen header compression
• rsv reserved bits; send as 0, ignored on reception
• Lifetime seconds remaining before the registration expires.
• Home Address IP address of the mobile node
• Home Agent IP address of the mobile node‘s home agent
• Care-of Adress IP address for the tunnel endpoint
• Identification 64-bit number for authentication
• Extensions what follows the fixed portion of registration request
May 2001 H. Hartenstein: MobileIPv4 23
Sicher registrieren
• Für die Registrierung muss folgendes gewährleistet sein:– Authentication, data integrity
– Replay protection
• Mobile IP verwendet Message Digest 5 (MD5) mit Schlüssellänge128 (in prefix-suffix mode).
• HA und MN muessen ‘security association’, MN und FA bzw. FA und HA koennen SA haben.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | SPI .... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... SPI (cont.) | Authenticator ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
AuthenticationExtension Format
May 2001 H. Hartenstein: MobileIPv4 24
Replay Protection
• Timestamps (obligatorisch)– Knoten benötigen
synchronisierte Uhren.– Identification field beinhaltet
Tageszeit nach NTP Format.– Empfänger vergleicht Ident field
mit eigener Uhr.– Falls ‘zuweit’ auseinander:
ident. mismatch.
• Nonces (optional)– Knoten benötigen anständigen
Zufallsgenerator.
MN HA(HA-nonce-1, don’t-care)
(HA-nonce-1, MN-nonce-1)
(HA-nonce-2, MN-nonce-1)
(HA-nonce-2, MN-nonce-2)
(HA-nonce-3, MN-nonce-2)
Nonce synchronization:
May 2001 H. Hartenstein: MobileIPv4 25
Die IP-MAC Adressen Abbildung
• ARP caches müssen ‘up-to-date’ gehalten werden.• Wenn der MN nicht zu Hause ist: HA muss ARP
requests ‘im Auftrag’ des MNs beantworten, um Packete zu sich zu leiten.– proxy arp.
• Wenn der MN wieder nach Hause kommt, müssen Link-Nachbarn (einschl. HA) informiert werden– gratuitous arp.
May 2001 H. Hartenstein: MobileIPv4 26
Dynamic Host Configuration Protocol• Anwendung
– Vereinfachung der Installation und Verwaltung von vernetzten Rechnern
– liefert Rechnern notwendige Informationen über IP-Adresse, DNS-Server-Adresse, Domain-Namen, Subnetz-Masken, Router etc.
– damit weitgehend automatische Integration eines Rechners in das Internet bzw. Intranet
• Client/Server-Modell– ein Client sendet via MAC-Broadcast eine Anfrage an einen
DHCP-Server
Client Relay
ClientServer
DHCPDISCOVER
DHCPDISCOVER
May 2001 H. Hartenstein: MobileIPv4 27
DHCP - ProtokollmechanismenClient
Zeit
Server(nicht ausgewählt)
Server(ausgewählt)Initialisierung
Sammeln der Antworten
Auswahl der Konfiguration
Initialisierung komplett
Geregelter Abbau
Bestätigung der Konfiguration
Löschen des Kontext
Bestimmung derKonfiguration
DHCPDISCOVER
DHCPOFFER
DHCPREQUEST(reject)
DHCPACK
DHCPRELEASE
DHCPDISCOVER
DHCPOFFER
DHCPREQUEST(Optionen)
Bestimmung derKonfiguration
May 2001 H. Hartenstein: MobileIPv4 28
Diskussion: MobileIPv4 vs OSI Model
Physical
Data Link
Network
Transport
Signaling
ApplicationPresentation
Session
Physical
Data Link
Network
Transport
Signaling
ApplicationPresentation
Session
May 2001 H. Hartenstein: MobileIPv4 29
Diskussion: ‘Triangle Routing’
• Kein ‘kürzester Pfad Routing’:– erhöhte Ende-zu-Ende Verzögerung.– erhöhte Netzlast.
• HA is ‘single point of failure’ etc.• Lösungsansatz: Route optimization (Internet
draft)– CN lernt den gegenwärtigen Aufenthaltsort durch
HA oder MN.– CN tunnelt direkt zur COA.
May 2001 H. Hartenstein: MobileIPv4 30
Diskussion: MIPv4 und Firewalls
• MN verwendet home address als source address.• Ingress filtering akzeptiert dies nicht in einem
fremden Netz.– Ingress filtering (RFC 2827) hilft gegen ‘spoofing attacks’.
• Ähnliches Problem wenn man ins Heimatnetz kommunizieren möchte!
• Lösungsansatz: Reverse Tunneling (RFC 2344)– Nachteil: triangle routing wird quadrilateral routing.
• Firewalls im Fremdnetz und Heimatnetz!• Perkins ‘96: “...This might mean that nomadic users
would have to contact their home administrator, and the administrator of any site they might visit, to get special permission ... at the firewall.”