0% found this document useful (0 votes)
65 views58 pages

Mobile Ad Hoc Networking: Network Layer Issues

Network layer functions deliver packets from sending to receiving hosts. Virtual circuits "source-to-dest path behaves much like telephone circuit" datagram networks: Internet's model r no call setup at network layer.

Uploaded by

Kali Kumar Raju
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views58 pages

Mobile Ad Hoc Networking: Network Layer Issues

Network layer functions deliver packets from sending to receiving hosts. Virtual circuits "source-to-dest path behaves much like telephone circuit" datagram networks: Internet's model r no call setup at network layer.

Uploaded by

Kali Kumar Raju
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Mobile Ad Hoc Networking

Network Layer Issues

Review: Network Layer 1

Network Layer Issues and Applications


Contents 1. Network Service Models 2. Routing Principles
m m m

3. Multicast Routing 4. Peer-to-Peer 5. Internet QoS

Link state routing Distance vector routing Hierarchical routing

Review: Network Layer 2

Network layer functions


deliver packets from sending to receiving hosts r network layer protocols in every host, router
r
application transport network data link physical

network data link physical

network data link physical network data link physical

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

network data link physical

network data link physical network data link physical application transport network data link physical

Review: Network Layer 3

Network service model


Q: What service model for channel transporting packets from sender to receiver?
r r

service abstraction

r r r

guaranteed bandwidth? preservation of inter-packet timing (no jitter)? loss-free delivery? in-order delivery? congestion feedback to sender?

The most important abstraction provided by network layer:

? ? ?

virtual circuit or datagram?

Review: Network Layer 4

Virtual circuits
source-to-dest path behaves much like telephone circuit
m m

performance-wise network actions along source-to-dest path

application transport 5. Data flow begins network 4. Call connected data link 1. Initiate call physical

6. Receive data application 3. Accept call transport 2. incoming call network

data link physical

Review: Network Layer 5

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

link, router resources (bandwidth, buffers) may be allocated to VC


m

transport-layer connection only involved two end systems

to get circuit-like performance

r used to setup, maintain teardown VC r used in ATM, frame -relay, X.25 r not used in todays Internet

Review: Network Layer 6

Datagram networks: Internets model


r no call setup at network layer r routers: no state about end-to-end connections
m

no network-level concept of connection

r Forwarded: using destination host address


m

packets between same source-dest pair may take different paths

application transport network data link 1. Send data physical

application transport 2. Receive data network data link physical

Review: Network Layer 7

Datagram or VC network: why?


Asynchronous Transfer Mode - ATM (VC)
r r

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

Hard state vs Soft state


Review: Network Layer 8

Outline
1. Network Service Models 2. Routing Principles
m m m

Link state routing Distance vector routing Hierarchical routing

3. Multicast Routing 4. Peer-to-Peer 5. Internet QoS

Review: Network Layer 9

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

link cost: delay, $ cost, or congestion level

typically means minimum cost path other defs possible

Review: Network Layer 10

Routing Algorithm classification


Global or decentralized information?
Global: r all routers have complete topology, link cost info r link state algorithms Decentralized: r router knows physicallyconnected neighbors, link costs to neighbors r iterative process of computation, exchange of info with neighbors r distance vector algorithms

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

Review: Network Layer 11

Link-State Routing Algorithm


Dijkstras algorithm
r

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

Notation: r c(i,j): link cost from node i to


j. cost infinite if not direct neighbors path from source to dest V
r D(v): current value of cost of r p(v): predecessor node along

path from source to v, that is next v cost path definitively known

r N: set of nodes whose least

Review: Network Layer 12

Distance Vector Routing Algorithm


Key Idea
r

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

continues until no nodes exchange info. r self-terminating: no signal to stop

asynchronous:
nodes need not exchange info/iterate in lock step! distributed: r each node communicates only with directly-attached neighbors
r

Review: Network Layer 13

Distance Vector Routing Algorithm


Distance Vector
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)

Estimated distance = from X to Y = Min_w {c(X,w) + D_w(Y)}


Review: Network Layer 14

Distance Vector Routing: overview


Iterative, asynchronous: each
local iteration caused by: r message from neighbor: its least cost path change from neighbor Distributed: r each node notifies neighbors only when its least cost path to any destination changes
m

Each node: wait for (msg from neighbor) recompute distance table
if least cost path to any dest has changed, notify neighbors

neighbors then notify their neighbors if necessary

Review: Network Layer 15

Distance Vector: Count-to-Infinity Problem

3 A 1 1 B 1 C

Review: Network Layer 16

Comparison of LS and DV algorithms


Message complexity
LS: with n nodes, E links, O(nE) msgs sent each r DV: exchange between neighbors only m convergence time varies
r

Robustness: what happens if router malfunctions? LS:


m m

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

Review: Network Layer 17

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

Review: Network Layer 18

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

CIDR: Classless InterDomain Routing


m m

network part

host part

11001000 00010111 00010000 00000000 200.23.16.0/23


Review: Network Layer 19

Routing in the Internet


r The Global Internet consists of Autonomous Systems (AS)

interconnected with each other:


m m m

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

Review: Network Layer 20

10

Internet AS Hierarchy
Inter-AS border (exterior gateway) routers

Intra-AS interior (gateway) routers


Review: Network Layer 21

Topology of Tier-1 ISP

Review: Network Layer 22

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)

Review: Network Layer 23

Internet inter-AS routing: BGP


r BGP (Border Gateway Protocol): the de facto standard r Path Vector protocol:
m m m m

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

Review: Network Layer 24

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.

To route to destination X, which path (of several advertised) will be taken?

r Sending route advertisements to neighbors.

Review: Network Layer 25

Why different Intra-/Inter-AS routing ?

Shaw

Telus

Bell

Review: Network Layer 26

13

BGP: controlling who routes to you


B W A C Y X

legend:

provider network customer network:

Figure 4.5-BGPnew: a simple BGP scenario r A,B,C are provider networks


r X,W,Y are customer (of provider networks) r X is dual-homed: attached to two networks
m m

X does not want to route from B via X to C .. so X will not advertise to B a route to C

Review: Network Layer 27

BGP: controlling who routes to you


B W A C Y X

legend:

provider network customer network:

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

Link state routing Distance vector routing Hierarchical routing

3. Multicast Routing 4. Peer-to-Peer 5. Internet QoS

Review: Network Layer 29

Multicast: one sender to many receivers


r Multicast: act of sending datagram to multiple receivers with

single transmit operation m analogy: one teacher to many students r Question: how to achieve multicast

Multicast via unicast


r source sends N unicast

datagrams, one addressed to each of N receivers

routers forward unicast datagrams

multicast receiver (red) not a multicast receiver (red)


Review: Network Layer 30

15

Multicast: one sender to many receivers


r Multicast: act of sending datagram to multiple receivers with

single transmit operation m analogy: one teacher to many students r Question: how to achieve multicast

Multicast via unicast: Problems 1. Inefficient 2. Addressing


routers forward unicast datagrams multicast receiver (red) not a multicast receiver (red)
Review: Network Layer 31

Multicast: one sender to many receivers


r Multicast: act of sending datagram to multiple receivers with

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

Multicast routers (red) duplicate and forward multicast datagrams


Review: Network Layer 32

16

Multicast: one sender to many receivers


r Multicast: act of sending datagram to multiple receivers with

single transmit operation m analogy: one teacher to many students r Question: how to achieve multicast

Application-layer multicast
r end systems involved in

multicast copy and forward unicast datagrams among themselves

Review: Network Layer 33

Internet Multicast Service Model


128.59.16.12 128.119.40.186

multicast group 226.17.30.197

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

Review: Network Layer 35

Joining a mcast group: two-step process


r local: host informs local mcast router of desire to join group:

IGMP (Internet Group Management Protocol)

r wide area: local router interacts with other routers to receive

mcast datagram flow m many protocols (e.g., DVMRP, MOSPF, PIM)

IGMP wide-area multicast routing

IGMP

IGMP

Review: Network Layer 36

18

IGMP: Internet Group Management Protocol


r host: sends IGMP report when application joins mcast group

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

Review: Network Layer 37

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

IGMP v2: additions include r Leave Group msg


m

randomized delay before responding implicit leave via no reply to Query

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

IGMP v3: under development as


Internet draft

r RFC 1112

S. Deering: Multicast Routing in a Datagram Network, PhD Thesis, Stanford University, 1991.

Review: Network Layer 38

19

Multicast Routing: Problem Statement


r

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

Review: Network Layer 39

Approaches for building mcast trees


Approaches: r source-based tree: one tree per source
m m

shortest path trees reverse path forwarding minimal spanning (Steiner) center-based trees

group-shared tree: group uses one tree


m m

we first look at basic approaches, then specific protocols adopting these approaches
Review: Network Layer 40

20

Shortest Path Tree


r

Source based Tree:

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

Source based Tree:

Flooding

S: source R1 R2 R5 R3 R6 R7 R4

Problem: Broadcast storm

Review: Network Layer 42

21

Reverse Path Forwarding


q rely on routers knowledge of unicast

Source based Tree:

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

Review: Network Layer 43

Reverse Path Forwarding: example


S: source R1 R2 R5 R3 R6 R7 R4 LEGEND router with attached group member router with no attached group member datagram will be forwarded datagram will not be forwarded

result is a source-specific reverse spanning tree may be a bad choice with asymmetric links

Review: Network Layer 44

22

Reverse Path Forwarding: pruning


r forwarding tree contains subtrees with no mcast group

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

Multiple trees for multi-sender


S: source R1 R2 R5 R3 R6 R7 R3 R6 R7 R4 R2 R5

Reverse Path Forwarding:

R1

R4

S: source

Review: Network Layer 46

23

Shared-Tree: General Problem


r

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

Review: Network Layer 47

Shared-Tree: General Problem


r

Minimum Spanning Tree: minimum cost tree connecting all routers with attached group members
m

Prim, Kruskal algorithms

Steiner Tree : minimum cost tree connecting a set of routers, which includes all that with attached group members

Review: Network Layer 48

24

Spanning Tree vs Steiner Tree

Review: Network Layer 49

Shared-Tree: General Problem


r Minimum Spanning Tree: minimum cost tree connecting all

routers with attached group members


m

r Minimum Steiner Tree : minimum cost tree connecting a set

Prim, Kurskal algorithms

of routers, which includes all that with attached group members


m m

problem is NP-complete excellent heuristics exists

L. Wei and D. Estrin, A Comparison of multicast trees and algorithms, TR USC-CD-93-560, University of California, Sept 1993.

Review: Network Layer 50

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

PIM: Protocol Independent Multicast


r not dependent on any specific underlying unicast routing

algorithm (works with all)

r two different multicast distribution scenarios :

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

q mcast datagram encapsulated inside normal (non-multicast-

addressed) datagram

q normal IP datagram sent thru tunnel via regular IP unicast to

receiving mcast router

q receiving mcast router decapsulates to get mcast datagram


Review: Network Layer 53

Other issues
r Inter-AS multicast routing ?
m

No standard, but DVMRP often used Yes, MOSPF

r Any link-state based multicast protocol ?


m

Review: Network Layer 54

27

Outline
1. Network Layer Service Models 2. Routing Principles
m m m

Link state routing Distance vector routing Hierarchical routing

3. Multicast Routing 4. Peer-to-Peer 5. Internet QoS

Review: Network Layer 55

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

Review: Network Layer 56

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.

r File is copied from Bobs PC

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!

Review: Network Layer 57

P2P: centralized directory


For file sharing centralized Key issue: File searching directory server - which peer has the file ?
original Napster design 1) when peer connects, it informs central server:
m m Bob

1 peers 1 3

1 2 1

IP address content

2) Alice queries for Network love.mp3 3) Alice requests file from Bob

Alice

Review: Network Layer 58

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

Review: Network Layer 59

P2P: decentralized directory


r Each peer is either a group

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.

ordinary peer group-leader peer neighoring relationships in overlay network

Review: Network Layer 60

30

More about decentralized directory


advantages of approach
r no centralized directory server
m m

location service distributed over peers more difficult to shut down

disadvantages of approach
r bootstrap node needed r group leaders can get overloaded

Review: Network Layer 61

P2P: Query flooding


r Gnutella r no hierarchy r use bootstrap node to learn r Send query to neighbors r Neighbors forward query r If queried peer has object, it

about others r join message

sends message back to querying peer

join

Review: Network Layer 62

31

P2P: more on query flooding


Pros r peers have similar responsibilities: no group leaders r highly decentralized r no peer maintains directory info Cons r excessive query traffic r query radius: may not have content in scope r bootstrap node r maintenance of overlay network

Review: Network Layer 63

Aside: Search Time?

Review: Network Layer 64

32

Aside: All Peers Equal?

1.5Mbps DSL

1.5Mbps DSL

56kbps Modem

1.5Mbps DSL

10Mbps LAN
1.5Mbps DSL
56kbps Modem 56kbps Modem

Review: Network Layer 65

DHT: A New Story


r In 2000-2001, academic researchers said

we want to play too!


r Motivation:
m m m m m

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 (?)

r Hot Topic in networking ever since


m

Review: Network Layer 66

33

P2P: Content Addressing (Hash Routing)


Hash routing r Given an object identifier I, calculate its hash value H=hash(I), and (hopefully) find it (or its location info) in peer H r Not a new idea
m

Load balancing hash IP address, re-direct to different servers

application put(key, data) get (key) hash table node node . node data

Review: Network Layer 67

Distributed Hash Table (DHT)


Challenges r For each object, node(s) whose range(s) cover that object must be reachable via a short path r # neighbors for each node should scale well (e.g., should not be O(N)) r Fully distributed (no centralized bottleneck/single point of failure) r DHT mechanism should gracefully handle nodes joining/leaving
m m m

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

Review: Network Layer 68

34

Case Studies
r

Structured overlay (p2p) systems


m m

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

Review: Network Layer 69

Chord
r Associate to each node and file a unique id in an uni-

dimensional space (a Ring)


m m

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

from MIT in 2001


Review: Network Layer 70

35

Consistent Hashing
Key 5

Node 105

K5 K20

N105

Circular ID space N90

N32

K80 A key is stored at its successor: node with next higher ID


Review: Network Layer 71

Chord Basic Lookup


N120 N10 N105
Where is key 80?

N90 has K80

N32

K80 N90

N60
Review: Network Layer 72

36

Chord Finger Table


1/4 1/2

1/8

1/16 1/32 1/64 1/128

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

table size? time?

N fingers

r Routing
m Each

hop expects to 1/2 the distance to the desired id => expect O(log N) hops.

Review: Network Layer 74

37

CAN (Content Addressable Network)


Hyper-cube space
r hash value is viewed as a point
7 6 5 4 3 n1 2 1 0 0 1 2 3 4 5 6 7

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)

Review: Network Layer 75

CAN Illustration: 2-D


r node

n2:(4, 2) joins
7 6 5 4 3 n1 2 1 0 0 1 2 3 4 5 6 7 n2

Review: Network Layer 76

38

CAN Illustration: 2-D


r node

n3:(3, 5) joins?
7 6 5 4 3 n1 2 1 0 0 1 2 3 4 5 6 7 n2 n3

Review: Network Layer 77

CAN Illustration: 2-D


r node

n4:(5, 5) and n5:(6,6) join

7 6 5 4 3 n1 2 1 0 0 1 2 3 4 5 6 7 n2 n3 n4 n5

Review: Network Layer 78

39

CAN Illustration: 2-D


r nodes: n1:(1, 2); n2:(4,2);

n3:(3, 5); n4:(5,5);n5:(6,6) r Data (key): f1:(2,3); f2:(5,0); f3:(2,1); f4:(7,5)

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

Review: Network Layer 79

CAN Illustration: 2-D


r Association
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

Review: Network Layer 80

40

CAN Illustration: 2-D


A node knows its neighbors Forward query to the neighbor that is nearest to key r Example: n1 want to find f4 r Multiple paths -> reliable
r r

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

Review: Network Layer 81

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

Review: Network Layer 82

41

Outline
1. Network Layer Service Models 2. Routing Principles
m m m

Link state routing Distance vector routing Hierarchical routing

3. Multicast Routing 4. Peer-to-Peer 5. Internet QoS


m m

Scheduling and policing IntServ/DiffServ

Review: Network Layer 83

Beyond Best Effort


Internet service model Best-effort (or least-effort)
m

Thus far: making the best of best effort


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

Delay, bandwidth important to media applications


Review: Network Layer 84

42

Improving QOS in IP Networks


Future: next generation Internet with QoS guarantees m RSVP: signaling for resource reservations m Differentiated Services: differential guarantees m Integrated Services: firm guarantees r simple model for sharing and congestion studies:

Review: Network Layer 85

Principles for QOS Guarantees


r

Example: 1Mbps IP phone, FTP share 1.5 Mbps link.


m m

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

Principles for QOS Guarantees (more)


r

what if applications misbehave (audio sends higher than declared rate)


m

policing: force source adherence to bandwidth allocations similar to ATM UNI (User Network Interface)

marking and policing at network edge:


m

Principle 2 provide protection (isolation) for one class from others


Review: Network Layer 87

Principles for QOS Guarantees (more)


r

Allocating fixed (non-sharable) bandwidth to flow: inefficient use of bandwidth if flows doesnt use its allocation

Principle 3 While providing isolation, it is desirable to use resources as efficiently as possible


Review: Network Layer 88

44

Principles for QOS Guarantees (more)


r

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

Summary of QoS Principles

Lets next look at mechanisms for achieving this .


Review: Network Layer 90

45

Scheduling Polices (1)


scheduling: choose next packet to send on link r FIFO (first in first out) scheduling: send in order of arrival to queue
r
m

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

Review: Network Layer 91

Scheduling Policies (2)


Priority scheduling: transmit highest priority queued packet r multiple classes, with different priorities
m

class may depend on marking or other header info, e.g. IP source/dest, port numbers, etc..

Review: Network Layer 92

46

Scheduling Policies (3)


round robin scheduling: r multiple classes r cyclically scan class queues, serving one from each class (if available)

Review: Network Layer 93

Weighted round robin


r

Normalize the weights so that they become integer

WA=1.4 WB=0.2 WC=0.8


Normalize

WA=7

WB=1

WC=4

round length = 13
Review: Network Layer 94

47

Scheduling Policies (4)


Generalized Processor Sharing r Round-robin, sounds good
m m

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

Review: Network Layer 95

Weighted Fair Queueing (WFQ)


Deals better with variable size packets and weights r Also known as packet-by-packet GPS (PGPS) r Find finish time of a packet, had we been doing GPS; serve packets in order of their finish times
r

Review: Network Layer 96

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

Policing Mechanisms (more)


r

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

Review: Network Layer 98

49

IETF Integrated Services


architecture for providing QOS guarantees in IP networks for individual application sessions r resource reservation: routers maintain state info of allocated resources, QoS reqs r admit/deny new call setup requests:
r

Question: can newly arriving flow be admitted with performance guarantees while not violated QoS guarantees made to already admitted flows?

Review: Network Layer 99

Intserv: QoS guarantee scenario


r

Resource reservation
m m m

call setup, signaling (RSVP) traffic, QoS declaration per-element admission control

request/ reply
m

QoS-sensitive scheduling (e.g., WFQ)


Review: Network Layer 100

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

Review: Network Layer 101

Intserv QoS: Service models


Guaranteed service:
r

[rfc2211, rfc 2212]

Controlled load service:

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

Signaling in the Internet


connectionless (stateless) forwarding by IP routers best effort service no network signaling protocols in initial IP design

r New requirement: reserve resources along end-to-end path (end

system, routers) for QoS for multimedia applications


m

r RSVP: Resource Reservation Protocol [RFC 2205]

allow users to communicate requirements to network in robust and efficient way. i.e., signaling ! r earlier Internet Signaling protocol: ST-II [RFC 1819]

Review: Network Layer 103

RSVP Design Goals


1. 2. 3. 4. 5. 6.

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

Review: Network Layer 104

52

RSVP: does not


r

specify how resources are to be reserved


r

rather: a mechanism for communicating needs thats the job of routing protocols signaling decoupled from routing separation of control (signaling) and data (forwarding) planes

determine routes packets will take


r r

interact with forwarding of packets


r

Review: Network Layer 105

IETF Differentiated Services


Concerns with Intserv: r Scalability: signaling, maintaining per-flow router state difficult with large number of flows r Flexible Service Models: Intserv has only two classes. Also want qualitative service classes
m m

behaves like a wire relative service distinction: Platinum, Gold, Silver

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

Review: Network Layer 106

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

Edge-router Packet Marking


r r

profile: pre-negotiated rate A, bucket size B packet marking at edge based on per-flow profile

Rate A B User packets

Possible usage of marking:


r r

class-based marking: packets of different classes marked differently intra-class marking: conforming portion of flow marked differently than non-conforming one

Review: Network Layer 108

54

Classification and Conditioning


Packet is marked in the Type of Service (TOS) in IPv4, and Traffic Class in IPv6 r 6 bits used for Differentiated Service Code Point (DSCP) and determine PHB that the packet will receive r 2 bits are currently unused
r

Review: Network Layer 109

Classification and Conditioning


may be desirable to limit traffic injection rate of some class: r user declares traffic profile (e.g., rate, burst size) r traffic metered, shaped if non-conforming

Review: Network Layer 110

55

Randomization in Router Queue Management


r normally, packets dropped only when queue overflows
m

Drop-tail queueing

P6 P5 P4 P3 P2 P1 Scheduler

FCFS

ISP

Internet

ISP
Review: Network Layer 111

The case against drop-tail queue management

P6 P5 P4 P3 P2 P1

FCFS FCFS Scheduler Scheduler

large queues in routers are a bad thing


m

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

allowing queues to overflow is a bad thing


m m

Review: Network Layer 112

56

Idea: early random packet drop


FCFS FCFS Scheduler Scheduler

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

Review: Network Layer 113

Random early detection (RED) packet drop


Average queue length
Max queue length Max threshold Min threshold

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

Review: Network Layer 114

57

Random early detection (RED) packet drop


Average queue length
Max queue length Max threshold Min threshold

Drop probability
Forced drop Probabilistic early drop No drop

Time Drop probability 100% maxp min max Weighted Average Queue Length
Review: Network Layer 115

RED: why probabilistic drop?


r r

provide gentle transition from no-drop to all-drop


m

provide gentle early warning with tail-drop, low-sending-rate sessions can be completely starved avoid cycles of large-loss followed by no-transmission

provide same loss rate to all sessions:


m

r r

avoid synchronized loss bursts among sources


m

WRED (Cisco)

X. Xiao and L. M. Ni, "Internet QoS: A Big Picture", IEEE Network Magazine, March 1999.
Review: Network Layer 116

58

You might also like