0% found this document useful (0 votes)
11 views

Unit 2 Tunneling and Encapsulation

Chapter 6 of the document discusses network protocols related to Mobile IP, including data transfer methods, encapsulation processes, and routing techniques. It highlights the challenges of triangle routing, the benefits of reverse tunneling, and the integration of Mobile IP with IPv6 for improved functionality. Additionally, the chapter addresses security concerns and requirements for Mobile IP, emphasizing the need for authentication and confidentiality in data transmission.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Unit 2 Tunneling and Encapsulation

Chapter 6 of the document discusses network protocols related to Mobile IP, including data transfer methods, encapsulation processes, and routing techniques. It highlights the challenges of triangle routing, the benefits of reverse tunneling, and the integration of Mobile IP with IPv6 for improved functionality. Additionally, the chapter addresses security concerns and requirements for Mobile IP, emphasizing the need for authentication and confidentiality in data transmission.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 41

Wireless & Mobile Communications

Chapter 6: Network Protocols/Mobile IP


 Motivation  Problems
 Data transfer  DHCP
 Encapsulation  Ad-hoc networks
 Security
 Routing protocols
 IPv6
Example network

HA
MN

router

home network mobile end-system


Internet
(physical home network
for the MN)
FA foreign
network
router
(current physical network
for the MN)
CN

end-system router
Data transfer to the mobile system

HA
2
MN

home network receiver


3
Internet

FA foreign
network

1. Sender sends to the IP address of MN,


HA intercepts packet (proxy ARP)
1 2. HA tunnels packet to COA, here FA,
CN
by encapsulation
3. FA forwards the packet
sender to the MN

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.3


Data transfer from the mobile system

HA
1 MN

home network sender


Internet

FA foreign
network

1. Sender sends to the IP address


of the receiver as usual,
CN
FA works as default router

receiver

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.4


Overview
COA

router
home router MN
FA
network HA

foreign
Internet network

CN router

3.
router
home router MN
2. FA
network HA
4.
foreign
Internet network

1.
CN router

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.5


Routing/Tunneling 1/5

 Routing a packet to a MN involves the following:


 A router on the home link, possibly the HA, advertises
reachability to the network prefix of the MN’s home address.
 All packets are therefore routed to the MN’s home link.
 A HA intercepts the packets for the MN and tunnels a copy to
each COA in the binding table.
 At the foreign link either the MN extracts the packet
(collocated COA) or the FA extracts the packet and forwards it
to the MN.

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.6


Routing/Tunneling 2/5

 A HA can use one of two methods to intercept a MN’s


packets:
 The HA is a router with multiple network interfaces. In that
case it advertises reachability to the MN’s home network
prefix.
 The HA is not a router with multiple intefaces. It must use ARP
to receive the MN’s packets. It either responds to ARP
requests on behalf of the MN (proxy ARP) or uses gratuitous
ARPs to inform the home network that it is receiving the MN’s
IP packets. This is to update any ARP caches that hosts and
other devices might have.

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.7


Routing/Tunneling 3/5

 How to ‘fool’ the routing table into handling tunneled


packets at the HA?
 A virtual interface is used to do the encapsulation.
 A packet destined for the MN is handled by the routing routine
as all received IP packets are.
 The routing table has a host specific entry for the MN. This host
specific entry is used to route the packet to a virtual interface
that basically consists of a process that does encapsulation.
 Once encapsulation has been performed the packet is sent to
be processed by the routing routine again. This time the
destination address is the COA and it is routed normally.

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.8


Routing/Tunneling 4/5

 How to ‘fool’ the routing table into handling tunneled packets


at the FA?
 The same procedure is used as above.
 A packet coming in with a COA that is one of the FA addresses’
is handled by the routing routine.
 A host specific address (its own address) in the routing table
points to the higher layers and the packet is passed on to a
virtual interface.
 The virtual interface consists of a process that decapsulates the
packet and re-routes it to the routing routine.
 The routing routine routes the packet normally based upon a
host specific entry that is the MN’s home address (for which it
has the link layer address!).

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.9


Routing/Tunneling 5/5

 How does a MN route its packets?


 It needs to find a router to send all its packets to.
 It can select a router in one of a number of ways dependent
upon whether it has a FA COA or a collocated COA.
 Having a FA COA does not imply that the MN needs to use it as
its default router for sending packets. It can use any router that
sends advertisements or that is advertised in the Agent
Advertisement message.
 If the MN is using a collocated COA it needs to listen for router
advertisements or is it hears none, use DHCP to find the default
router.
 Determining the link layer address is another issue. Collocated
COA MNs can use ARP. FA COA must note the link layer address
when they receive router advertisements or agent
advertisements.

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.10


Encapsulation Process

original IP header original data

new IP header new data

outer header inner header original data

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.11


Types of Encapsulation

 Three types of encapsulation protocols are specified for


Mobile IP:
 IP-in-IP encapsulation: required to be supported. Full IP
header added to the original IP packet. The new header
contains HA address as source and Care of Address as
destination.
 Minimal encapsulation: optional. Requires less overhead but
requires changes to the original header. Destination address
is changed to Care of Address and Source IP address is
maintained as is.
 Generic Routing Encapsulation (GRE): optional. Allows
packets of a different protocol suite to be encapsulated by
another protocol suite.
 Type of tunneling/encapsulation supported is indicated in
registration.

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.12


IP in IP Encapsulation

 IP in IP encapsulation (mandatory in RFC 2003)


 tunnel between HA and COA

ver. IHL TOS length


IP identification flags fragment offset
TTL IP-in-IP IP checksum
IP address of HA
Care-of address COA
ver. IHL TOS length
IP identification flags fragment offset
TTL lay. 4 prot. IP checksum
IP address of CN
IP address of MN
TCP/UDP/ ... payload

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.13


Minimum Encapsulation

 Minimal encapsulation (optional)


 avoids repetition of identical fields
 e.g. TTL, IHL, version, TOS
 only applicable for unfragmented packets, no space left for
fragment identification

ver. IHL TOS length


IP identification flags fragment offset
TTL min. encap. IP checksum
IP address of HA
care-of address COA
lay. 4 protoc. S reserved IP checksum
IP address of MN
original sender IP address (if S=1)
TCP/UDP/ ... payload

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.14


Generic Routing Encapsulation

original
original data
header

GRE original
outer header original data
header header

new header new data

ver. IHL TOS length


IP identification flags fragment offset
TTL GRE IP checksum
IP address of HA
Care-of address COA
C R K S s rec. rsv. ver. protocol
checksum (optional) offset (optional)
key (optional)
sequence number (optional)
routing (optional)
ver. IHL TOS length
IP identification flags fragment offset
TTL lay. 4 prot. IP checksum
IP address of CN
IP address of MN

TCP/UDP/ ... payload

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.15


Routing techniques

 Triangle Routing: tunneling in its simplest form has all


packets go to home network (HA) and then sent to MN via a
tunnel.
 This involves two IP routes that need to be set-up, one original
and the second the tunnel route.
 Causes unnecessary network overhead and adds to the
latency.
 Route optimization: allows the correstpondent node to
learn the current location of the MN and tunnel its own
packets directly. Problems arise with
 mobility: correspondent node has to update/maintain its
cache.
 authentication: HA has to communicate with the
correspondent node to do authentication, i.e., security
association is with HA not with MN.

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.16


Optimization of packet forwarding

 Change of FA
 packets on-the-fly during the change can be lost
 new FA informs old FA to avoid packet loss, old FA now
forwards remaining packets to new FA
 this information also enables the old FA to release resources
for the MN

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.17


Change of foreign agent
CN HA FAold FAnew MN
request
update
ACK

data data
MN changes
location
registration registration
update
ACK
data
data data
warning

update
ACK
data
data
t

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.18


Problems with Triangle Routing

 Triangle routing has the MN correspond directly with the


CN using its home address as the SA
 Firewalls at the foreign network may not allow that
 Multicasting: if a MN is to participate in a multicast group, it
needs to use a reverse tunnel to maintain its association with
the home network.
 TTL: a MN might have a TTL that is suitable for communication
when it is in its HM. This TTL may not be sufficient when
moving around (longer routes possibly). When using a reverse
tunnel, it only counts as a single hop. A MN does not want to
change the TTL everytime it moves.
 Solution: reverse tunneling

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.19


Reverse tunneling (RFC 2344)

HA
2
MN

home network sender


1
Internet

FA foreign
network

1. MN sends to FA
3 2. FA tunnels packets to HA
CN by encapsulation
3. HA forwards the packet to the
receiver (standard case)
receiver

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.20


Mobile IP with reverse tunneling

 Routers accept often only “topologically correct“


addresses (firewall!)
 a packet from the MN encapsulated by the FA is now
topologically correct
 Multicast and TTL problems solved
 Reverse tunneling does not solve
 all problems with firewalls, the reverse tunnel can be abused
to circumvent security mechanisms (tunnel hijacking)
 optimization of data paths, i.e. packets will be forwarded
through the tunnel via the HA to a sender (longer routes)
 The new standard is backwards compatible
 the extensions can be implemented easily

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.21


Mobile IP and IPv6

 Mobile IP was developed for IPv4, but IPv6 simplifies the


protocols
 security is integrated and not an add-on, authentication of
registration is included
 COA can be assigned via auto-configuration (DHCPv6 is one
candidate), every node has address autoconfiguration
 no need for a separate FA, all routers perform router
advertisement which can be used instead of the special agent
advertisement
 MN can signal a sender directly the COA, sending via HA not
needed in this case (automatic path optimization)
 „soft“ hand-over, i.e. without packet loss, between two
subnets is supported
MN sends the new COA to its old router
the old router encapsulates all incoming packets for the MN and
forwards them to the new COA
authentication is always granted

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.22


Problems with Mobile IP

 Security
 authentication with FA problematic, for the FA typically
belongs to another organization
 no protocol for key management and key distribution has been
standardized in the Internet
 patent and export restrictions
 Firewalls
 typically mobile IP cannot be used together with firewalls,
special set-ups are needed (such as reverse tunneling)
 QoS
 many new reservations in case of RSVP
 tunneling makes it hard to give a flow of packets a special
treatment needed for the QoS
 Security, firewalls, QoS etc. are topics of current research
and discussions!

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.23


Security in Mobile IP

 Security requirements (Security Architecture for the


Internet Protocol, RFC 1825)
 Integrity
any changes to data between sender and receiver can be
detected by the receiver
 Authentication
sender address is really the address of the sender and all data
received is really data sent by this sender
 Confidentiality
only sender and receiver can read the data
 Non-Repudiation
sender cannot deny sending of data
 Traffic Analysis
creation of traffic and user profiles should not be possible
 Replay Protection
receivers can detect replay of messages

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.24


IP security architecture 1/2

 Two or more partners have to negotiate security


mechanisms to setup a security association
 typically, all partners choose the same parameters and
mechanisms
 Two headers have been defined for securing IP packets:
 Authentication-Header
guarantees integrity and authenticity of IP packets
if asymmetric encryption schemes are used, non-repudiation can also
be guaranteed

IP-Header
IP header Authentification-Header
authentication header UDP/TCP-Paket
UDP/TCP data

 Encapsulation Security Payload


protects confidentiality between communication partners

not encrypted encrypted


IP header ESP header encrypted data

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.25


IP security architecture 2/2

 Mobile Security Association for registrations


 parameters for the mobile host (MH), home agent (HA), and
foreign agent (FA)
 Extensions of the IP security architecture
 extended authentication of registration
MH-FA authentication FA-HA authentication
MH-HA authentication
registration request
registration request
MH FA registration reply HA
registration reply

 prevention of replays of registrations


time stamps: 32 bit time stamps + 32 bit random number
responses: 32 bit random number (MH) + 32 bit random number (HA)

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.26


Key distribution

 Home agent distributes session keys

FA MH

response:
EHA-FA {session key}
HA EHA-MH {session key}

 foreign agent has a security association with the home


agent
 mobile host registers a new binding at the home agent
 home agent answers with a new session key for foreign
agent and mobile node

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.27


DHCP: Dynamic Host Configuration Protocol

 Application
 simplification of installation and maintenance of networked
computers
 supplies systems with all necessary information, such as IP
address, DNS server address, domain name, subnet mask,
default router etc.
 enables automatic integration of systems into an Intranet or
the Internet, can be used to acquire a COA for Mobile IP
 Client/Server-Model
 the client sends via a MAC broadcast a request to the DHCP
server (might be via a DHCP relay) DHCPDISCOVER

DHCPDISCOVER
server client

client relay

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.28


DHCP - protocol mechanisms
server client server
(not selected) initialization (selected)
DHCPDISCOVER DHCPDISCOVER
determine the determine the
configuration configuration
DHCPOFFER DHCPOFFER
collection of replies
time

selection of configuration
DHCPREQUEST DHCPREQUEST
(reject) (options) confirmation of
configuration
DHCPACK
initialization completed

release
DHCPRELEASE delete context

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.29


DHCP characteristics

 Server
 several servers can be configured for DHCP, coordination not
yet standardized (i.e., manual configuration)
 Renewal of configurations
 IP addresses have to be requested periodically, simplified
protocol
 Options
 available for routers, subnet mask, NTP (network time
protocol) timeserver, SLP (service location protocol) directory,

DNS (domain name system)

 Big security problems!


 no authentication of DHCP information specified

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.30


Ad hoc networks

 Standard Mobile IP needs an infrastructure


 Home Agent/Foreign Agent in the fixed network
 DNS, routing etc. are not designed for mobility
 Sometimes there is no infrastructure!
 remote areas, ad-hoc meetings, disaster areas
 cost can also be an argument against an infrastructure!
 Main topic: routing
 no default router available
 every node should be able to forward

A B C

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.31


Routing examples for an ad-hoc network

N1 N1
N2 N3
N3 N2

N4 N4
N5 N5

time = t1 good link time = t2


weak link

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.32


Traditional routing algorithms

 Distance Vector
 periodic exchange of messages with all physical neighbors
that contain information about who can be reached at what
distance
 selection of the shortest path if several paths available
 Link State
 periodic notification of all routers about the current state of all
physical links
 router get a complete picture of the network
 Example
 ARPA packet radio network (1973), DV-Routing
every 7.5s exchange of routing tables including link quality
updating of tables also by reception of packets
routing problems solved with limited flooding

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.33


Problems of traditional routing algorithms

 Dynamics of the topology


 frequent changes of connections, connection quality,
participants

 Limited performance of mobile systems


 periodic updates of routing tables need energy without
contributing to the transmission of user data, sleep modes
difficult to realize
 limited bandwidth of the system is reduced even more due to
the exchange of routing information
 links can be asymmetric, i.e., they can have a direction
dependent transmission quality

 Problem
 protocols have been designed for fixed networks with
infrequent changes and typically assume symmetric links

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.34


DSDV (Destination Sequenced Distance Vector)

 Expansion of distance vector routing


 Sequence numbers for all routing updates
 assures in-order execution of all updates
 avoids loops and inconsistencies
 Decrease of update frequency
 store time between first and best announcement of a path
 inhibit update if it seems to be unstable (based on the stored
time values)
Dynamic source routing I

 Split routing into discovering a path and maintainig a path


 Discover a path
 only if a path for sending packets to a certain destination is
needed and no path is currently available
 Maintaining a path
 only while the path is in use one has to make sure that it can
be used continuously

 No periodic updates needed!

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.36


Dynamic source routing II

 Path discovery
 broadcast a packet with destination address and unique ID
 if a station receives a broadcast packet
if the station is the receiver (i.e., has the correct destination address)
then return the packet to the sender (path was collected in the packet)
if the packet has already been received earlier (identified via ID) then
discard the packet
otherwise, append own address and broadcast packet
 sender receives packet with the current path (address list)
 Optimizations
 limit broadcasting if maximum diameter of the network is
known
 caching of address lists (i.e. paths) with help of passing
packets
stations can use the cached information for path discovery (own paths
or paths for other hosts)

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.37


Dynamic Source Routing III

 Maintaining paths
 after sending a packet
wait for a layer 2 acknowledgement (if applicable)
listen into the medium to detect if other stations forward the packet (if
possible)
request an explicit acknowledgement
 if a station encounters problems it can inform the sender of a
packet or look-up a new path locally

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.38


Clustering of ad-hoc networks

Internet

cluster

super cluster

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.39


Interference-based routing

 Routing based on assumptions about interference between


signals

N1
N2

R1
S1 N3

N4

N5 N6 R2
S2

N8 N9
N7
neighbors
(i.e. within radio range)

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.40


Examples for interference based routing

 Least Interference Routing (LIR)


 calculate the cost of a path based on the number of stations
that can receive a transmission
 Max-Min Residual Capacity Routing (MMRCR)
 calculate the cost of a path based on a probability function of
successful transmissions and interference
 Least Resistance Routing (LRR)
 calculate the cost of a path based on interference, jamming
and other transmissions

 LIR is very simple to implement, only information from


direct neighbors is necessary

ICS 243E - Ch 6 Net. Protocols Winter 2001 6.41

You might also like