Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4: Network Layer

Similar presentations


Presentation on theme: "Chapter 4: Network Layer"— Presentation transcript:

1 Chapter 4: Network Layer
4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 IP: Internet Protocol Datagram format IPv4 addressing 4.4 Routing: Concepts and Algorithms Introduction Math Detour – Graph Theory Routing via Broadcast – PI, PIF Connectivity Test – CT Distributed Routing Bellman – Ford – Distance Vector Link State Optimal Routing Network Model Math Detour – Convexity Flow Deviation Math Detour – Inequality Constraints Optimal Routing – Necessary and Sufficient Conditions 4.5 Routing in the Internet Hierarchical Routing RIP OSPF BGP 4.6 Broadcast and multicast routing Network Layer

2 Network Model Notations: N nodes M links
Ci = capacity of link i ( bits/sec ) Poisson external message arrivals to each node = msg rate of arrivals at node j with destination k (traffic requirements) independent exponentially distributed message length, mean (bits/msg) negligible message processing time at nodes total external traffic incoming to node j (msg/sec) total traffic in the network (msg/sec) = average delay per message in link i = average message delay in the network

3 Delay calculations Assumption: non-splitting fixed routing Notations:
route from node j to node k link-route indicator: Total traffic on link i namely traffic from j to k is included if the path includes link i Zjk = Average Delay on path from j to k namely delay on link i is included only if it is part of the path from j to k

4 Average Network Delay in a general network
example Path from A to L by links by nodes Examples: Therefore: Average Network Delay in a general network

5 Calculation of average delay Ti for a single (separate) link
Messages arrive to the link have exponential length with parameter , namely therefore service time is random. If the bit rate (capacity) of the link is Ci bits/sec, then transmission time is: therefore transmission time is exponentially distributed with parameter and Calculation of network average delay T Question: is the quantity Ti calculated above the same as Ti used earlier? Answer: No, since normally the service times at consecutive nodes are not independent and not independent of the arrival process. This is because message length remains the same. Kleinrock’s assumption: service times at different nodes are independent, good approximation because there are many sources and many destinations. This allows us to calculate average network delay T where is the flow in bits/sec on link i.

6 Design Problems Capacity assignment: Given set of nodes and links, flows fi or , budget D. Find link capacities to minimize network average delay T. Routing ( flow assignment ): Given network and link capacities. Find flows to minimize average delay T. Capacity and Flow assignment: Given budget D. Find capacities Ci and flows to minimize average delay T.

7 Chapter 4: Network Layer
4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 IP: Internet Protocol Datagram format IPv4 addressing 4.4 Routing: Concepts and Algorithms Introduction Math Detour – Graph Theory Routing via Broadcast – PI, PIF Connectivity Test – CT Distributed Routing Bellman – Ford – Distance Vector Link State Optimal Routing Network Model Math Detour – Convexity Flow Deviation Math Detour – Inequality Constraints Optimal Routing – Necessary and Sufficient Conditions 4.5 Routing in the Internet Hierarchical Routing RIP OSPF BGP 4.6 Broadcast and multicast routing Network Layer

8 Convexity Given an N-dimensional space RN
A vector in the space can be represented by its coordinates is a convex region if For example, the half space of vectors such that for some holds is a convex region, since if then . Similarly the hyperplane of vectors such that for some holds is a convex region. Theorem: The intersection of two convex regions is convex Theorem: A linear transformation of a convex region is convex

9 Projections Normally, more than one point in the original region is mapped into any given point in the projection

10 Convex functions Given a convex region , a function on is said to be convex if for any and any , holds Example: on Theorem: A twice differentiable function on a convex subset of R1 is convex iff for all x in the subset Example: The function is convex on Theorem: A local minimum of a convex function on a convex region is a global minimum.

11 Flow Vectors Consider the collection of vectors where j is a destination node , is a link and is the flow on link with destination j This collection of vectors determines an RNM vector space is the total flow on link As before is the flow requirement at node k with destination j set of outgoing links from k set of incoming links at k Subspace of flow vectors is defined as the collection of RNM -vectors that satisfy: Kirkhoff Law positive bounded Subspace is defined as the collection of RNM - vectors that satisfy only the Kirkhoff and positivity conditions Theorem: The subspace of flow vectors is a convex region. Subspace is also a convex region.

12 Proof of convexity of Given two flow vectors, need to show that is a flow vector. Explicit proof below. In fact not needed, since are intersections of hyperplanes and half spaces. Kirkhoff Positive Bounded

13 Chapter 4: Network Layer
4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 IP: Internet Protocol Datagram format IPv4 addressing 4.4 Routing: Concepts and Algorithms Introduction Math Detour – Graph Theory Routing via Broadcast – PI, PIF Connectivity Test – CT Distributed Routing Bellman – Ford – Distance Vector Link State Optimal Routing Queuing & Network Model Math Detour – Convexity Flow Deviation Math Detour – Inequality Constraints Optimal Routing – Necessary and Sufficient Conditions 4.5 Routing in the Internet Hierarchical Routing RIP OSPF BGP 4.6 Broadcast and multicast routing Network Layer

14 Routing as an optimization problem
The optimal routing problem is the following: where Fa is the projection of to the RM space of the link flow vectors Fb is the set of link flows satisfying the “bounded” property are the link capacities are the flow requirements Note: are called flow vectors, while are called link flow vectors Properties: is a convex function over the convex region (Fa is convex since it is a linear transformation of a convex region), therefore it has a unique minimum in this region therefore if we start in Fb and move continuously, we will stay in Fb , thus it is sufficient to minimize over Fa

15 Chapter 4: Network Layer
4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 IP: Internet Protocol Datagram format IPv4 addressing 4.4 Routing: Concepts and Algorithms Introduction Math Detour – Graph Theory Routing via Broadcast – PI, PIF Connectivity Test – CT Distributed Routing Bellman – Ford – Distance Vector Link State Optimal Routing Network Model Math Detour – Convexity Flow Deviation Math Detour – Inequality Constraints Optimal Routing – Necessary and Sufficient Conditions 4.5 Routing in the Internet Hierarchical Routing RIP OSPF BGP 4.6 Broadcast and multicast routing Network Layer

16 Flow Deviation Method Iterative method to find optimal routing: at the (n+1)-st iteration we calculate a flow vector that is better than the one we have at the n-th iteration where we want and are looking for an appropriate In an unconstrained problem, we would find the gradient of and go in the opposite direction a small amount , then repeat. Can’t do this in a constrained problem because the resulting vector may not satisfy the constraint. Solution: let us take where is some flow vector ( unspecified yet ) our solution at step n some number Since , are flow vectors, so is Problem: selection of and

17 Flow Deviation Method (continued)
Denote by the gradient of T at For small values of holds Denote the coordinates of the gradient vector. Then the above equation can be re-written: Since we are looking for a minimum, we would like to minimize the left-hand side. Thus the right-hand side should be minimized. Therefore we are looking for a flow vector such that is minimized. Solution to this sub-problem: Assign weights to links in the network For every source-destination pair , find shortest path according to these weights Send the entire requirement on shortest path from k to j (disregarding capacities) Resulting flow vector is Reason: shifting any amount of flow from shortest path to another path would increase

18 Flow Deviation Method (continued)
In the previous slide, we have decided the direction we should take from to reach The next question is how much should we move. This is a one parameter optimization problem: minimize and can be solved by simply solving the one unknown equation Note: if optimal then thus is optimal. If is not optimal, then as increases from 0, T decreases, thus should be increased until minimum is reached or until

19 Flow Deviation Algorithm
At step n , a flow vector is given. Calculate By finding shortest paths with link weights , find a flow vector for which is minimized. Substitute Find for which is minimized Repeat the above, until Good convergence properties.

20 Example: Flow Deviation
Start with holds then since with these weights the shortest path from a to b is via link 1, holds therefore: and the minimum is achieved at and the minimum delay is

21 Example: Flow Deviation

22 Flow Deviation ( continued)
Note that in every step, the actual routing of the individual requests that result in the required link flows is not necessarily unique (same as what was said before: Normally, more than one point in the original region is mapped into any given point in the projection ) Example: Suppose in the given network, at a given step we come up with the flows: Then is a solution, but so is

23 Chapter 4: Network Layer
4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 IP: Internet Protocol Datagram format IPv4 addressing 4.4 Routing: Concepts and Algorithms Introduction Math Detour – Graph Theory Routing via Broadcast – PI, PIF Connectivity Test – CT Distributed Routing Bellman – Ford – Distance Vector Link State Optimal Routing Network Model Math Detour – Convexity Flow Deviation Math Detour – Inequality Constraints Optimal Routing – Necessary and Sufficient Conditions 4.5 Routing in the Internet Hierarchical Routing RIP OSPF BGP 4.6 Broadcast and multicast routing Network Layer

24 Optimal Routing necessary and sufficient conditions
Want to find a set of necessary and sufficient conditions to characterize optimal routing in a network. The conditions are a good tool to verify optimality of a given routing scheme and to develop algorithms to achieve it. Optimization with equality constraint: Build Lagrangian by multiplying each constraint by its Lagrange factor Differentiate with respect to each parameter and equate to 0 result: necessary conditions if the function and region are convex, this is also a sufficient condition

25 Mathematical Detour - Minimization with inequality constraints
Two cases: minimum inside the region or at the edge of the region Example: Lagrangian: Case 1: makes sense, since if then a small positive x would have given a higher Case 2:

26 Minimization with inequality constraints - examples
Case 1: for , we get which satisfies the conditions and thus is minimum. The other possibility , does not satisfy the constraint. Case 2: for , we get which does not satisfy the constraint. Thus and , which do satisfy the conditions and provide the minimum point. Note: In their general form, the conditions on the previous slide are termed the Kuhn-Tucker conditions

27 Minimization with inequality constraint - another example
Suppose a given amount of money is to be invested and there are several possible investment programs. Program gives an income of if shekels are invested in it. The functions are concave. We want to Necessary and sufficient condition for optimality

28 Minimization with inequality constraint - another example (cont’d)
Obvious, since if not, it is worthwhile to take money out of programs with low incremental return and reinvest it into programs with high incremental return

29 Chapter 4: Network Layer
4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 IP: Internet Protocol Datagram format IPv4 addressing 4.4 Routing: Concepts and Algorithms Introduction Math Detour – Graph Theory Routing via Broadcast – PI, PIF Connectivity Test – CT Distributed Routing Bellman – Ford – Distance Vector Link State Optimal Routing Network Model Math Detour – Convexity Flow Deviation Math Detour – Inequality Constraints Optimal Routing – Necessary and Sufficient Conditions 4.5 Routing in the Internet Hierarchical Routing RIP OSPF BGP 4.6 Broadcast and multicast routing Network Layer

30 Optimal Routing Problem
The problem is as before (slightly different notations: are nodes, are the neighboring nodes of toward/from which there is an outgoing/incoming link): Subject to where is a non-negative continuous function, convex, going to when and whose derivative is strictly positive. Solution: as before disregard the capacity constraint where Differentiating w.r.t gives

31 Optimal Routing Theorem: Set of flows is optimal if and only if there exists a set of Lagrange multipliers such that Interpretation of equations: The Lagrange multiplier is the sensitivity coefficient of the delay w.r.t. the requirement: if the requirement is increased by , then the minimum delay is increased by For a given destination , look at the neighbors of and calculate the sum of their incremental delay coefficient and the incremental delay coefficient on link Optimality requires that for all neighbors to which sends traffic destined for , this sum will be the same and no larger than the sum for links on which sends no traffic.

32 Optimal Routing The above interpretation also gives us an idea for distributed routing optimization: if the routing is not optimal, namely the incremental delay sums are not equal for links with traffic and no larger for links without, then one incrementally improve the average delay by transferring traffic from links with high incremental delay sum to links with small incremental delay sum. This can be done if nodes learn the coefficient parameters from their neighbors and can estimate the incremental delay coefficient on their adjacent links. It can be shown that this distributed algorithm converges to the optimal routing.


Download ppt "Chapter 4: Network Layer"

Similar presentations


Ads by Google