Mobile Ad Hoc Networking: Network Layer Issues
Mobile Ad Hoc Networking: Network Layer Issues
three important functions: r path determination: route taken by packets from source to dest. Routing algorithms r forwarding: move packets from routers input to appropriate router output r call setup: some network architectures require router call setup along path before data flows
network data link physical network data link physical application transport network data link physical
service abstraction
r r r
guaranteed bandwidth? preservation of inter-packet timing (no jitter)? loss-free delivery? in-order delivery? congestion feedback to sender?
? ? ?
Virtual circuits
source-to-dest path behaves much like telephone circuit
m m
application transport 5. Data flow begins network 4. Call connected data link 1. Initiate call physical
Virtual circuits
call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host ID) r every router on source-dest path maintains state for each passing connection
r r
m
r used to setup, maintain teardown VC r used in ATM, frame -relay, X.25 r not used in todays Internet
Internet (Datagram)
r
evolved from telephony human conversation: m strict timing, reliability requirements m need for guaranteed service r dumb end systems m telephones m complexity inside network
data exchange among computers m elastic service, no strict timing req. r smart end systems (computers) m can adapt, perform control, error recovery m simple inside network, complexity at edge r heterogeneous link types m different characteristics m uniform service difficult
Outline
1. Network Service Models 2. Routing Principles
m m m
Routing
Routing protocol
Goal: determine a good path (sequence of routers) thru network from source to dest. Graph abstraction for routing algorithms: r graph nodes are routers r graph edges are physical links
m
5 2 1
B
2
3 3 1
C
1
F
2
r good path:
m m
Static or dynamic?
Static: r routes change slowly over time Dynamic: r routes change more quickly m periodic update m in response to link cost changes
net topology, link costs known to all nodes m accomplished via link state broadcast m all nodes have same info r computes least cost paths from one node (source) to all other nodes m gives routing table for that node
iterative:
r
Given my distance to a neighboring node r Given the distances from the neighboring nodes to remote nodes My distances to remote nodes
asynchronous:
nodes need not exchange info/iterate in lock step! distributed: r each node communicates only with directly-attached neighbors
r
Each node x has its own r Each element of the vector contains the current estimate of and the next hop to a destination r Each node in the network corresponds to an element of the vector
DV of node x
Dest y w z Dist Via 2 2 3 a a y
D_X (Y)
Each node: wait for (msg from neighbor) recompute distance table
if least cost path to any dest has changed, notify neighbors
3 A 1 1 B 1 C
Speed of Convergence
LS: O(n2) algorithm requires O(nE) msgs m may have oscillations r DV: convergence time varies m may be routing loops m count-to-infinity problem
r
node can advertise incorrect link cost each node computes only its own table DV node can advertise incorrect path cost each nodes table used by others
error propagate thru network
DV:
m m
IP Addresses
classful addressing:
class A B C D
0 network 10 110 1110 network network multicast address host host host
1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255
32 bits
IP addressing: CIDR
r
Classful addressing:
m m
inefficient use of address space, address space exhaustion e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network network portion of address of arbitrary length address format (1): a.b.c.d/x, where x is # bits in network portion of address
network part
host part
Stub AS: small corporation: one connection to other ASs Multihomed AS: large corporation (no transit): multiple connections to other ASs Transit AS: provider, hooking many ASs together
r Two-level routing:
m m
Intra-AS: administrator responsible for choice of routing algorithm within network Inter-AS: unique standard for inter-AS routing: BGP
10
Internet AS Hierarchy
Inter-AS border (exterior gateway) routers
11
Intra-AS Routing
r Also known as Interior Gateway Protocols (IGP) r Most common Intra-AS routing protocols:
m m m
RIP: Routing Information Protocol OSPF: Open Shortest Path First IGRP: Interior Gateway Routing Protocol (Cisco proprietary)
similar to Distance Vector protocol each Border Gateway broadcast to neighbors (peers) entire path (i.e., sequence of ASs) to destination BGP routes to networks (ASs), not individual hosts E.g., Gateway X may send its path to dest. Z: Path (X,Z) = X,Y1,Y2,Y3,,Z
12
BGP operation
Q: What does a BGP router (gateway) do?
r Receiving and filtering route advertisements from directly
attached neighbor(s).
m
r Route selection.
Shaw
Telus
Bell
13
legend:
X does not want to route from B via X to C .. so X will not advertise to B a route to C
legend:
r A advertises to B the simple BGP scenario Figure 4.5-BGPnew: a path AW r B advertises to X the path BAW r Should B advertise to C the path BAW?
m m m
No way! B gets no revenue for routing CBAW since neither W nor C is Bs customer B wants to force C to route to w via A B wants to route only to/from its customers! C. Huitema , Routing on the Internet. Prentice-Hall, 2000.
Review: Network Layer 28
14
Outline
1. Network Service Models 2. Routing Principles
m m m
single transmit operation m analogy: one teacher to many students r Question: how to achieve multicast
15
single transmit operation m analogy: one teacher to many students r Question: how to achieve multicast
single transmit operation m analogy: one teacher to many students r Question: how to achieve multicast
Network multicast
r Router actively participate in
multicast, making copies of packets as needed and forwarding towards multicast receivers
16
single transmit operation m analogy: one teacher to many students r Question: how to achieve multicast
Application-layer multicast
r end systems involved in
128.34.108.63
128.34.108.60
multicast group concept: use of indirection m hosts addresses IP datagram to multicast group m routers forward multicast datagrams to hosts that have joined that multicast group m Many-to-many communications
Review: Network Layer 34
17
Multicast groups
q class D Internet addresses reserved for multicast:
q host group semantics: o anyone can join (receive) multicast group o anyone can send to multicast group o no network-layer identification to hosts of members q needed: infrastructure to deliver mcast-addressed datagrams to all hosts that have joined that multicast group
IGMP
IGMP
18
IP_ADD_MEMBERSHIP socket option m host need not explicitly unjoin group when leaving r router: sends IGMP query at regular intervals m host belonging to a mcast group must reply to query
m
query
report
IGMP
IGMP version 1 r router: Host Membership Query msg broadcast on LAN to all hosts r host: Host Membership Report msg to indicate group membership
m m
last host replying to Query can send explicit Leave Group msg router performs groupspecific query to see if any hosts left in group RFC 2236
r RFC 1112
S. Deering: Multicast Routing in a Datagram Network, PhD Thesis, Stanford University, 1991.
19
Goal: find a tree (or trees) connecting routers having local mcast group members
m m m
tree: not all paths between routers used source-based: different tree from each sender to rcvrs shared-tree: same tree used by all group members (senders)
Shared tree
Source-based trees
shortest path trees reverse path forwarding minimal spanning (Steiner) center-based trees
we first look at basic approaches, then specific protocols adopting these approaches
Review: Network Layer 40
20
mcast forwarding tree: tree of shortest path routes from source to all receivers
m
Dijkstras algorithm
S: source R1 1 R2 3 R3 4 R6 6 R7 2 R4 5 R5
LEGEND router with attached group member router with no attached group member i link used for forwarding, i indicates order link added by algorithm
Review: Network Layer 41
Flooding
S: source R1 R2 R5 R3 R6 R7 R4
21
shortest path from it to sender q each router has simple forwarding behavior:
if (mcast datagram received on incoming link on shortest path back to center) then flood datagram onto all outgoing links else ignore datagram
result is a source-specific reverse spanning tree may be a bad choice with asymmetric links
22
members m no need to forward datagrams down subtree m prune msgs sent upstream by router with no downstream group members
LEGEND R1 R2 R4 P R5 P P R7 router with attached group member router with no attached group member prune message links with multicast forwarding
Review: Network Layer 45
S: source
R3
R6
R1
R4
S: source
23
Minimum Spanning Tree: minimum cost tree connecting all routers with attached group members
m
Algorithms ?
Steiner Tree : minimum cost tree connecting a set of routers, which includes all that with attached group members
Minimum Spanning Tree: minimum cost tree connecting all routers with attached group members
m
Steiner Tree : minimum cost tree connecting a set of routers, which includes all that with attached group members
24
L. Wei and D. Estrin, A Comparison of multicast trees and algorithms, TR USC-CD-93-560, University of California, Sept 1993.
25
Internet Multicasting Routing: DVMRP DVMRP: distance vector multicast routing protocol, RFC1075 r flood and prune: reverse path forwarding, sourcebased tree
r
m m m m
RPF tree based on DVMRPs own routing tables constructed by communicating DVMRP routers no assumptions about underlying unicast initial datagram to mcast group flooded everywhere via RPF routers not wanting group: send upstream prune msgs commonly implemented in commercial routers Mbone routing done using DVMRP
Review: Network Layer 51
Facts
m m
Dense:
group members densely packed, in close proximity. q bandwidth more plentiful
q
Sparse:
# networks with group members small wrt # interconnected networks q group members widely dispersed q bandwidth not plentiful
q
Review: Network Layer 52
26
Tunneling
Q: How to connect islands of multicast routers in a sea of unicast routers?
physical topology
logical topology
addressed) datagram
Other issues
r Inter-AS multicast routing ?
m
27
Outline
1. Network Layer Service Models 2. Routing Principles
m m m
Peer-to-Peer Paradigm
A peer is both client and server Recall Client/Server paradigm Client:
r
application transport network data link physical
request
Server:
r r
initiates contact with server (speaks first) r typically requests service from server, r Web: client implemented in browser; e-mail: in mail reader provides requested service to client e.g., Web server sends requested Web page, mail server delivers e-mail
reply
application transport network data link physical
28
Peer-to-Peer Communications
Example r Alice runs P2P client application on her notebook computer r Intermittently connects to Internet; gets new IP address for each connection r Asks for Network love.mp3 r Application displays other peers that have copy of Network love.mp3.
r Alice chooses one of the
peers, Bob.
to Alices notebook: HTTP r While Alice downloads, other users uploading from Alice. r Alices peer is both a Web client and a transient Web server. All peers are servers = highly scalable!
1 peers 1 3
1 2 1
IP address content
2) Alice queries for Network love.mp3 3) Alice requests file from Bob
Alice
29
P2P: problems with centralized directory Single point of failure r Performance bottleneck r Copyright infringement
r file transfer is decentralized, but locating content is highly decentralized
leader or assigned to a group leader. r Group leader tracks the content in all its children. r Peer queries group leader; group leader may query other group leaders.
30
disadvantages of approach
r bootstrap node needed r group leaders can get overloaded
join
31
32
1.5Mbps DSL
1.5Mbps DSL
56kbps Modem
1.5Mbps DSL
10Mbps LAN
1.5Mbps DSL
56kbps Modem 56kbps Modem
Frustrated by popularity of all these half-baked P2P apps We can do better! Guaranteed lookup success for files in system Provable bounds on search time Provable scalability to millions of node No practical use so far (?)
33
application put(key, data) get (key) hash table node node . node data
need to repartition the range space over existing nodes need to reorganize neighbor set need bootstrap mechanism to connect new nodes into the existing DHT infrastructure
34
Case Studies
r
Key Questions
m m
Chord CAN (Content Addressable Network) Q1: How is hash space divided evenly among existing nodes? Q2: How is routing implemented that connects an arbitrary node to the node responsible for a given object? Q3: How is the hash space repartitioned when nodes join/leave?
Let N be the number of nodes in the overlay r Let H be the size of the range of the hash function (when applicable)
r
Chord
r Associate to each node and file a unique id in an uni-
E.g., pick from the range [0...2m] Usually the hash of the file or IP address
r Properties:
m
Routing table size is O(log N) , where N is the total number of nodes m Guarantees that a file is found in O(log N) hops
35
Consistent Hashing
Key 5
Node 105
K5 K20
N105
N32
N32
K80 N90
N60
Review: Network Layer 72
36
1/8
N80
Entry i in the finger table of node n is the first node that succeeds or equals n + 2i r In other words, the ith finger points 1/2n-i way around the ring
r
Review: Network Layer 73
Chord Summary
r Routing
m Log
N fingers
r Routing
m Each
hop expects to 1/2 the distance to the desired id => expect O(log N) hops.
37
r r r
in a D-dimensional Cartesian space each node responsible for a D-dimensional cube in the space The space is covered by all the nodes Example: Initial node n1:(1, 2)
n2:(4, 2) joins
7 6 5 4 3 n1 2 1 0 0 1 2 3 4 5 6 7 n2
38
n3:(3, 5) joins?
7 6 5 4 3 n1 2 1 0 0 1 2 3 4 5 6 7 n2 n3
7 6 5 4 3 n1 2 1 0 0 1 2 3 4 5 6 7 n2 n3 n4 n5
39
7 6 5 4 3 n1 2 f3 1 0 0 1 2 3 4 f2 5 6 7 f1 n2 n3 n4 f4 n5
40
7 6 5 4 3 n1 2 f3 1 0 0 1 2 3 4 f2 5 6 7 f1 n2 n3 n4 f4 n5
DHT: Discussion
r
Pros:
m m
Guaranteed Lookup O(log N) per node state and search scope No one uses them? Supporting non-exact match search is hard Topology-awareness ?
Cons:
m m m
41
Outline
1. Network Layer Service Models 2. Routing Principles
m m m
Guarantee only one thing (sometimes even cannot) -- delivery a packet to destination TCP Multicast Proxy filtering/caching Content distribution (replication) P2P
But, many things cannot be guaranteed in transport/application layer if network layer does not guarantee them
m
42
bursts of FTP can congest router, cause audio loss want to give priority to audio over FTP
Principle 1 packet marking needed for router to distinguish between different classes; and new router policy to treat packets accordingly
Review: Network Layer 86
43
policing: force source adherence to bandwidth allocations similar to ATM UNI (User Network Interface)
Allocating fixed (non-sharable) bandwidth to flow: inefficient use of bandwidth if flows doesnt use its allocation
44
Basic fact of life: can not support traffic demands beyond link capacity
Principle 4 Call Admission: flow declares its needs, network may block call (e.g., busy signal) if it cannot meet needs
Review: Network Layer 89
45
discard policy: if packet arrives to full queue: who to discard? Tail drop: drop arriving packet priority: drop/remove on priority basis random: drop/remove randomly
class may depend on marking or other header info, e.g. IP source/dest, port numbers, etc..
46
WA=7
WB=1
WC=4
round length = 13
Review: Network Layer 94
47
Is it fair ? Only if packets are of same size Does it guarantee bandwidth (in a small time scale) ? GPS can provide fairness and protection Visit each non-empty queue in turn, serve infinitesimal data (1 bit) GPS is not implementable; we can serve only packets
Fairness, protection.
m m m
48
Policing Mechanisms
Token Bucket: limit input to specified Burst Size
and Average Rate.
bucket can hold b tokens r tokens generated at rate r token/sec unless bucket full r over interval of length t: number of packets admitted less than or equal to (r t + b).
r
Review: Network Layer 97
token bucket, WFQ combine to provide guaranteed upper bound on delay, i.e., QoS guarantee!
token rate, r bucket size, b
arriving traffic
WFQ
per-flow rate, R
D = b/R max
49
Question: can newly arriving flow be admitted with performance guarantees while not violated QoS guarantees made to already admitted flows?
Resource reservation
m m m
call setup, signaling (RSVP) traffic, QoS declaration per-element admission control
request/ reply
m
50
Call Admission
Arriving session must :
declare its QOS requirement m R-spec: defines the QOS being requested r characterize traffic it will send into network m T-spec: defines traffic characteristics r signaling protocol: needed to carry R-spec and Tspec to routers (where reservation is required) m RSVP
r
worst case traffic arrival: leakyr "a quality of service closely approximating the QoS that bucket-policed source same flow would receive from an r simple (mathematically provable) unloaded network element." bound on delay [Parekh 1992, Cruz 1988] arriving traffic token rate, r bucket size, b
WFQ
per-flow rate, R
D = b/R max
Review: Network Layer 102
51
allow users to communicate requirements to network in robust and efficient way. i.e., signaling ! r earlier Internet Signaling protocol: ST-II [RFC 1819]
accommodate heterogeneous receivers (different bandwidth along paths) accommodate different applications with different resource requirements make multicast a first class service, with adaptation to multicast group membership leverage existing multicast/unicast routing, with adaptation to changes in underlying unicast, multicast routes control protocol overhead to grow (at worst) linear in # receivers modular design for heterogeneous underlying technologies
52
rather: a mechanism for communicating needs thats the job of routing protocols signaling decoupled from routing separation of control (signaling) and data (forwarding) planes
Diffserv approach: r simple functions in network core, relatively complex functions at edge routers (or hosts) r define service classes, provide functional components to build service classes
53
Diffserv Architecture
Edge router:
- per-flow traffic management - marks packets as in-profile and out-profile
r marking scheduling b
. . .
Core router:
- per class traffic management - buffering and scheduling based on marking at edge - preference given to in-profile packets - Assured Forwarding
Review: Network Layer 107
profile: pre-negotiated rate A, bucket size B packet marking at edge based on per-flow profile
class-based marking: packets of different classes marked differently intra-class marking: conforming portion of flow marked differently than non-conforming one
54
55
Drop-tail queueing
P6 P5 P4 P3 P2 P1 Scheduler
FCFS
ISP
Internet
ISP
Review: Network Layer 111
P6 P5 P4 P3 P2 P1
End-to-end latency dominated by length of queues at switches in network connections transmitting at high rates can starve connections transmitting at low rates connections can synchronize their response to congestion
56
P6 P5 P4 P3 P2 P1
When queue length exceeds threshold, packets dropped with fixed probability
m m
probabilistic packet drop: flows see same loss rate problem: bursty traffic (burst arrives when queue is near full) can be over-penalized
Drop probability
Forced drop Probabilistic early drop No drop
Time
r use exponential average of queue length to determine when to
drop m avoid overly penalizing short-term bursts m React to longer term trends r tie drop prob. to weighted avg. queue length m avoids over-reaction to mild overload conditions
57
Drop probability
Forced drop Probabilistic early drop No drop
Time Drop probability 100% maxp min max Weighted Average Queue Length
Review: Network Layer 115
provide gentle early warning with tail-drop, low-sending-rate sessions can be completely starved avoid cycles of large-loss followed by no-transmission
r r
WRED (Cisco)
X. Xiao and L. M. Ni, "Internet QoS: A Big Picture", IEEE Network Magazine, March 1999.
Review: Network Layer 116
58