SCOR Softwaredefined Constraint Optimal Routing platform for SDN

  • Slides: 30
Download presentation
SCOR: Software-defined Constraint Optimal Routing platform for SDN Siamak Layeghy April 2018 1

SCOR: Software-defined Constraint Optimal Routing platform for SDN Siamak Layeghy April 2018 1

Outline • Background: Qo. S Routing • SCOR’s Structure • SCOR Models for Qo.

Outline • Background: Qo. S Routing • SCOR’s Structure • SCOR Models for Qo. S Routing • Use Cases: ONOS apps 2

Qo. S Routing Shortest Path Routing Widest Path Routing (Maximum Bandwidth Routing) Minimum Delay

Qo. S Routing Shortest Path Routing Widest Path Routing (Maximum Bandwidth Routing) Minimum Delay Path Routing C = 30 D=2 L=1 1 2 3 C = 100 D = 1, L = 1 4 C = 30 D=5 L=1 C = 10, D = 9, L = 2 C= 20 D= 1 L=2 C = 20 D=1 L=2 6 5 7

Routing & Qo. S Routing Basic Qo. S Routing Algorithms Composite Qo. S Routing

Routing & Qo. S Routing Basic Qo. S Routing Algorithms Composite Qo. S Routing Algorithms Link-optimization routing Link-constrained Linkoptimization routing Link-constrained Pathoptimization routing Multi-link-constrained routing Link-constrained Pathconstrained routing Path-constrained Linkoptimization routing Path-constrained Pathoptimization routing Path-constrained routing Multi-Path-constrained routing

SDN Routing Framework 8

SDN Routing Framework 8

SCOR: a New Northbound Interface for Routing Link delay Link utilisation Node capacity Defined

SCOR: a New Northbound Interface for Routing Link delay Link utilisation Node capacity Defined capacity Network Path Residual capacity Capacity constraint Path bottleneck Path cost 9

Introducing a New Northbound Interface for Qo. S Routing 10

Introducing a New Northbound Interface for Qo. S Routing 10

Introducing a New Northbound Interface for Qo. S Routing 11

Introducing a New Northbound Interface for Qo. S Routing 11

Introducing a New Northbound Interface for Qo. S Routing 12

Introducing a New Northbound Interface for Qo. S Routing 12

Introducing a New Northbound Interface for Qo. S Routing 13

Introducing a New Northbound Interface for Qo. S Routing 13

Modelling various Qo. S Routing Algorithms in SDN Algorithm Metrics Type Shortest Path Hop

Modelling various Qo. S Routing Algorithms in SDN Algorithm Metrics Type Shortest Path Hop Count Basic Widest Path Bandwidth Basic Minimum-Delay Path Transmission Delay Basic Minimum-Loss Path Packet Loss Basic Constrained-Delay Path Transmission Delay Basic Constrained-Bandwidth Path Bandwidth Basic Constrained-Bandwidth -Minimum-Delay Path Bandwidth, Transmission Multi. Delay constraint Maximum-Residual-Capacity Path Bandwidth Complex Constrained-Residual-Capacity Path Bandwidth Complex Minimum-Link-Utilisation Path Bandwidth/total delay Complex Constrained-Link-Utilisation Path Bandwidth/total delay Complex Minimum-Congestion Path Bandwidth/total delay Complex Constrained-Congestion Path Bandwidth/total delay Complex 14

Least Cost Path Routing 15

Least Cost Path Routing 15

SCOR Model: Least Cost Path Routing Path cost Network Path 16

SCOR Model: Least Cost Path Routing Path cost Network Path 16

Least Cost Path Constrained Capacity Routing 17

Least Cost Path Constrained Capacity Routing 17

SCOR Model: Least Cost Path Constrained Capacity Routing Defined capacity Network Path cost 18

SCOR Model: Least Cost Path Constrained Capacity Routing Defined capacity Network Path cost 18

Maximum Residual Capacity Path Routing 19

Maximum Residual Capacity Path Routing 19

SCOR Model: Maximum Residual Capacity Path Routing Capacity constraint Network Path 20

SCOR Model: Maximum Residual Capacity Path Routing Capacity constraint Network Path 20

MRCPR in Procedural Programming def # group maximum_concurrent_flow(edges, commodities by source if karakosta commodities,

MRCPR in Procedural Programming def # group maximum_concurrent_flow(edges, commodities by source if karakosta commodities, error=GLOBAL_ERROR, source, sink = commodity. source, commodity. sink ''' scale_demands(commodities, edge[LENGTH_ATTRIBUTE]= edge[LENGTH_ATTRIBUTE] * (1 + epsilon * added_flow / edge[CAPACITY_ATTRIBUTE]) def scale. Factor): str(len(G. node. keys()))+", "+str(len(edges))+") w/ error " + str(error)+ ": " + elif multi_route: if karakosta: scale_beta=True, return. Beta=False, if len(com. List) == Maximum concurrent solver using 1: the method on the dual of MCF ''' Scales each flow demand commodities by iterative multiplying by scale. Factor defstr(shortest. Path. Computations) calculate_dual_objective(G): commodity. Source. Map karakosta=False, set() # collectsmulti_route=False, all possible sources beta_hat=None, d_j = =rep. Element. demand as if described in http: //cgi. csc. liv. ac. uk/~piotr/ftp/mcf-jv. pdf '''not all. Sinks: in commodity G. node. iterkeys(): for in commodities: '''for fornode commodity in commodities: shortest. Path. Computations=0): while d_j >beta 0: value, node_path =innx. shortest_path(G, source, weight=LENGTH_ATTRIBUTE) Ref: https: //github. com/jinpan/6. 854 -project/blob/master/src/max_concurrent_flow. py if return. Beta: # returns notsink, edge_dict, used in 2 -approx for commodity commodities: print node, G. edge[node] source, sink, demand commodity. source, commodity. sink, commodity. demand Calculates ''' commodity. Source. Map. add(commodity. source) D(l) = sum c(e)l(e) over= all e sp = get_edges(G, path. Map[rep. Element. sink]) return get_edges(G, ''‘ return shortest. Path. Computations, calculate_dual_objective(G) / calculate_alpha(G, commodities) commodity. demand *= node_path) scale. Factor return shortest. Path. Computations, count ''' Takes in an iterable of edges and commodities and calculates the maximum else: max_length = L *= delta * e ** (epsilon= *{}, total_flow / beta_hat) total concurrent commodities. Grouped. By. Source, = 0 flow default. Demand. Ratios {} for edge min_cap min([edge[CAPACITY_ATTRIBUTE] in sp]) result_map source, target=None, weight=LENGTH_ATTRIBUTE) if multi_route: from math import e= nx. shortest_path(G, if max_length >= 1: = min(min_cap, d_j) for ''' for headcommodity. Source in G. edge. iterkeys(): in commodity. Source. Map: added_flow return result_map # scale by max capacity/flow ratio def construct_graph(edges): from math import log def get_beta_hat(edges, commodities, error=GLOBAL_ERROR, karakosta=True): break two. Approx for commodity. Source. List tail, = False edge_dict in-=G. edge[head]. iteritems(): =added_flow [commodity for commodity in commodities d_j ratios = [] ''' math import spc, beta_hat = maximum_concurrent_flow(edges, commodities, error=1. , return. Beta=True, if shortest. Path. Computations!=0: total += edge_dict[LENGTH_ATTRIBUTE] if commodity. source * edge_dict[CAPACITY_ATTRIBUTE] == commodity. Source] for edge in sp: G. edge. iteritems(): Takes infor an head, iterable of in edges and constructs a directed graph import networkx as nxdatum karakosta=karakosta, all_paths = edge[FLOW_ATTRIBUTE] nx. all_simple_paths(G, source, sink) return two. Approx total default. Demand. Ratios[commodity. Source] = True = =calculate_demand_ratios(commodity. Source. List) edge. get(FLOW_ATTRIBUTE, 0) + added_flow def calculate_alpha(G, commodities): for tail, edge_dict in datum. iteritems(): ''' shortest. Path. Computations += 1 scale_beta=False) #calculate commodities. Grouped. By. Source[commodity. Source] parameters = commodity. Source. List * (1 + epsilon * added_flow / edge[LENGTH_ATTRIBUTE] = edge[LENGTH_ATTRIBUTE] ''' 0) / edge_dict[CAPACITY_ATTRIBUTE])) G = nx. Di. Graph()ratios. append(float(edge_dict. get(FLOW_ATTRIBUTE, return= beta_hat, spc paths = [get_edges(G, path) for path in all_paths] def calculate_z(G, epsilon calculate_epsilon(error) commodities): edge[CAPACITY_ATTRIBUTE]) Takes inratio aindigraph an iterable of commodities, returns the sum of the min cost flows for satisfying = 1. /and max(ratios) for edges: # constants paths = filter(lambda path: sum([edge[LENGTH_ATTRIBUTE] for edge in path]) <= max_length, old_objective ''' delta = calculate_delta(len(edges), = -1 continue epsilon) these commodity demands independently Throws a Network. XUnfeasible exception if there is no way to satisfy the G. add_edge(edge. head, CAPACITY_ATTRIBUTE = 'capacity' paths) while Calculates print True: "Epislon, Z #= phases min(z_i/d_i) Delta: ", epsilon, where z_i delta is the max flow of commodity i demands for head, datum in G. edge. iteritems(): DEMAND_ATTRIBUTE = edge. tail, 'demand' def commodities, error=GLOBAL_ERROR, karakosta=True): andtwo_approx(edges, current_objective d_i is thewhile demand =for calculate_dual_objective(G) commodity i ''' for tail, True: edge_dict in datum. iteritems(): capacity=edge. capacity, FLOW_ATTRIBUTE = spc '_flow' beta_hat, = get_beta_hat(edges, commodities, error=1. , return. Beta=True, karakosta=karakosta) for idx, path in enumerate(paths): ''' #setifinitial current_objective edge for lengths >= 1 commodity and not multi_route: index, in= enumerate(com. List): # for every total = 0 edge_dict[FLOW_ATTRIBUTE] edge_dict. get(FLOW_ATTRIBUTE, 0) commodity * ratio that shares a source LENGTH_ATTRIBUTE = weight=edge. length) 'weight' scale_demands(commodities, beta_hat / 2. ) = min([edge[CAPACITY_ATTRIBUTE] for edge in path]) = True) z. List for edge = break []in edges: min_cap edge. List = get_edges(G, path. Map[commodity. sink], head. Tail for commodity commodities: return G FP_ERROR_MARGIN =in 10 e-10 # floating point error margin maximum_concurrent_flow(edges, error=error, karakosta=karakosta, added_flow = min_cap * commodities, demand forreturn commodity edge. length in =commodities: delta / edge. capacity dist_j == 0. 05 sum([edge[LENGTH_ATTRIBUTE] else: GLOBAL_ERROR shortest. Path. Computations=spc) total_flow += added_flow if z. List. append(nx. max_flow(G, old_objective >= calculate_dual_objective(G): commodity. source, commodity. sink) / float(commodity. demand)) ratio = run_shortest_path_commodity(G, commodity)]) demand. Ratios[index] edge in(1+e) # scale by for log_(1+e) return #construct min(z. List) break graph min_cap min([edge_dict[CAPACITY_ATTRIBUTE] for head, tail, edge_dict in edge. List]) # total commodity. demand *= dist_j for+=head in G. edge. iterkeys(): def get_edges(G, node_path, head. Tail=False): def error=GLOBAL_ERROR, scale_beta=True, karakosta=False): for commodities, edgefrom in path: G =multi_route(edges, else: construct_graph(edges) select the minimum capacity the edges return totalfor tail, edge_dict in G. edge[head]. iteritems(): '''Edge(object): class beta_hat, spc = get_beta_hat(edges, commodities, error=1. ) edge[FLOW_ATTRIBUTE] = edge. get(FLOW_ATTRIBUTE, 0) + added_flow def calculate_L(G): old_objective added_flow = current_objective = ratio * edge_dict. get(FLOW_ATTRIBUTE, min(demand. Remaining[index], # scale min_cap by the+ = 0) / in (log(1. / delta) / log(1 Given a graph G edge_dict[FLOW_ATTRIBUTE] and a list of nodes in a path, this returns the list of min_cap) edges that graph return maximum_concurrent_flow(edges, commodities, error=error, karakosta=karakosta, edge[LENGTH_ATTRIBUTE] = edge[LENGTH_ATTRIBUTE] * (1 + epsilon * added_flow / lengths if multi_route: = {} ratio def epsilon)) calculate_delta(num_edges, epsilon): If head. Tail is given as True, we return a list of tuples (head, tail, edge) length = None shortest. Path. Computations=spc, edge[CAPACITY_ATTRIBUTE]) for count head L = calculate_L(G) in += G. node. iterkeys(): 1 for head, tail, edge. Dict in edge. List: ''' if for total_flow count tail %in 1000 =G. edge[head]. iterkeys(): 0 == 0: edge. Dict[FLOW_ATTRIBUTE] = edge. Dict. get(FLOW_ATTRIBUTE, 0) + added_flow Calculates ^ (-1/e) {} edges = [] delta = =(m/(1 -e)) defcommodity. Table __init__(self, head, tail, capacity): scale_beta=scale_beta, beta_hat=beta_hat) print lengths[tail] count, current_objective = max(lengths. get(tail, 0), multi_route=True, temp. Flow. Add[(head, tail)]= temp. Flow. Add. get((head, tail), 0) + added_flow ''' commodity in commodities: for idx, head in enumerate(node_path[: -1]): self. head = head else: z #and if scale not demand. Remaining[index] karakosta and multi_route #calculate demands lengths. get(head, 0) + 1) -= added_flow return (num_edges / (1 - epsilon)) commodity. Table[commodity] = ** 0 (-1. / epsilon) tail = node_path[idx + 1] self. tail = tail for commodity in commodities: # iterations if scale_beta: if scale_beta and count % t == 0: # for scaling demand. Ratios for head in G. edge. iterkeys(): if head. Tail: self. capacity = calculate_demand_ratios(com. List, demand. Remaining) d_j if = commodity. demand return z =max(lengths. itervalues()) scale_demands(commodities, calculate_z(G, commodities)2) # z is minimum of shortest paths max(demand. Remaining) <= FP_ERROR_MARGIN: break # all remaining demands effectively 0 def calculate_epsilon(error): for tail, G. edge[head]. iteritems(): edges. append((head, tail, G. edge[head][tail])) self. flow = 0 edge_dict in k = float(len(commodities)) # k is number of commodities ''' else: for commodity in commodities: while d_j > 0: * log(len(edges) #t if = 2 we* grouped (1. / identifier, epsilon) commodities by source / (1 - epsilon)) / log(1 + epsilon) def. Calculates calculate_demand_ratios(commodities, demands=None): flow temp. Flow. Add. iteritems(): the for largest epsilon such in that (1 -e) ^ -3 is at most 1+error if tail == commodity. sink: edges. append(G. edge[head][tail]) sp = run_shortest_path_commodity(G, commodity) if t = karakosta: int(t) # t is iteration threshold head, tail = identifier ''' return edges class Commodity(object): shortest. Path. Computations +=1 scale_demands(commodities, fora source, com. List in commodities. Grouped. By. Source. iteritems(): z/k) # demands. so z/k is 1 If demands are not given, = G. edge[head][tail] Takes list epsilon =in(error + edge 1 of- commodities ((error + 1) and ** 2) ** (1. / 3))/(error + 1) commodity. Table[commodity]+=edge_dict[FLOW_ATTRIBUTE]/commodity. demand min_cap = min([edge[CAPACITY_ATTRIBUTE] for edge* in z = calculate_z(G, rep. Element = commodities) com. List[0] edge[LENGTH_ATTRIBUTE] (1 sp]) + epsilon * flow / itprint defaults a source, list of sink, the full for the commodities. epsilon *="Lambda 0. 99 to is " + str( min([x fordemands x =in commodity. Table. itervalues()])) def __init__(self, demand): added_flow = min(min_cap, d_j) assert (abs(1 path. Map - =z/k) run_shortest_path_commodity(G, < FP_ERROR_MARGIN) rep. Element, all. Sinks=True) edge[CAPACITY_ATTRIBUTE]) /"OBJECTIVE: - epsilon) ** <= 1 demands + error) print ", calculate_dual_objective(G) Returns a(1 multi-ratio of 3 the self. source = source def assert(1 run_shortest_path_commodity(G, commodity, all. Sinks=False): d_j -= added_flow += 1 shortest. Path. Computations print "SPC-"+str(karakosta)+"-"+str(two. Approx)+ " for G(" return epsilon self. sink = sink ''' for edge in sp: count = -1 demand. Ratios = default. Demand. Ratios[source][: ] 21 self. demand = Gdemands = demands oredge[FLOW_ATTRIBUTE] [commodity. demand in commodities] Given a iterations digraph and commodity, this runs acommodity shortest path from the =for edge. get(FLOW_ATTRIBUTE, 0) + source added_flow #start demand. Remaining = [com. demand for com in com. List]

Half-duplex Maximum Residual Capacity Path Routing 22

Half-duplex Maximum Residual Capacity Path Routing 22

SCOR Model: Half-duplex Maximum Residual Capacity Path Routing Capacity constraint Network Path Node capacity

SCOR Model: Half-duplex Maximum Residual Capacity Path Routing Capacity constraint Network Path Node capacity 23

Conciseness & Completeness 24

Conciseness & Completeness 24

Real-World Use Cases: ONOS Apps • Max-BW Routing • Min-Delay Routing • Max-BW Constrained

Real-World Use Cases: ONOS Apps • Max-BW Routing • Min-Delay Routing • Max-BW Constrained Delay Routing • Min-Delay BW Constrained Routing • Minimizing Max Link Utilization • Maximizing Min Residual Capacity 25

Real-World Use Cases: Scenario (100 Mbps, 1 ms) (10 Mb p (50 s) s)

Real-World Use Cases: Scenario (100 Mbps, 1 ms) (10 Mb p (50 s) s) 0 m (10 M bp s, 1 (20 0 m s) 5 m s) s) s, 1 m s , 1 (10 0 m s) bp mb p 0 M 1 m ps, Mb ps Mb ) ms , 10 (20 Mbps, 5 ms) ) ms s) (10 0 (10 s) m s, 5 bp M (20 Mbps, 5 ms) Mb ps, (100 Mbps, 1 ms) 0 (2 (20 (10 Mbps, 10 m s) Mb ps, 5 Mb ms) ps , 2 m s) 0 s, 1 bp M 0 (1 (10 bp s, 1 m 2 m s, 1 ps, (100 Mbps, 20 ms) s) (100 Mbps, 1 m (50 Mb bp (20 Mbps, 5 ms) M s) s) ps, 5 m 0 (1 0 M s) b (20 M s) (10 ) 2 ms bps, (50 M s, 10 m (20 Mbps, 5 ms) 0 M (10 bps, 5 m (20 M s) , 1 m bps (100 Mbps, 1 ms) 26

Maximum-Bandwidth Routing 27

Maximum-Bandwidth Routing 27

Minimum-Delay Routing 28

Minimum-Delay Routing 28

Max-BW Constrained Delay Routing 29

Max-BW Constrained Delay Routing 29

Min-Delay Constrained BW Routing 30

Min-Delay Constrained BW Routing 30

Minimizing Max Link Utilization 31

Minimizing Max Link Utilization 31

Maximizing Min Residual Capacity 32

Maximizing Min Residual Capacity 32

Q&A Thank You 33

Q&A Thank You 33