Network Planning
VITMM215
Practice Markosz Maliosz PhD 21/9/2016
Department of Telecommunication and Media Informatics
Network Planning VITMM215 Practice Markosz Maliosz PhD 21/9/2016 - - PowerPoint PPT Presentation
Network Planning VITMM215 Practice Markosz Maliosz PhD 21/9/2016 Department of Telecommunication and Media Informatics Basic algorithms 2 Algorithms Algorithm: a sequence of step-by-step instructions for solving a problem Problem:
Department of Telecommunication and Media Informatics
2
3
Algorithm: a sequence of step-by-step instructions for
solving a problem
Problem:
– Given:
– Algorithm:
many steps are required to solve a problem
– “fast”: polynomial – number of steps ~ nk – “slow” : e.g. exponential – number of steps ~ an or factorial ~ n!
– Complexity: characterizes the problem
– P: polynomial time algorithm exists for solving – NP (nondeterministic polynomial time) hard: no polynomial time algorithm is known to solve the problem
– Exhaustive search “endless” time
4
How to solve NP hard problems in
5
Example:
– N nodes – N*(N-1)/2 possible links – 2 N*(N-1)/2 possible topologies
are not connected
Goal: to reduce the
Example: greedy
Number
Number of possible topologies Number of connected topologies 1 1 1 2 2 1 3 8 4 4 64 38 5 1 024 728 6 32 768 26 704 7 2 097 152 1 866 256 8 268 435 456 251 548 592 9 68 719 476 736 66 296 291 072 10 35 184 372 088 832 34 496 488 594 816
At each step the best choice is chosen
Advantage: generally simple Disadvantage: does not reach the
6
7
8
Naïve greedy algorithm based on local information
– Path: A – C – D – B – E – Cost: 2 + 2 + 1 + 5 = 10
9
Optimal min-cost path
– Path: A – D – E – Cost: 3 + 3 = 6
Polynomial greedy algorithm that finds the
Common approach: routing uses shortest
10
11
E. W. Dijkstra, Dutch computer scientist lowest cost = shortest path shortest path in a graph with non-negative edge
– directed or undirected graph – from a selected source – to all other nodes, as destinations
it builds a spanning tree from the source node used in network routing protocols, e.g. IS-IS and
12
Given: G = (V, E): Form two sets of nodes:
Store two values at each nodes:
13
The steps:
1.
Initialize d and p
– source node: d=0, other nodes: d=∞ – p: invalid for all nodes
2.
S = {} /empty set/
3.
While V-S is not empty,
– Sort nodes in V-S set according to shortest paths – Move the nearest u node from V-S to S set – For the nodes, that are in V-S and are connected to u:
14
– directed graph – source: s – S={} – V-S = V (thin framing) – numbers on edges: weights – numbers in nodes: d
15
– nearest node: s (d=0) – move it from V-S to S (thick framing) – neighbor nodes with s:
16
– nearest node: x (d=5) – move it from V-S to S (thick framing) – neighbor nodes with x:
17
– nearest node: y (d=7) – move it from V-S to S (thick framing) – neighbor nodes with y:
18
– nearest node: u (d=8) – move it from V-S to S (thick framing) – neighbor nodes withu:
19
– the only node in V-S: v (d=9) – move it from V-S to S (thick framing)
What should be the link weights?
– physical distance? – delay on a link? – hop count (w=1)? – some arbitrary number?
Cisco’s default:
– inversely proportional to its capacity – higher capacity links are “shorter” – drives traffic to higher capacity links – can lead to strange routing
20
21
Traffic:
– q t : 1 – r t : 1 – s t : 1 – w t : 1
The correct choice depends on objectives Common goal: minimize delays
– if propagation delay is dominant
– if processing delay is dominant
– if queuing delay is dominant
values
22
Connects all nodes with minimum number
There is one and only one path between
Example applications:
23
24
Def.: subgraph, which is a tree and
25
link cost edge weights The minimum spanning tree is the minimum cost
If each link has a distinct weight, there will be a
26
Greedy algorithm to find minimum spanning tree
– create a forest F (a set of trees), where each node in the graph is a separate tree – At each step, take the minimum-weight edge
combine the two trees into a single tree
Greedy algorithm to find minimum spanning tree
– select an arbitrary node as initial element of the set – in each iteration, choose a minimum-weight edge (u, v), connecting a node v in the set to the node u
– this process is repeated until all the set will contain all nodes
When the algorithm terminates, the edges in the
27
28
B A D C E F 5 2 4 6 10 4 6 2
Find the min-cost spanning tree in the graph!
9
An Ethernet network can have multiple
STP is intended to create a tree to avoid
802.1D algorithm based on Dijkstra’s alg.
– switches are assigned numerical priorities – switch with lowest priority becomes root switch
– each switch port is given a cost = link weight
29
Default costs
30
Link speed Old cost New cost 10 Mbps 100 100 100 Mbps 10 19 1 Gbps 1 4 10 Gbps 1 2
Bridge Protocol Data Units are sent
Protocol finds min-cost path to root switch
31
Optimization in STP
32