Network Control Jennifer Rexford Fall 2018 (TTh 1:30-2:50 in Friend 006) COS 561: Advanced Computer Networks http://www.cs.princeton.edu/courses/archive/fall18/cos561/
Traditional Division of Labor Management: policy Measurement and configuration of switches Human timescales Control: events Among the switches Distributed state and computation Data: packets Local to the switch Handle each packet E.g., forward, drop, buffer Management
Example: Shortest-Path Routing Management: configure the link weights Control: compute shortest paths on the graph Data: forward packets to next hop along shortest paths 2 1 3 1 4 u 2 1 5 4 3 6 s
Link State: Dijkstra’s Algorithm Flood the topology information to all nodes Each node computes shortest paths to other nodes Initialization Loop S = {u} for all nodes v if (v is adjacent to u) D(v) = c(u,v) else D(v) = ∞ add w with smallest D(w) to S update D(v) for all adjacent v: D(v) = min{D(v), D(w) + c(w,v)} until all nodes are in S Used in OSPF and IS-IS
Link-State Routing Example 3 2 1 4 5 3 2 1 4 5 3 2 1 4 5 3 2 1 4 5
Link-State Routing Example (cont.) 3 2 1 4 5 3 2 1 4 5 3 2 1 4 5 3 2 1 4 5
Link State: Shortest-Path Tree Shortest-path tree from u Forwarding table at u 3 2 1 4 5 u v w x y z s t link v (u,v) w (u,w) x (u,w) y (u,v) z (u,v) s (u,w) t (u,w)
Distance Vector: Bellman-Ford Algo Define distances at each node x dx(y) = cost of least-cost path from x to y Update distances based on neighbors dx(y) = min {c(x,v) + dv(y)} over all neighbors v v 2 y 1 3 du(z) = min{c(u,v) + dv(z), c(u,w) + dw(z)} 1 x 4 u z 2 1 5 t Used in RIP and EIGRP w 4 3 s
Distance Vector Example 2 y 3 2 1 4 5 u v w x y z s t dv(z)= min{2+dy(z), 1+dx(z)} = 3 1 3 1 x 4 2 u 1 z 5 t w 4 3 s dy(z)=1 dx(z)=4
Distance Vector Example (Cont.) 3 2 1 4 5 u v w x y z s t dw(z)= min{1+dx(z), 4+ds(z), 2+du(z)} = 5 3 2 1 4 5 u v w x y z s t du(z)= min{3+dv(z), 2+dw(z)} = 6
What is the Right Division of Labor? Management
Control Plane as a Distributed System Two aspects of the control plane Distributed state (e.g., topology discovery) Control logic (e.g., shortest path) Key idea in the ONIX paper Leverage existing distributed systems techniques Create a state discovery and management layer Support different consistency & durability properties
Hop-by-Hop Utilization-aware Load-balancing Architecture Naga Katta, Mukesh Hira, Changhoon Kim, Anirudh Sivaraman, and Jennifer Rexford http://conferences.sigcomm.org/sosr/2016/papers/sosr_paper67.pdf
HULA Multipath Load Balancing S2 ToR 10 Data S3 ToR 1 S1 S4 Load balancing entirely in the data plane Collect real-time, path-level performance statistics Group packets into “flowlets” based on time & headers Direct each new flowlet over the current best path
Flowlet Routing Using the flowlet table Dest ToR Timestamp Next-Hop ToR 10 1 S2 ToR 0 17 S4 … h(flowid) 1 … S3 S1 Data Data S4 Using the flowlet table Update the next hop if enough time has elapsed Update the timestamp to the current time Forward the packet to the chosen next hop
Path Performance Statistics Best-hop table Best Next-Hop Path Utilization S3 50% S4 10% … Dest ToR 1 … Probe Probe S3 S1 Data Data S4 Using the best-hop table Update the best next-hop upon new probes Assign a new flowlet to the best next-hop
Putting it all Together Using P4 data packet Best Next-Hop Path Utilization S3 50% S4 10% … Dest ToR 1 … current best next-hop S3 Dest ToR Timestamp Next-Hop ToR 10 1 S2 ToR 0 17 S4 … Update next-hop (if enough time elapsed) and time h(flowid) 1 … chosen next-hop