Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Wireless Networks and Mobile Systems Lecture 9 Mobile Networks: IP Addressing and Mobile IP 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 Networks: IP Addressing and Mobile IP 2 Agenda ● IP addressing ● Node mobility and IP ● Mobile IP ■ Foreign agent discovery ■ Home agent registration ■ Packet delivery through tunneling ■ Route optimization Mobile Networks: IP Addressing and Mobile IP 3 IP Addressing ● IPv4 addresses… ■ Uniquely identify an interface ■ 32 bits long ■ Consist of a network identifier and a host identifier 0 31 Network Identifier Host Identifier ● Routing outside of the destination host’s subnet is usually based on the network identifier, while the host identifier is only used within the destination’s subnet ● IPv6 uses 128-bit addresses Mobile Networks: IP Addressing and Mobile IP 4 Five Classes of IP Addresses ● IP addressing was originally based on five classes of addresses ■ A router can interpret the network and host fields by examining the first few bits of the IP address Class A 01234 0 netid 8 16 24 31 Class B 10 Class C 110 netid Class D 1110 multicast address Class E 1111 reserved for future use hostid netid Mobile Networks: IP Addressing and Mobile IP hostid hostid 5 CIDR ● Classless Inter-Domain Routing (CIDR) was introduced to remedy problems with the rigid classes of IP addresses ■ Defined in RFCs 1517-1520 ● Allows a flexible definition of the boundary between the network identifier and the host identifier ● Example ■ IP address: 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 Mobile Networks: IP Addressing and Mobile IP 6 A Problem With IP Addressing ● An IP address serves two different functions… ■ The name for an interface (host) and ■ The location (subnet) of the interface (host) in the network ● The IP address is the only “name” carried in an IP datagram ■ 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 the datagram and has no meaning once the DNS lookup is completed ● The network identifier in the IP address is used by routers to deliver to the destination subnet ■ The IP address is associated with the location or subnet of the destination host Mobile Networks: IP Addressing and Mobile IP 7 IP Routing ● Router uses routing table to direct packets to the appropriate interface Target 2.0.0.0/24 3.0.0.0/24 4.0.0.0/24 Interface a b c 3.0.0.2 3.0.0.3 4.0.0.5 4.0.0.6 3.0.0.4 b a Dest = 3.0.0.4 Router Mobile Networks: IP Addressing and Mobile IP c 8 Traditional Routing for a Mobile Host ● Host moving to another network is unreachable Target 2.0.0.0/24 3.0.0.0/24 4.0.0.0/24 Interface a b c 3.0.0.2 3.0.0.3 b X a Dest = 3.0.0.4 Router c Mobile Host 4.0.0.5 Mobile Networks: IP Addressing and Mobile IP 3.0.0.4 4.0.0.6 3.0.0.4 9 Definitions ● Home link – Link assigned the same network prefix as the prefix of the host’s IP address ■ For example, link 3.0.0.0/24 ● Foreign link – Any link where the network prefix differs from the prefix of the host’s IP address ■ For example, link 4.0.0.0/24 ● Mobility – The ability of a host to change its 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 Mobile Networks: IP Addressing and Mobile IP 10 Solutions for Mobile Hosts (1) ● Host-specific routing ■ Add routes for the mobile host to routing tables at routers ■ Solution is not scaleable since updates and unique entries would be needed for every mobile host ● Change IP address ■ Mobile host can change its address to the foreign link’s network prefix ■ Need to register new IP address with DNS (if it is to maintain identity), resulting in added load on the DNS server and network ■ Communications, e.g., TCP connections, would be disrupted ■ Changing host IP address does not enable mobility, but it does enable nomadicity Mobile Networks: IP Addressing and Mobile IP 11 Solutions for Mobile Hosts (2) ● Source routing ■ Use loose source routing to specify a path to the foreign link (router interface) and then to the mobile node’s interface ■ Source host must determine address of foreign link, which is not a standard function for a host ● Use link level (Layer 2) mobility ■ Some Layer 2 protocols support mobility (e.g., between access points in IEEE 802.11 infrastructure networks) ■ Requires that the mobile host not leave the local IP subnet ● Mobile IP ■ Extension to IP routing to support mobile nodes in a scaleable and secure manner Mobile Networks: IP Addressing and Mobile IP 12 Mobile IP ● Mobile IP allows a host to move to a foreign network, but still maintain its home IP address ● References ■ C. E. Perkins, editor, “IP Mobility Support for IPv4, RFC 3344, August 2002. ■ C. E. Perkins, Mobile IP: Design Principles and Practices, Addison-Wesley, Reading, MA, 1998. ■ J. D. Solomon, The Internet Unplugged, Prentice Hall PTR, Upper Saddle River, NJ, 1998. ■ IETF Working Groups ○ Mobility for IPv4: http://www.ietf.org/html.charters/mip4-charter.html ○ Mobility for IPv6: http://www.ietf.org/html.charters/mip6-charter.html Mobile Networks: IP Addressing and Mobile IP 13 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 Mobile Networks: IP Addressing and Mobile IP 14 Mobile IP Overview: Data Flow Home Agent 10.92.2.3 Correspondent Node (Host) 10.0.8.5 10.0.8.5 10.92.2.3 10.4.5.43 10.4.5.0/24 Mobile Networks: IP Addressing and Mobile IP 10.0.8.0/24 Foreign 10.4.5.43 Agent 10.0.8.5 Mobile 10.0.8.5 Host 15 Mobile IP Elements ● Mobile Host (MH) – Host that changes its attachment point from one network or subnetwork to another ● Home Agent (HA) – Specialized router on mobile node’s home network that tunnels datagrams for delivery to the mobile host and maintains current location information for the mobile node ● Foreign Agent (FA) – Specialized router on foreign network that provides routing services to the mobile host while registered and may serve as default router for registered mobile hosts ● Correspondent Node (CN) – Communicates with mobile host Mobile Networks: IP Addressing and Mobile IP 16 Mobile IP Operation (1) ● Mobile (foreign and home) agents advertise their availability using agent-advertisement messages ■ 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 network ■ Foreign agent care-of address ■ Colocated care-of address Mobile Networks: IP Addressing and Mobile IP 17 Mobile IP Operation (2) ● Mobile host registers new care-of address with home agent, possibly via a foreign agent ■ Registration request ■ Registration reply ● Home agent intercepts datagrams sent to the mobile node’s home address and tunnels datagrams to the registered care-of address ● Tunneled datagram received ■ At foreign agent and delivered to mobile node, or ■ Directly at the mobile node (colocated) ● Mobile host can usually send datagrams directly back to the correspondent node Mobile Networks: IP Addressing and Mobile IP 18 Mobile IP Operation (3) ● Datagrams sent by the mobile node are delivered directly to the destination ■ No need to pass through the home agent Mobile Networks: IP Addressing and Mobile IP 19 Mobile IP Details (1) ● Agent discovery 1 ■ ICMP router discovery ■ Mobility agent discovery operation ■ Agent advertisement and solicitation messages ● Registration 2 ■ Registration operation ■ Authentication ■ Registration request and reply messages ■ Security ■ Example Mobile Networks: IP Addressing and Mobile IP 20 Mobile IP Details (2) ● Datagram delivery 3 ■ Encapsulation principles and schemes ■ ARP issues Mobile Networks: IP Addressing and Mobile IP 21 1 Agent Discovery ● Process by which a mobile host … ■ Determines if it is connected to its home network or to a foreign network ■ Determines when it has moved from one network to another ■ Learns the care-of address provided by a foreign agent ● Based on extensions to Internet Control Message Protocol (ICMP) router discovery mechanism ■ Router advertisement message ■ Router solicitation message ● Mobile IP assumes link level connectivity is established by some other means, e.g., association in IEEE 802.11b Mobile Networks: IP Addressing and Mobile IP 22 1 Router Discovery Operation ● Router discovery message is multicast by routers to hosts on the subnet ■ Normally, the all-systems multicast address (224.0.0.1) is the IP destination address with IP Time-To-Live (TTL) of 1 ■ Can be unicast directly to a host that sent a router solicitation message ● Systems on the subnet receive the discovery message and process Mobile Networks: IP Addressing and Mobile IP 23 1 Router Discovery Message (1) ICMP Header IP Header ICMP Message ICMP Message 0 8 16 24 31 type code checksum num addrs addr entr sz lifetime router address (1) preference (1) .. . Mobile Networks: IP Addressing and Mobile IP 24 1 Router Discovery Message (2) ● Type: Type of ICMP message (9) ● Code: Used by some types to indicate a specific ● ● ● ● condition (0) Checksum: Checksum over full message Num addrs: Number of 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 addresses may be considered valid Mobile Networks: IP Addressing and Mobile IP 25 1 Router Discovery Message (3) ● Router address (i), i=1…num addrs: Sending router’s IP address on the interface from which this message is sent ● Preference level (i), i=1…num addrs: Preference of this router address relative to other routers on this subnet (higher values are more preferable) Mobile Networks: IP Addressing and Mobile IP 26 1 Router Solicitation Operation ● Host can send router solicitation message for immediate information ● Solicitation message can be broadcast or multicast ■ Broadcast to the limited-broadcast address (255.255.255.255) ■ Multicast to the all-routers multicast address (224.0.0.2) with TTL = 1 ● Routers reply with a router advertisement ■ Unicast to the host sending the solicitation ● Host processes advertisement in standard way Mobile Networks: IP Addressing and Mobile IP 27 1 Router Solicitation Message 0 8 type 16 code reserved 24 31 checksum ● Type: ICMP type (10) ● Code: code for this type (0) ● Checksum: checksum over full message ● Reserved: sent as 0; ignored by receiver Mobile Networks: IP Addressing and Mobile IP 28 1 Agent Advertisement ● Extend router advertisement messages ■ Mobility agent advertisement extension ■ Prefix-length extension ■ One-byte padding extension ■ Future extensions ● Important fields for … ■ Link layer ■ IP ■ ICMP (router discovery) Mobile Networks: IP Addressing and Mobile IP 29 1 Advertising by Mobility Agents ● If link-layer protocol does not provide agent discovery, mobility agent (HA and FA) must… ■ Send agent advertisement messages (at some maximum rate with 1 second maximum recommended rate) ■ Respond to agent solicitation messages ● If link-layer protocol does provide agent discovery, mobility agent must… ■ Respond to agent solicitation messages ■ Send agent advertisement messages if site policy requires additional registration Mobile Networks: IP Addressing and Mobile IP 30 1 Agent Discovery by Mobile Hosts ● 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 advertisement messages from its home agent ■ Mobile host reconfigures routing for home network operation ■ Issues gratuitous ARP to update any cached ARP entries ■ Deregisters with home agent Mobile Networks: IP Addressing and Mobile IP 31 1 Advertisement Features (1) ● Link layer ■ Destination address should match link layer source address for agent solicitation ● IP ■ TTL = 1 (local subnet only) ■ Destination address is … ○ All-systems multicast address (224.0.0.1), or ○ Limited-broadcast address (225.225.225.225) Mobile Networks: IP Addressing and Mobile IP 32 1 Advertisement Features (2) ● 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 Mobile Networks: IP Addressing and Mobile IP 33 1 Agent Advertisement Extension (1) (follows ICMP router discovery) 0 8 type length registration lifetime 16 24 31 sequence number RBHFMGV reserved zero or more care-of addresses ● Type: 16 ● Length: 6 + 4N, where N is the number of advertised care-of addresses (4 bytes each) ● Sequence number: Count of advertisement messages since agent was initialized Mobile Networks: IP Addressing and Mobile IP 34 1 Agent Advertisement Extension (2) ● Registration lifetime: Lifetime in seconds that this agent is willing to accept a registration request (65,535 infinity) ● Bit fields ■ R: Foreign agent requires 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 Mobile Networks: IP Addressing and Mobile IP 35 1 Agent Advertisement Extension (3) ● 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 Mobile Networks: IP Addressing and Mobile IP 36 1 Agent Solicitation Message ● Same as ICMP router solicitation message ■ TTL = 1 required ● Used in a slightly different way ■ Frequency ■ Number of attempts Mobile Networks: IP Addressing and Mobile IP 37 2 Registration ● Mobile IP registration allows mobile hosts to communicate their location (reachability) information to their home agent ■ Request forwarding services on a foreign network ■ Inform home agent of care-of address ■ Renew a binding that is due to expire ■ Deregister upon return to the home network ● Creates or modifies a mobility binding at home agent and allows foreign agent to begin or renew service for the mobile host ■ Binds mobile host’s care-off address to its home address ■ Binding is valid for a registration lifetime Mobile Networks: IP Addressing and Mobile IP 38 2 Registration Preliminaries (1) ● Preconfigured in mobile host… ■ Home IP address and subnet mask ■ Mobility security association for each home agent (for authentication) ■ Optionally, IP address of one or more home agents ● Two forms of registration ■ Foreign agent acts as an intermediary ■ Mobile host registers directly with home agent ● Both procedures consist of exchange of registration request and reply messages Mobile Networks: IP Addressing and Mobile IP 39 2 Registration Preliminaries (2) ● Registration via foreign agent if … ■ Mobile host registers foreign agent care-off address ■ Foreign agent registration is required (R = 1 in advertisement) ● Registration directly with home agent if … ■ Mobile host is using a colocated care-of address ■ Mobile host returns home and deregisters Mobile Networks: IP Addressing and Mobile IP 40 2 Registration Via Foreign Agent Mobile Host MH (1) (2) FA (5) 1. 2. 3. 4. 5. Foreign Agent Home Agent (3) HA (4) FA advertises service MH requests service FA relays request to HA HA accepts (or denies) request and replies FA relays reply to MH Mobile Networks: IP Addressing and Mobile IP 41 2 Authentication (1) ● Without security, a “bad guy” host on any network (with a FA) could issue a registration request for a host on any network (with a HA) ■ HA would begin to forward datagrams to the bad guy host ● So, registration messages between a mobile host and its home agent must be authenticated ■ Uses mobile-home authentication extension ● Mobile hosts, home agents, and foreign agents must maintain a mobility security association for mobile hosts, indexed by… ■ Security Parameter Index (SPI) ■ IP address (home address for mobile host) Mobile Networks: IP Addressing and Mobile IP 42 2 Authentication (2) ● Identification field in registration request changes with each new registration to prevent malicious snooping agent from replaying request ■ Provides replay protection ● Identification field in reply based on identification field in request Mobile Networks: IP Addressing and Mobile IP 43 2 Registration Message Format ● Carried in UDP datagrams IP Header UDP Header Mobile IP Message Header Extensions … ● Non-zero checksum in UDP header (receiver should check) ● Mobile IP implements its own retransmission scheme ● TCP overhead not needed, especially beneficial for high packet loss rates ● Include a lifetime value Mobile Networks: IP Addressing and Mobile IP 44 2 Registration Request Message (1) 0 8 type 16 24 31 SBDMGVrsv lifetime home address home agent care-of address identification extensions ... Mobile Networks: IP Addressing and Mobile IP 45 2 Registration Request Message (2) ● Type: 1 (indicates registration request) ● Bit fields ■ S: Simultaneous bindings -- set if mobile host wants home agent to keep its current bindings ■ B: Broadcast datagrams -- set if mobile host wants to receive broadcasts on its home network ■ D: Decapsulation -- set to indicate that mobile host will decapsulate datagrams sent to care-of address (mobile node is using colocated care-of address) Mobile Networks: IP Addressing and Mobile IP 46 2 Registration Request Message (3) ● Bit fields (continued) ■ M: Minimal encapsulation -- set to request home agent use minimal encapsulation for tunneled datagrams ■ G: Generic routing encapsulation -- set to request home agent use GRE for tunneled datagrams ■ V: Van Jacobson header compression -- set to request that mobility agent use of this header compression scheme over its link with mobile host ■ rsv: Two reserved bits -- sent as 0; ignored on reception Mobile Networks: IP Addressing and Mobile IP 47 2 Registration Request Message (4) ● Lifetime: Number of seconds before registration should be considered to expire ■ Should not exceed that advertised by the foreign agent ■ Set to 0 to delete the registration ● Home address: Home IP address of the mobile host ● Home agent: IP address of the mobile host’s home agent Mobile Networks: IP Addressing and Mobile IP 48 2 Registration Request Message (5) ● Care-of address: IP address of the tunnel endpoint ■ Colocated (e.g., obtained using DHCP) ■ Foreign agent (e.g., obtained through agent discovery) ■ Home address to deregister all (return to home) ● Identification: 64-bit identification number constructed by mobile host ■ Associates registration requests with registration replies ■ Protects against replay attacks of registration messages Mobile Networks: IP Addressing and Mobile IP 49 2 IP for Registration Requests ● Source address ■ Care-of address if colocated care-of address ■ Otherwise, mobile host’s home address ● Destination address ■ IP address of foreign agent learned through advertisement message if registering through foreign agent ■ If IP address not known, all-mobility-agents multicast address (224.0.0.11) with TTL = 1 and link-layer address set to agent’s address ■ IP address of home agent if registering directly with home agent ■ Subnet-directed broadcast of home agent if IP address not known Mobile Networks: IP Addressing and Mobile IP 50 2 UDP for Registration Requests ● Source port: Variable (dynamically assigned by operating system, for example) ● Destination port: 434 (well-known port number) Mobile Networks: IP Addressing and Mobile IP 51 2 Registration Reply Message (1) 0 8 type 16 code home address home agent 24 31 lifetime identification extensions ... Mobile Networks: IP Addressing and Mobile IP 52 2 Registration Reply Message (2) ● Type: 3 (indicates registration reply) ● Code: Indicates result of registration request (defined in Assigned Numbers) ■ Registration successful ○ 0: Registration accepted ○ 1: Registration accepted, simultaneous registration not supported ■ Registration denied by foreign agent ○ Codes 64-88 ■ Registration denied by home agent ○ Codes 128-136 Mobile Networks: IP Addressing and Mobile IP 53 2 Registration Reply Message (3) ● Lifetime: Duration for which binding is valid ● Home address: IP address of the mobile host ● Home agent: IP address of mobile host’s home agent ● Identification: 64-bit identification field ■ Low 32 bits matched to identification sent in request ■ Used for authentication Mobile Networks: IP Addressing and Mobile IP 54 2 IP for Registration Replies ● Source address ■ Typically copied from the destination address of associated registration request ■ If request sent to a multicast or broadcast address, source address is set to home agent’s preferred unicast address ● Destination address: Copied from the source address of the associated registration request Mobile Networks: IP Addressing and Mobile IP 55 2 UDP for Registration Replies ● Source port: Variable ● Destination port: Copied from the source port of the associated registration request Mobile Networks: IP Addressing and Mobile IP 56 2 Security Parameter Index ● SPI defines the security context used to compute the authenticator value ■ Authentication algorithm ■ Mode ■ Shared secret ● Shared secret ■ Shared private key, or ■ Public/private key pair Mobile Networks: IP Addressing and Mobile IP 57 2 Authentication Extension 0 8 type code SPI (second two bytes) 16 24 31 SPI (first two bytes) authenticator … ● Type: 32 Mobile-home authentication 33 Mobile-foreign authentication 34 Foreign-home authentication ● Length: 4 plus length of authenticator ● SPI: 4-byte SPI ● Authenticator: Variable length (SPI) Mobile Networks: IP Addressing and Mobile IP 58 2 Order of Extensions ● Example -- registration request from mobile host to home agent via foreign agent IP header UDP header Fixed part of registration request Nonauthentication extensions for home agent Mobile-home authentication extension Nonauthentication extensions for foreign agent Mobile-foreign authentication extension Mobile Networks: IP Addressing and Mobile IP 59 2 Registration Information (1) ● Maintained at the mobile host for each pending registration ■ Link-layer address of foreign agent (if applicable) ■ IP destination address of the registration request ■ Care-of address used in registration ■ Identification value sent in registration ■ Originally requested lifetime ■ Remaining lifetime of pending registration Mobile Networks: IP Addressing and Mobile IP 60 2 Registration Information (2) ● Information in visitor’s log at foreign agent ■ Link-layer source address of mobile host ■ IP source address (the mobile host’s home address) ■ IP destination address (the foreign agent address used by the mobile host) ■ UDP source port (UDP port used at the mobile host) ■ Home agent address ■ Identification field (for authentication) ■ Requested registration lifetime ■ Remaining lifetime of the pending or current registration Mobile Networks: IP Addressing and Mobile IP 61 2 Registration Information (3) ● Information in mobility binding (indexed by home address of mobile host) at home agent ■ Mobile host’s care-of address ■ Identification field from registration reply ■ Remaining lifetime of the registration Mobile Networks: IP Addressing and Mobile IP 62 2 FA Care-of Address Example ● Example values ■ Mobile host’s home address ■ Mobile host’s home agent ■ Foreign agent’s link address ■ Foreign agent’s care-of address ■ Mobile node’s source port ■ Foreign agent’s source port ■ Care-of registration lifetime ■ Home agent-granted lifetime ■ SPI (mobile node/home agent) 129.34.78.5 129.34.78.254 137.0.0.11 9.2.20.11 1094 1105 60,000 s 35,000 s 302/303 From C. E. Perkins, Mobile IP: Design Principles and Practices, Addison-Wesley, Reading, MA, 1998. Mobile Networks: IP Addressing and Mobile IP 63 2 Example: 1) Agent Advertisement ● Foreign agent discovery Type=9 Code=16 IP Header ICMP Header Router Adv S=137.0.0.11 D=255.255.255.255 F=1 Mobile Networks: IP Addressing and Mobile IP Mobile Ext Life=60,000 COA=9.2.20.11 64 2 Example: 2) Mobile to Foreign ● Registration using the foreign agent S=1094 D=434 IP Header UDP Header S=129.34.78.5 D=137.0.0.11 TTL=64 Mobile Networks: IP Addressing and Mobile IP SPI=302 Mobile IP Auth Ext Type=1 Life=60,000 COA=9.2.20.11 HA=129.34.78.254 MH=129.34.78.5 65 2 Example: 3) Foreign to Home S=1105 D=434 IP Header UDP Header S=9.2.20.11 D=129.34.78.254 TTL=64 Mobile Networks: IP Addressing and Mobile IP SPI=302 Mobile IP Auth Ext Type=1 Life=60,000 COA=9.2.20.11 HA=129.34.78.254 MH=129.34.78.5 66 2 Example: 4) Home to Foreign S=434 D=1105 IP Header UDP Header S=129.34.78.254 D=9.2.20.11 TTL=64 Mobile Networks: IP Addressing and Mobile IP SPI=303 Mobile IP Auth Ext Type=3 Code=0 Life=35,000 HA=129.34.78.254 MH=129.34.78.5 67 2 Example: 5) Foreign to Mobile S=434 D=1094 IP Header UDP Header S=137.0.0.11 D=129.34.78.5 TTL=1 SPI=303 Mobile IP Auth Ext Type=3 Code=0 Life=35,000 HA=129.34.78.254 MH=129.34.78.5 ● Successful registration is complete Mobile Networks: IP Addressing and Mobile IP 68 3 Datagram Delivery ● Mobile IP uses encapsulation to deliver datagrams from the home network to the current care-of address of the mobile host ■ IP-in-IP encapsulation (must be supported) ■ Minimal encapsulation (may be supported) ■ Generic record encapsulation (may be supported) Mobile Networks: IP Addressing and Mobile IP 69 3 Tunneling Basics Source Destination Tunnel Encapsulation Mobile Networks: IP Addressing and Mobile IP Decapsulation 70 3 IP-in-IP Encapsulation (1) Original Endpoints Tunnel Endpoints Outer IP Header Original IP Header Original IP Payload Original IP Header Original IP Payload Other Optional Headers Mobile Networks: IP Addressing and Mobile IP 71 3 IP-in-IP Encapsulation (2) ● Encapsulation makes almost no change to original (or “inner”) IP header ■ TTL is decremented by 1 (as in a router) ● Outer IP header ■ Total length is length of entire encapsulated datagram ■ TOS (DSCP) copied from inner header ■ If DF flag is set in inner header, also set in outer ■ Protocol = 4 (IP) ■ Source address is address of encapsulator ■ Destination address is address of decapsulator ■ Optional header fields are generally not copied; others may be added Mobile Networks: IP Addressing and Mobile IP 72 3 Special Forms of ARP ● Proxy ARP ■ An ARP reply sent by one node on behalf of another node ■ ARP reply includes proxy’s link-layer address ■ Future transmissions will be sent to the proxy ■ Home agent can proxy ARP for mobile node ● Gratuitous ARP ■ ARP request or reply sent in order to update ARP caches at other nodes ■ Nodes are required to update their caches ■ Home agent does gratuitous ARP to update ARP caches on local network after change in registration or deregistration ■ Mobile host does gratuitous ARP when it returns home Mobile Networks: IP Addressing and Mobile IP 73 Route Optimization (1) ● “Triangle routing” in basic Mobile IP is inefficient ■ Traffic from correspondent host to mobile host traverses the network twice ● Route optimization allows home agent to notify correspondent node of new location of the mobile host ■ Requires enhanced capabilities at each correspondent node ■ Requires security association between home agent and correspondent node ● Route optimization approach is the only technique supported in IPv6 ■ IPv6 also uses only colocated care-of addresses Mobile Networks: IP Addressing and Mobile IP 74 Route Optimization (2) Binding Cache Corresponding Datagram 1 Host Datagram 2 Binding update Home Agent Tunnel Foreign Agent ACK Mobile Host Mobile Networks: IP Addressing and Mobile IP 75 Summary ● IP addressing presents problems for mobile hosts ● Mobile IP is a solution for truly mobile operation ■ Home agents and foreign agents provide mobility support ■ Dynamic Host Configuration Protocol (DHCP), Network Address Translation (NAT), etc. can be used for nomadic operation ● Major operations ■ Agent discover ■ Registration ■ Datagram delivery through tunneling ● Route optimization and IPv6 offer improvements on basic Mobile IP Mobile Networks: IP Addressing and Mobile IP 76