cs/ece 439: wireless networking

80
CS/ECE 439: Wireless Networking What you need to know about the Internet to understand the challenges of wireless and mobile hosts © CS/ECE 439 Staff, University of Illinois Fall 2013

Upload: others

Post on 13-Jan-2022

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS/ECE 439: Wireless Networking

CS/ECE 439: Wireless Networking

What you need to know about the Internet to understand the challenges of wireless and mobile hosts

© CS/ECE 439 Staff, University of Illinois Fall 2013

Page 2: CS/ECE 439: Wireless Networking

IP and the Internet

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Network-level protocol for the Internet

Operates on all hosts and routers

Routers are nodes connecting distinct networks

to the Internet

Modem ATM FDDI Ethernet

FTP TFTP NV HTTP

TCP UDP

IP

Page 3: CS/ECE 439: Wireless Networking

Layering

Fall 2013 © CS/ECE 439 Staff, University of Illinois

TCP

IP

Alice

IP

TCP

Bob Rick (a router)

IP

FDDI FDDI ETH ETH

Page 4: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Message Transmission

1. Alice/application finds Bob’s IP address, sends packet

2. Alice/IP forwards packet to Rick

3. Alice/IP looks up Rick’s Ethernet address and sends

4. Rick/IP forwards packet to Bob

5. Rick/IP looks up Bob’s FDDI address and sends

TCP

IP

Alice

IP

TCP

Bob Rick (a router)

IP

FDDI FDDI ETH ETH

Page 5: CS/ECE 439: Wireless Networking

Internet Protocol Service Model

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Service provided to transport layer (TCP, UDP) Global name space Host-to-host connectivity (connectionless) Best-effort packet delivery

Not in IP service model Delivery guarantees on bandwidth, delay or loss

Delivery failure modes Packet delayed for a very long time Packet loss Packet delivered more than once Packets delivered out of order

Page 6: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data 4-bit version

IPv4 = 4, IPv6 = 6

0 4 8 16 19 31

Page 7: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

4-bit IP header length

Counted in 32-bit words, minimum

value is 5

Page 8: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

8-bit type of service field (TOS)

Specifies priorities: priority level,

minimize delay, maximize throughput,

maximize reliability, minimize

monetary cost, etc

Mostly unused

Page 9: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

Total Length of datagram, including header

and data

Counted in bytes

Maximum size is 65536 bytes

Page 10: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

16-bit packet ID (Fragmentation support)

All fragments from the same packet have the

same ID

Sender must make sure ID is unique for that

(src,dest) pair, for the time the datagram will

be active in the Internet

Page 11: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

3-bit flags

R = Reserved (unused)

DF = Don’t fragment (if set, router returns

ICMP if MTU too small)

MF = More fragments (1 indicates datagram has

additional fragments on the way, 0 indicates this is the

last fragment)

Page 12: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

13-bit fragment offset into packet (Fragmentation)

Indicates where in packet this fragment

belongs (first fragment has offset zero,

fragment starting at byte X has offset of X/8)

Counted in 8-byte words

Page 13: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

8-bit time-to-live field (TTL)

Initial value: 128 (Windows), 64 (Linux)

Hop count decremented at each router

Packet is discarded if TTL = 0

Page 14: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

8-bit protocol field (specifies encapsulated protocol)

TCP = 6, UDP = 17

Page 15: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

16-bit IP checksum on header

Since some header fields change at each router, this is recomputed at each router

Page 16: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

32-bit source IP address

Page 17: CS/ECE 439: Wireless Networking

IP Packet Format

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Flags

Version HLen TOS Length

Ident Offset

TTL Protocol Checksum

SourceAddr

DestinationAddr

Options (variable) Pad

(variable)

Data

0 4 8 16 19 31

32-bit destination IP address

Page 18: CS/ECE 439: Wireless Networking

IP Fragmentation and Reassembly

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Solution When necessary, split IP packet into acceptably

sized packets prior to sending over physical link

Size=1300

H1 R1 R2 H2

MTU=1500 MTU=450

Size=450, offset=0

Size=450, offset=450

Size=400, offset=900

MTU=950

Page 19: CS/ECE 439: Wireless Networking

IP Fragmentation and Reassembly

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Questions Where should reassembly occur?

What happens when a fragment is damaged/lost?

Size=1300

H1 R1 R2 H2

MTU=1500 MTU=450

Size=450, offset=0

Size=450, offset=450

Size=400, offset=900

MTU=950

Page 20: CS/ECE 439: Wireless Networking

IP Fragmentation and Reassembly

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Fragments self-contained IP datagrams

Reassemble at destination Minimizes refragmentation

If one or more fragments are lost Drop all fragments in packet

Avoid fragmentation at source host Transport layer should send packets small enough to fit

into one MTU of local physical network Must consider IP header

Page 21: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

IP Fragmentation and Reassembly

ETH IP (1400)

FDDI IP (1400)

PPP IP (376)

PPP IP (512)

PPP IP (512)

ETH IP (376)

ETH IP (512)

ETH IP (512)

Start of header

Ident = x 0 Offset 0

Rest of header

1400 data bytes

Start of header

Ident = x 1 Offset 0

Rest of header

512 data bytes

Start of header

Ident = x 1 Offset 512

Rest of header

512 data bytes

Start of header

Ident = x 0 Offset 1024

Rest of header

376 data bytes

H1 R1 R2 R3 H2

ETH FDDI PPP ETH

Page 22: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

IPv4 Address Model

Properties

32-bit address

Hierarchical

Network, subnet, host hierarchy

Maps to logically unique network adaptor

Exceptions: service request splitting for large web servers

Three Class Model

0 Network (7 bits)

Network (14 bits)

1 1 0

1 0

Network (21 bits)

Host (24 bits)

Host (16 bits)

Host (8 bits)

Class A:

Class B:

Class C:

Page 23: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Host (24 bits)

IPv4 Address Model

Properties

32-bit address

Hierarchical

Network, subnet, host hierarchy

Maps to logically unique network adaptor

Exceptions: service request splitting for large web servers

Three Class Model Pressure mostly on class B networks

Class B networks aren’t very efficient

0 Network (7 bits)

Network (14 bits)

1 1 0

1 0

Network (21 bits)

Host (16 bits)

Host (8 bits)

Class A:

Class B:

Class C:

Page 24: CS/ECE 439: Wireless Networking

Subnetting

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Enables a domain to further partition

address space into smaller networks

Subdivide host id into subnet ID + host ID

Subnet mask

Only routers in the domain interpret subnet

mask

Other routers treat IP address as normal class

A, B or C address

Page 25: CS/ECE 439: Wireless Networking

Subnet Example

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Consider

A domain with a class B address

135.104.*

Without subnetting

Every router in the domain needs to know how

to route to every host

However

the domain itself is likely organized as a

hierarchy of physical networks

Page 26: CS/ECE 439: Wireless Networking

Subnet Example

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Solution

Partition the 65,536 address in the class B

network

256 subnets each with 256 addresses

Subnet mask: 255.255.255.0

If 135.104.5.{1,2,3} are all on the same

physical network reachable from router

135.105.4.1

There only needs to be one routing entry for

135.104.5.* pointing to 135.105.4.1 as next hop

Page 27: CS/ECE 439: Wireless Networking

Subnetting

Fall 2013 © CS/ECE 439 Staff, University of Illinois

The subnet mask specifies the bits of

network and subnet addresses

Routing table entries carry both addresses

and subnet masks

Network (14 bits) 1 0 Host (16 bits)

Class B:

Class B:

Network (14 bits) 1 0 Host (8 bits) Subnet (8 bits)

Subnet Mask:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0

Page 28: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Subnet Mask 255.255.255.128

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0

Host 1: 128.174.142.200

1 1 1 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 1 1 0 1 1 0 0

Subnetting – Host 1

H1

H2 H3

R1

R2

Subnet Mask: 255.255.255.128

Subnet Number: 128.174.142.128

128.174.142.200

128.174.141.3

128.174.142.27

Subnet # 128.174.142.128

1 1 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 0 0

Page 29: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Subnet # 128.174.141.0

1 1 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 0

Subnet Mask 255.255.255.0

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0

Host 3: 128.174.141.3

1 1 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0 0 1 1 0 1 0 0 0 0

Subnetting – Host 3

H1

H2 H3

R1

R2

Subnet Mask: 255.255.255.0

Subnet Number: 128.174.141.0

128.174.142.200

128.174.141.3

128.174.142.27

Page 30: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

The Crisis

Fixed 32-bit address space for IPv4

Network allocation based on Classic A, B, C Model

Central allocation authority Randomly assigning addresses

Problems Router table explosion

Address space exhaustion

Page 31: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Classless Interdomain Routing (CIDR)

CIDR/Supernetting Problem with subnetting

Allows hierarchy within organizations

Does not reduce class B address space pressure

Solution

Aggregate routes in routing tables

Eliminate class notation

Generalize subnet notion

Allow only contiguous subnet masks

Specify network by <network #, # of bits in subnet mask>

Equivalent to <network #, # of hosts>

Blocks of class C networks can now be treated as one network

Page 32: CS/ECE 439: Wireless Networking

CIDR

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Route aggregation Use contiguous blocks of Class C addresses

Example: 192.4.16 – 192.4.31 20 bit subnet mask

Block size must be a power of 2

Network number may be any length

192.4.31.0

0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0

192.4.16.0

0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

Subnet Mask

255.255.240.0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0

Page 33: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

CIDR

Subnetting

Share one address (network number) across

multiple physical networks

Supernetting

Aggregate multiple addresses (network

numbers) for one physical network

Page 34: CS/ECE 439: Wireless Networking

IPv4 Address Translation support

Fall 2013 © CS/ECE 439 Staff, University of Illinois

IP addresses to LAN physical addresses

Problem An IP route can pass through many physical networks

Data must be delivered to destination’s physical network

Hosts only listen for packets marked with physical interface names Each hop along route

Destination host

TCP

IP IP

TCP

IP

FDDI FDDI ETH ETH

Page 35: CS/ECE 439: Wireless Networking

IP to Physical Address Translation

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Hard-coded Encode physical address in IP address Ex: Map Ethernet addresses to IP addresses

Makes it impossible to associate address with topology

Fixed table Maintain a central repository and distribute to hosts

Bottleneck for queries and updates

Automatically generated table Use ARP to build table at each host Use timeouts to clean up table

Page 36: CS/ECE 439: Wireless Networking

ARP: Address Resolution Protocol

Fall 2013 © CS/ECE 439 Staff, University of Illinois

ARP table contains physical address mappings

If target address not present Broadcast an ARP query, include querying host’s translation

Wait for an ARP response

Upon receipt of ARP query/response Targeted host responds with address translation

If address already present Refresh entry and reset timeout

If address not present Add entry for requesting host

Ignore for other hosts

Timeout and discard entries after O(10) minutes

Page 37: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

ARP Packet

TargetHardwareAddr (bytes 2 – 5)

TargetProtocolAddr (bytes 0 – 3)

SourceProtocolAddr (bytes 2 – 3)

Hardware type = 1 ProtocolType = 0x0800

SourceHardwareAddr (bytes 4 – 5)

TargetHardwareAddr (bytes 0 – 1)

SourceProtocolAddr (bytes 0 – 1)

HLEN = 48 PLEN = 32 Operation

SourceHardwareAddr (bytes 0 – 3)

0 8 16 31

Page 38: CS/ECE 439: Wireless Networking

ARP

ARP: determines mapping from IP to MAC address

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Broadcast ARP

request:

“Who owns IP

address

4.4.4.4?” IP=2.2.2.2

MAC=AA:AA:AA:AA:AA

IP=3.3.3.3

MAC=BB:BB:BB:BB:BB

IP=4.4.4.4

MAC=CC:CC:CC:CC:CC

Broadcast ARP reply:

“I own 4.4.4.4, and my

MAC address is

CC:CC:CC:CC:CC”

IP MAC

4.4.4.4 CC:CC:CC:CC:CC

Page 39: CS/ECE 439: Wireless Networking

ARP

Fall 2013 © CS/ECE 439 Staff, University of Illinois

What if IP address is not on subnet?

Each host configured with “default gateway”

Use ARP to resolve its IP address

Gratuitous ARP: tell network your IP to

MAC mapping

Used to detect IP conflicts, IP address

changes; update other machines’ ARP tables,

update bridges’ learned information

Page 40: CS/ECE 439: Wireless Networking

ARP

Fall 2013 © CS/ECE 439 Staff, University of Illinois

IP=2.2.2.2

MAC=AA:AA:AA:AA:AA

IP=3.3.3.3

MAC=BB:BB:BB:BB:BB

IP=4.4.4.4

MAC=CC:CC:CC:CC:CC

IP=5.5.5.5

MAC=DD:DD:DD:DD:DD

Broadcast Gratuitous

ARP reply:

“I own 5.5.5.5, and

my MAC address is

DD:DD:DD:DD:DD”

IP MAC

4.4.4.4 CC:CC:CC:CC:CC

DD:DD:DD:DD:DD 5.5.5.5

Page 41: CS/ECE 439: Wireless Networking

Proxy ARP

Fall 2013 © CS/ECE 439 Staff, University of Illinois

IP=2.2.2.2

MAC=AA:AA:AA:AA:AA

IP=3.3.3.3

MAC=BB:BB:BB:BB:BB

IP=4.4.4.4

MAC=CC:CC:CC:CC:CC

IP=5.5.5.5

MAC=DD:DD:DD:DD:DD

Broadcast proxy ARP

reply:

“I own 4.4.4.4, and

my MAC address is

DD:DD:DD:DD:DD”

IP MAC

4.4.4.4 DD:DD:DD:DD:DD

Page 42: CS/ECE 439: Wireless Networking

Host Configuration

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Plug new host into network How much information must be known?

What new information must be assigned?

How can process be automated?

Some answers Host needs an IP address (must know it)

Host must also Send packets out of physical (direct) network

Thus needs physical address of router

Page 43: CS/ECE 439: Wireless Networking

Dynamic Host Configuration Protocol

(DHCP)

Fall 2013 © CS/ECE 439 Staff, University of Illinois

A simple way to automate configuration

information

Network administrator does not need to enter

host IP address by hand

Good for large and/or dynamic networks

Page 44: CS/ECE 439: Wireless Networking

Dynamic Host Configuration Protocol

(DHCP)

Fall 2013 © CS/ECE 439 Staff, University of Illinois

New machine sends request to DHCP server for assignment and information

Server receives Directly

If new machine given server’s IP address

Through broadcast If on same physical network

Via DHCP relay nodes Forward requests onto the server’s physical network

Server assigns IP address and provides other info

Can be made secure Present signed request or just a “valid” physical

address

Page 45: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

DHCP

DHCP

Server

Host A Host A broadcasts

DHCPDISCOVER

message Host A

broadcasts

DHCP

request

Host B

DHCP

Server

DHCP

Relay

Other

Networks

Relay unicasts

DHCP request

to server

Server

responds

with host’s

IP address

Page 46: CS/ECE 439: Wireless Networking

DHCP

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Remaining challenge: configuring DHCP

servers

Need to ensure consistency across servers,

between servers and network, address

assignment across routers

But simpler than directly managing end hosts

Page 47: CS/ECE 439: Wireless Networking

Tunneling

Fall 2013 © CS/ECE 439 Staff, University of Illinois

IP Tunnel

Virtual point-to-point link between an arbitrarily

connected pair of nodes

Network

1

Network

2 Internetwork R1 R2

IP Tunnel

IP Dest = 2.x IP Payload

IP Dest = 10.0.0.1

10.0.0.1

IP Dest = 2.x IP Payload

IP Dest = 2.x IP Payload

Page 48: CS/ECE 439: Wireless Networking

Tunneling

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Advantages Transparent transmission of packets over a

heterogeneous network

Only need to change relevant routers

Disadvantages Increases packet size

Processing time needed to encapsulate and unencapsulate packets

Management at tunnel-aware routers

Page 49: CS/ECE 439: Wireless Networking

What does this all have to do with Mobility?

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Internet Architecture Assumptions Hosts are (mostly) stationary

Address assignment, routing

But Many clients today are mobile

Mobility inside a subnet is supported e.g. moving across APs that are part of a single network

Mobility across subnets is harder IP address is used as address and identifier

Identifier: who are you?

Address: where can I find you?

Page 50: CS/ECE 439: Wireless Networking

Mobility options

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Keep IP address

Network gets confused

Delivers packets to wrong “old” subnet

New IP address

Host gets confused

Transport protocols, applications, etc.

Page 51: CS/ECE 439: Wireless Networking

Mobility across IP Subnets

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Moving across IP subnets

Different protocols have conflicting

requirements

Network layer

Wants IP address in current subnet

Needed for routing of packets

Transport layer

Wants IP address that was used to

create connection

Needed to identify the connection

Applications

Often do not care

In practice, they want to keep the IP

address the same

Tied to sockets

Page 52: CS/ECE 439: Wireless Networking

IP Address Problem

Internet hosts/interfaces are identified by IP

address

DNS translates host name to IP address

IP address identifies host/interface and locates its

network

Mixes naming and location

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Page 53: CS/ECE 439: Wireless Networking

Traditional Routing for a Mobile Host

Fall 2013 © CS/ECE 439 Staff, University of Illinois

3.0.0.2 3.0.0.3 3.0.0.4

4.0.0.5 4.0.0.6 3.0.0.4

Target Interface

2.0.0.0/24 a

3.0.0.0/24 b

4.0.0.0/24 c

a

c

b

Dest=3.0.0.4

Page 54: CS/ECE 439: Wireless Networking

IP Address Problem

Internet hosts/interfaces are identified by IP

address

DNS translates host name to IP address

IP address identifies host/interface and locates its

network

Mixes naming and location

Moving to another network requires different

network address

But this would change the host’s identity

How can we still reach that host?

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Page 55: CS/ECE 439: Wireless Networking

Mobile IP Goals

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Communicate with mobile hosts using their “home” IP address Allows any host to contact mobile host using its

“usual” IP address

Mobility should be transparent to applications and higher level protocols No need to modify the software

Minimize changes to host and router software No changes to communicating host

Page 56: CS/ECE 439: Wireless Networking

Routing for Mobile Hosts

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Problem

How can mobility be supported in view of the

fact that a portion of an IP address is a network

address?

Solution: Location Registry

Mobile IP

Page 57: CS/ECE 439: Wireless Networking

Routing for Mobile Hosts

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Problem How can mobility be supported in view of the fact that a

portion of an IP address is a network address?

Solution: Location Registry

Mobile IP

Sender MH

R1 R2 R3

R4

HA

FA

I have a

packet for

MH

MH lives on

this LAN MH isn’t

here! But I know

where MH

is!

MH is on

my WLAN!

Page 58: CS/ECE 439: Wireless Networking

Why Mobile IP?

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Goal IP-based protocol that allows network

connectivity across host movement

Features Doesn’t require global changes to deployed

router software, etc.

Compatible with large installed base of IPv4 networks/hosts

Confines changes to mobile hosts and a few support hosts which enable mobility

Page 59: CS/ECE 439: Wireless Networking

Basic Mobile IP

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Features

Transparent routing of packets to a mobile host

No modification of existing routers or non-

mobility supporting hosts

Problem

Indirect routing places unnecessary burden on

the internet and significant increases latency

Page 60: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Components

Mobile Host (MH)

Assigned a unique home address within its

home network

Corresponding Hosts (CH)

Other hosts communicating with the MH

Always use MH’s home address

Page 61: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Routing for Mobile Hosts

Home Agent (HA): An agent on the MH’s home network

Maintains registry of MH’s care-of-address

Mobility binding is the connection between the MH’s home address and care-of-address

Each time the MH establishes a new care-of-address, it must register with its HA

Foreign Agent (FA): An agent on the MH’s local network

Maintains a mapping from the MH’s home address to its care-of-address

Page 62: CS/ECE 439: Wireless Networking

Issues

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Scenario CH sends packet to home network

Challenges How does the MH get a local IP address?

How can a mobile host tell where it is?

How does the HA intercept a packet that is destined for the MH?

How does the HA then deliver the packet to the FA?

How does the FA deliver the packet to the MH?

Page 63: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Basic Mobile IP

HA FA

MH: Mobile host

HA: Home Agent

FA: Foreign Agent

CH: Correspondent Host CH

128.174.5.x 171.64.14.x

MH

128.174.5.58

MH

128.174.5.58

171.64.14.14

Registration

171.64.14.14

CoA: Care-of-Address

Page 64: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Basic Mobile IP

HA FA

CH

128.174.5.x 171.64.14.x

MH

128.174.5.58

171.64.14.14

Registration

171.64.14.14

Agent Discovery

Assignment of CoA

CoA Registration

Packet Tunneling

Page 65: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Addressing

How does the mobile host get a remote IP address? Listen for router advertisements

Use DHCP

Manual assignment

Assigning care-of-address MH discovers foreign agent (FA) using an agent

discovery protocol

MH registers with FA and FA’s address becomes MH’s care-of-address

MH obtains a temporary IP address from FA or via DHCP-like procedures

Page 66: CS/ECE 439: Wireless Networking

Location

Fall 2013 © CS/ECE 439 Staff, University of Illinois

How can a mobile host tell where it is?

Am I at home?

Am I visiting a foreign network?

Have I moved?

Same!

Listen for router advertisements

Put network interface into promiscuous mode

and watch traffic

Page 67: CS/ECE 439: Wireless Networking

Agent Discovery

Fall 2013 © CS/ECE 439 Staff, University of Illinois

How can a mobile host tell where it is? Extension of ICMP protocol

Allows MH to detect when it has moved from one network to another, or to home

FA Periodically broadcasts agent advertisement message

FA

171.64.14.x

MH

128.174.5.58

Page 68: CS/ECE 439: Wireless Networking

Agent Discovery

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Register with FA

MH determines a suitable FA (or its HA)

Send agent solicitation message

If MA has not received a broadcast for a period

of time

Page 69: CS/ECE 439: Wireless Networking

Packet Delivery

Fall 2013 © CS/ECE 439 Staff, University of Illinois

How does the HA intercept a packet that is destined for the MH?

While MH in foreign location HA intercepts all packets for MH

Using proxy ARP

HA tunnels all packets to FA IPIP - “IP within IP”

Upon receipt of an IP datagram Packet is encapsulated in an IP packet of type IPPROTO_IPIP

and sent to FA FA strips IPIP header and sends packet to MH using local IP

address

FA strips packet and forwards to MH

Page 70: CS/ECE 439: Wireless Networking

Registration

Fall 2013 © CS/ECE 439 Staff, University of Illinois

MA must register with FA and tell HA its

new care-of-address

MH sends registration request message to FA

FA forwards request to HA

HA returns registration reply message to FA

FA forwards reply to MH

Registration may have a set lifetime

Page 71: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Care-of-Address Registration

H

A

FA

128.174.5.x

171.64.14.x

MH

128.174.5.58

Registration

Request Request

Relay

Registration

Reply

Reply

Relay

171.64.14.14

128.174.5.58

Timeout

171.64.14.14

Page 72: CS/ECE 439: Wireless Networking

Network Layer

Fall 2013 © CS/ECE 439 Staff, University of Illinois

IPIP - “IP within IP”

Tunnel IP datagrams from one cell to another

Upon receipt of an IP datagram

Packet is encapsulated in an IP packet of type

IPPROTO_IPIP and sent to remote MSS

Remote MSS strips IPIP header and sends packet to

MH using “real” IP address

Page 73: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Tunneling

HA

FA

128.174.5.x

171.64.14.x

MH

128.174.5.58

128.174.5.58

128.174.5.58

171.64.14.14 128.174.5.58

CH

171.64.14.14

Page 74: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Tunneling Using IP-in-IP Encapsulation

Vers

Fragment Offset Flags IP Identification

Total Length TOS IHL

TTL IP in IP IP Header Checksum

Tunnel Source IP Address

Care-of-Address

Vers

Fragment Offset Flags IP Identification

Total Length TOS IHL

TTL Orig. Protocol IP Header Checksum

Original Source IP Address

IP Address of Mobile Host

TCP/UDP/etc

0 4 8 16 19 31

Page 75: CS/ECE 439: Wireless Networking

Min Encap

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Tunneling Using Minimal Tunneling

Protocol

Vers

Fragment Offset Flags IP Identification

Total Length TOS IHL

TTL IP Header Checksum

Tunnel Source IP Address

Care-of-Address

Tunnel Header Checksum S

Original Source IP Address (only present if S is set)

IP Address of Mobile Host

TCP/UDP/etc

0 4 8 16 19 31

Orig. Protocol

Page 76: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Basic Mobile IP

Transparent mobility support at network layer

No modification to network infrastructure

Routing Inefficiency Triangle Routing Problem

Security Issues Firewalls, Ingress filtering router

Page 77: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Triangle Routing

HA

CH

MH

Page 78: CS/ECE 439: Wireless Networking

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Route Optimization

Basic Mobile IP routes all packets for a MH

through its home network and HA

Limits performance

Potential bottleneck

Not scalable

Solution

Cache MH location and care-of address

Page 79: CS/ECE 439: Wireless Networking

Protocol Scalability

Fall 2013 © CS/ECE 439 Staff, University of Illinois

The Home Network Home agents provide a decentralized, scalable

solution No overhead for MH when they are at their home

network

The Foreign Network Foreign agents provide a local scalable solution

Binding Caches Provide tradeoff between performance and state

Impact on the network Routing packets directly to MH reduces overhead

in the Internet

Page 80: CS/ECE 439: Wireless Networking

Mobile IP Discussion

Fall 2013 © CS/ECE 439 Staff, University of Illinois

Mobile IP not used in practice

Not designed for truly mobile users i.e. for continuous operation across subnets

Switching between subnets is heavy weight

Designed for nomadic users, e.g. visitors to a remote site

Was designed for mobile devices that are contacted by a “client” Very rare: mobile devices usually only run client apps

They rarely run services

Correct solution is to separate identifiers and “locators”