TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile...

39
TSIN02 - Internetworking © 2004 Image Coding Group, Linköpings Universitet Lecture 10: Mobile IP Literature: Forouzan ch. 24 Article: Mobile IP by Charles E. Perkins, IEEE Communications Magazine,Vol. 40 , Issue: 5 , May 2002, Pages:66 - 82 Article: IP multimedia services: analysis of mobile IP and SIP interactions in 3G networks by Faccin, S.M.; Lalwaney, P.; Patil, B. Communications Magazine, IEEE ,Volume: 42 , Issue: 1 , Jan. 2004, Pages:113 - 120

Transcript of TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile...

Page 1: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

© 2004 Image Coding Group, Linköpings Universitet

Lecture 10: Mobile IPLiterature:

● Forouzan ch. 24

● Article: Mobile IP by Charles E. Perkins, IEEE Communications Magazine,Vol. 40 , Issue: 5 , May 2002, Pages:66 - 82

● Article: IP multimedia services: analysis of mobile IP and SIP interactions in 3G networks by Faccin, S.M.; Lalwaney, P.; Patil, B.Communications Magazine, IEEE ,Volume: 42 , Issue: 1 , Jan. 2004, Pages:113 - 120

Page 2: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

2

Lecture 9: Mobile IP

Outline:

● Mobile IP - Introduction

● Addressing

● Agents

● Three Phases

– Agent discovery

– Registration

– Data transfer● Inefficiency

Page 3: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

3

Mobile IP - Introduction

Wireless connections to the Internet are now common.– 802.x series– Bluetooth– GPRS– 3G

Mobility is sometimes a desired feature. This means that sessions are transferred between network access points “on-the-fly”.

Page 4: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

4

Mobile IP Requirements● Keeping current IP address and IP connections when

changing link-layer attachment.● Ability to communicate with hosts that do not

implement mobile IP (MIP).● No enhancements needed in hosts or routers unless

they are performing functions of new MIP entities.● Little administrative traffic (mobiles may be weak).● No new constraints on assignment of IP addresses.● Support for authentication

Page 5: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

5

Addressing

The IP addresses are designed The IP addresses are designed to work with stationary to work with stationary

hosts because part of the address hosts because part of the address defines the network to defines the network to

which the host is attached.which the host is attached.

Page 6: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

6

Addressing cont.

Possible solutions:● Keep IP-address and update routing tables.

Not realistic to update all routers every time a host moves to a new network.

● Get a new IP-address. This requires that configuration files are changed, the computer must be rebooted, DNS tables need to be revised and any ongoing transmission will be interrupted.

● Two addresses and redirection: – Home address– Care-of address

Page 7: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

7

Host Routing Example● Host 2 moves from home link to foreign link

– How many routing changes?– How robust?

Page 8: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

8

Agents

The change of address should be transparent to the rest of the Internet. This is achieved through the use of agents:

● A home agent – acts on behalf of the mobile host.● A foreign agent – handles the connection between the

mobile host and its home agent. This is called tunneling.

Sometimes the mobile host acts as a foreign agent, called co-located care-of address.

Page 9: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

9

Home Agent and Foreign Agent

Figure from Forouzan

Page 10: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

10

Host address and Care-of Address

In Mobile IP two addresses are needed to communicate with the mobile host: the In Mobile IP two addresses are needed to communicate with the mobile host: the home address and the care-of address. The home address is permanent; the home address and the care-of address. The home address is permanent; the care-of address is the address of the host that receives redirected messages from care-of address is the address of the host that receives redirected messages from the home agent. The c/o address always belongs to the network to which the the home agent. The c/o address always belongs to the network to which the mobile node is currently connected. mobile node is currently connected.

THIS DIFFERS FROM THE BOOK!!!THIS DIFFERS FROM THE BOOK!!!

Figure from Forouzan

Page 11: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

11

Agents● Home agent

– receives datagrams to the mobile host– encapsulates the datagrams– sends the new datagrams to the foreign agent

● Foreign agent– receives encapsulated datagrams from the home

agent– decapsulates the datagrams– forwards the datagrams to the (locally connected)

mobile host

Page 12: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

12

Communication

Figure from Forouzan

Page 13: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

13

Three Phases

These three phases describe how to communicate with a remote host:

1) Agent discovery – the mobile host needs to discover the addresses of both home and foreign agent.

2) Registration – update information stored by home and foreign agents

3) Data transfer

Page 14: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

14

Router Advertisement Message

Figure from Forouzan

Page 15: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

15

Agent Advertisement

Figure from Forouzan

Page 16: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

16

Agent Advertisement cont.

Description of the fields:● Type (8 bits) - set to 16● Length (8 bits) – total length of extention message● Sequence number● Lifetime (16 bits) – How frequent the agent sends

advertisments● Code (8 bits)

● List of care-of addresses

Bit Meaning 0 Registration required 1 Agent busy 2 Agent acts as home agent 3 Agent acts as foreign agent 4 Agent uses minimal encapsulation 5 Agent uses generic routing encapsulation 6 Agent supports header compression 7 Unused

Page 17: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

17

Agent Solicitation Message● Sent by mobile nodes● Request for Agent Advertisement messages● Agents are required to respond directly by sending

Agent Advertisements● Used when Agent Advertisement messages are not

transmitted frequently enough, for example if the mobile node is moving quickly between foreign networks.

Page 18: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

18

What if no advertisements are found?● If the mobile node is connected but receives no Agent

Advertisements, even after sending repeated Agent Solicitations, it can:– A: Hope that it is connected to it home network.

This can be tested by sending an ICMP Echo Request to its default router.

– B: If A fails, assume connection to a foreign link and try DHCP (Dynamic Host Configuration Protocol)

– C: If A and B fail: Ask user for manual configuration– Otherwise connection has failed (not a mobile IP

problem)

Page 19: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

19

Registration

There are four aspects of registration. The mobile agent must:

● Register with the foreign agent ● Register with the home agent● Renew registration if expired● Cancel registration when returning home

Page 20: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

20

Registration Request and Reply

Figure from Forouzan

Page 21: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

21

Registration Request Format

Sent using UDP port 434

Figure from Forouzan

Page 22: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

22

Registration reply format

Sent using UDP port 434

Figure from Forouzan

Page 23: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

23

When should a mobile node register?● When it has been moved● When foreign agent has rebooted (can be seen by

looking at the advertisement sequence number)● When current registration is due to expire.

Page 24: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

24

Movement detection● A mobile node assumes that it has been moved if:

– No Agent Advertisement message is received from the current foreign agent in the last Lifetime seconds (advertisements should be sent approximately three times per Lifetime seconds).

– An Agent Advertisement is received from a foreign agent with a network prefix different from the current foreign agent.

Page 25: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

25

To where is the registration sent?

Finding the correct link layer address for the registration is somewhat difficult.

● Home link: the Address Resolution Protocol is used.● Foreign links: ARP cannot be used. If it is, the mobile

node's home address would be placed in other local nodes' ARP caches. Instead the foreign agent's link layer address is taken from the Link Layer Source Address field of the Agent Advertisement

● In the case of colocated c/o-address the same method that gave the c/o-address can be used to find the IP address of default router.

Page 26: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

26

How to find the Home Agent address

Generally the mobile node is configured with its home agent address, home address, network prefix etc.

If it is not, the following procedure can be used:● The mobile node sends a registration request to the

broadcast address of its home network. This is relayed by the foreign agent (if it exists).

● The request is broadcast on the home network, requiring all home agents to respond with a “Unknown home agent address” message.

● The mobile node collects all replies and learns the addresses of all available home agents, allowing normal registration.

Page 27: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

27

Home agent packet interception

The home agent must intercept packets bound for absent mobile nodes

● Proxy ARP is used by the home agent● When the mobile nodes registers on a foreign link, the

home agent sends gratuitous ARPs to flush local ARP caches

● In the same way, when the mobile node returns home, it must also send gratuitous ARPs.

Page 28: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

28

Data Transfer

Figure from Forouzan

Page 29: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

29

Data Transfer cont.

1) From remote host to home agent

2) From home agent to foreign agent

3) From foreign agent to mobile host

4) From mobile host to remote host

Not very efficient!

Page 30: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

30

Triangle Routing

Figure from Forouzan

Page 31: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

31

Double Crossing

Figure from Forouzan

Page 32: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

32

Route Optimization● Solutions to the problem of inefficient routing have

been proposed● When a datagram from a remote host A is forwarded

to the mobile node the home agent sends a binding update to A in order to– inform A that the mobile host is not at home– inform A of the current c/o address

● With this information A can create a tunnel directly to the mobile host, bypassing the home agent

Page 33: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

33

Mobile IP Problems● How do we secure binding updates in route optimization?

– Somebody else could reroute communication– Authentication of binding updates necessary

● Smooth hand-off when moving between foreign agents (FA:s): tell new FA to ask old FA to forward datagrams

– How does new FA know that you are you?– FA:s are often unknown and you share now secret with

them: problem!● Firewalls at home network may have problems with

packets from and to the mobile node (they will have strange addresses).

Page 34: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

34

Mobile IP v6● There is no need for foreign agents in MIPv6 since

there are plenty of addresses available.● MIPv6 supports route optimization

– Both care-of address and home address are sent along with the message so that the remote host can use the care-of address for direct transmission.

● Message overhead have been reduced

Page 35: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

35

Mobile IP in 3G Networks

There are two dominating 3G networks:● GPRS/UMTS (Specified by 3GPP)

– The mobile host gets IP connectivity through a Gateway GPRS Support Node (GGSN) which provides the care-of address.

– MIP is not explicitly supported, but can be used to support mobility in multi-access networks.

● CDMA2000 (Specified by 3GPP2)– Here a Packet Data Switching Node (PDSN) provides the link between

the radio network and the Internet.

– MIPv4 is deployed, MIPv6 is only partly supported.

Page 36: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

36

SIP and Mobile IP● The Session Initiation Protocol (SIP) has been chosen

for the support of IP multimedia subsystems (IMS) in both 3GPP and 3GPP2 (VoIP, streaming...).

● In 3GPP IPv6 is used for IMS. ● Both IPv4 and IPv6 are allowed for IMS in 3GPP2

networks.● SIP also supports mobility.

Page 37: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

37

SIP and MIPv4● When a mobile host connects to an IPv4 network,

NATs are needed to connect to a IPv6 SIP infrastructure (which is what is used in 3G networks).

● With SIP, the packet payload also needs modification by the NAT. This requires an Application Layer Gateway (ALG), since NATs normally does not modify the payload.

● There are some routing issues that makes IMS services over MIPv4 complex and inefficient.

Page 38: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

38

SIP and MIPv6● At SIP registration an IP address is provided. ● When Mobile IP is used, there are two addresses

available, home address and care-of address● The home address should be used for SIP

communication to make the changes in IP addresses transparent to applications.

Page 39: TSIN02 - Internetworking · TSIN02 - Internetworking 10 Host address and Care-of Address In Mobile IP two addresses are needed to communicate with the mobile host: the home address

TSIN02 - Internetworking

39

Closing remarks● MIPv4 has been a standard for some years● MIPv6 is not yet a standard● The interworking of SIP and MIP has not yet been

standardized.