1 / 76

Lecture 9 Mobile Networks: IP Addressing and Mobile IP

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. Agenda.

Jims
Télécharger la présentation

Lecture 9 Mobile Networks: IP Addressing and Mobile IP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Wireless Networks and Mobile Systems Lecture 9Mobile Networks:IP Addressing and Mobile IP

  2. 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

  3. 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

  4. IP Addressing • IPv4 addresses… • Uniquely identify an interface • 32 bits long • Consist of a network identifier and a 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 0 31 Network Identifier Host Identifier Mobile Networks: IP Addressing and Mobile IP 4

  5. 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 0 1 2 3 4 8 16 24 31 Class A 0 netid hostid Class B 1 0 netid hostid Class C 1 1 0 netid hostid Class D 1 1 1 0 multicast address Class E 1 1 1 1 reserved for future use Mobile Networks: IP Addressing and Mobile IP 5

  6. 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

  7. 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

  8. IP Routing • Router uses routing table to direct packets to the appropriate interface TargetInterface 2.0.0.0/24 a 3.0.0.0/24 b 4.0.0.0/24 c 3.0.0.2 3.0.0.3 3.0.0.4 b a Router Dest = 3.0.0.4 c 4.0.0.5 4.0.0.6 Mobile Networks: IP Addressing and Mobile IP 8

  9. Traditional Routing for a Mobile Host • Host moving to another network is unreachable TargetInterface 2.0.0.0/24 a 3.0.0.0/24 b 4.0.0.0/24 c 3.0.0.2 3.0.0.3 3.0.0.4 b X a Router Dest = 3.0.0.4 c MobileHost 3.0.0.4 4.0.0.5 4.0.0.6 Mobile Networks: IP Addressing and Mobile IP 9

  10. 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

  11. 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

  12. 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

  13. 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

  14. 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

  15. Mobile IP Overview: Data Flow Home Agent 10.92.2.3 CorrespondentNode (Host) 10.0.8.5 10.0.8.5 10.92.2.3 10.0.8.0/24 10.4.5.43 Foreign Agent 10.4.5.43 10.4.5.0/24 10.0.8.5 MobileHost 10.0.8.5 Mobile Networks: IP Addressing and Mobile IP 15

  16. 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

  17. 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

  18. 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

  19. 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

  20. Mobile IP Details (1) • Agent discovery • ICMP router discovery • Mobility agent discovery operation • Agent advertisement and solicitation messages • Registration • Registration operation • Authentication • Registration request and reply messages • Security • Example 1 2 Mobile Networks: IP Addressing and Mobile IP 20

  21. Mobile IP Details (2) • Datagram delivery • Encapsulation principles and schemes • ARP issues 3 Mobile Networks: IP Addressing and Mobile IP 21

  22. Agent Discovery 1 • 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

  23. Router Discovery Operation 1 • 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

  24. Router Discovery Message (1) 1 IP Header ICMPHeader ICMPMessage 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

  25. Router Discovery Message (2) 1 • 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

  26. Router Discovery Message (3) 1 • 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

  27. Router Solicitation Operation 1 • 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

  28. Router Solicitation Message 1 • 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 type code checksum reserved Mobile Networks: IP Addressing and Mobile IP 28

  29. Agent Advertisement 1 • 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

  30. Advertising by Mobility Agents 1 • 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

  31. Agent Discovery by Mobile Hosts 1 • 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

  32. Advertisement Features (1) 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

  33. Advertisement Features (2) 1 • 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

  34. Agent Advertisement Extension (1) 1 • 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 (follows ICMP router discovery) 0 8 16 24 31 type length sequence number registration lifetime RBHFMGV reserved zero or more care-of addresses Mobile Networks: IP Addressing and Mobile IP 34

  35. Agent Advertisement Extension (2) 1 • 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

  36. Agent Advertisement Extension (3) 1 • 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

  37. Agent Solicitation Message 1 • 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

  38. Registration 2 • 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

  39. Registration Preliminaries (1) 2 • 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

  40. Registration Preliminaries (2) 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

  41. (1) (2) (3) (4) (5) Registration Via Foreign Agent 2 MobileHost ForeignAgent HomeAgent MH FA HA 1. FA advertises service 2. MH requests service 3. FA relays request to HA 4. HA accepts (or denies) request and replies 5. FA relays reply to MH Mobile Networks: IP Addressing and Mobile IP 41

  42. Authentication (1) 2 • 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

  43. Authentication (2) 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

  44. Registration Message Format 2 • Carried in UDP datagrams • 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 IP Header UDP Header Mobile IPMessage Header Extensions … Mobile Networks: IP Addressing and Mobile IP 44

  45. Registration Request Message (1) 2 0 8 16 24 31 type SBDMGVrsv lifetime home address home agent care-of address identification extensions ... Mobile Networks: IP Addressing and Mobile IP 45

  46. Registration Request Message (2) 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

  47. Registration Request Message (3) 2 • 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

  48. Registration Request Message (4) 2 • 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

  49. Registration Request Message (5) 2 • 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

  50. IP for Registration Requests 2 • 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

More Related