UCSC 1 Aman ShaikhICNP 2003 An Efficient Algorithm for OSPF Subnet Aggregation ICNP 2003 Aman Shaikh Dongmei Wang, Guangzhi Li, Jennifer Yates, Charles Kalmanek University of California, Santa Cruz (UCSC) AT&T Labs - Research
UCSC 2 Aman ShaikhICNP 2003 Motivation As OSPF areas grow (number of routers, number of subnets), scalability problems arise –Number of updates, routing table size… Aggregation of subnet addresses into less specific prefixes across OSPF areas reduces resource consumption –Price: sub-optimal forwarding! Aggregates are configurable in router: how should these be selected? –Trade-off between amount of aggregation and sub-optimality in forwarding –Algorithm by Rastogi et al., Infocom 2002 Requires complete topology of the entire OSPF domain
UCSC 3 Aman ShaikhICNP 2003 Contribution Theorem: errors caused by sub-optimal forwarding can be bounded using ONLY parameters local to an area Aggregation algorithm: select minimum number of aggregates such that errors due to sub- optimal forwarding is minimized –Can be applied on a per-area basis Big plus from operational point-of-view –Ability to trade-off number of aggregates versus sub-optimality in forwarding –Amenable to on-line implementation
UCSC 4 Aman ShaikhICNP 2003 Overview of OSPF OSPF is a link-state protocol –Every router learns entire network topology within same area Routers are vertices, links are edges Every link assigned weights through configuration –Every router uses Dijkstra’s single source shortest path algorithm to build its forwarding table Router runs Dijkstra’s algorithm with itself as the root –Packets are forwarded along shortest paths defined by link weights
UCSC 5 Aman ShaikhICNP 2003 Areas in OSPF OSPF allows domain to be divided into areas for scalability –Areas are numbered 0, 1, 2 … –Hub-and-spoke with area 0 as hub –Every link assigned to exactly one area –Routers with links in multiple areas are called border routers Area 0 Area 1 Area 2 Border routers
UCSC 6 Aman ShaikhICNP 2003 Summarization with Areas Each router learns –Entire topology of its attached areas –Information about subnets in remote areas and their distance from the border routers Distance = sum of link costs from border router to subnet B1B2 R2 Area R3 R1 R1’s View Area / / Area 1 Area B1B2 C1 C / / R3R2 R1 OSPF domain
UCSC 7 Aman ShaikhICNP 2003 Aggregation Border routers can aggregate multiple subnets into a single less specific prefix –Distance assigned to aggregate = max(distance to subnets covered by the aggregate) –Advantage: reduction in resource consumption –Disadvantage: leads to sub-optimal forwarding as packets may not be forwarded along the shortest paths Area 1 Area B1B / R3R2 R1 R1’s View 70 = max(20, 70)60 = max(10, 60)
UCSC 8 Aman ShaikhICNP / Path Selection Error Path selection error for source-destination pair due to aggregates = distance of the selected path - distance along the shortest path Area 1 Area B1B / R3 R2 R1 R1’s View 2060 Shortest path to /24 Selected path to /24 due to aggregate /23 Optimization problem: find minimum number of aggregates such that maximum path selection error is minimized
UCSC 9 Aman ShaikhICNP 2003 Diff. in increment < Diff. in path lengths Bound on Path Selection Error XB2st Path selection error max |diff. in incr. by border rtrs i & j| Max is taken over all border router pairs Error bound Does not depend on source, hence can be determined by parameters local to area X X Increase in path length from source s to subnet t due to aggr. X No path selection error Path selection error Same increment via B1 and B2 < B2st sB1t Path length from source s to subnet t XB2st
UCSC 10 Aman ShaikhICNP 2003 Aggregation Algorithm Optimization problem: select minimum number of aggregates such that path selection error bound is minimized –Error bound can be determined using parameters local to area Algorithm –Step 1: Determine a set of candidate aggregates Use of an Aggregate Tree [Rastogi:02] to identify candidate aggregates –Step 2: Select set of aggregates from candidate aggregates such that path selection error bound is minimized Dynamic program based algorithm
UCSC 11 Aman ShaikhICNP 2003 Step 1: Creating Aggregate Tree Binary tree where each node = prefix A/M –A = IP address, M = mask –Leaves represent subnet prefixes Edge represents “prefix-containment” relationship –Parent prefix contains prefixes of its two children –Each node covers all nodes in its sub-tree / / / / / / / / / / /21subnetaggregate Set 1 of aggrs. Set 2 of aggrs.
UCSC 12 Aman ShaikhICNP 2003 Step 2: Aggregate Selection Find m aggregates (1 m no. subnets) satisfying error bound –Minimize m through binary search To find m aggregates (recursive) –Option 1: Include root Have to find (m – 1) aggregates from two sub-trees –Try to find n aggregates from left sub-tree and (m – 1 – n) aggregates from right sub-tree –Option 2: Do not include root Have to find m aggregates from two sub-trees –Try to find n aggregates from left sub-tree and (m – n) aggregates from right sub-tree
UCSC 13 Aman ShaikhICNP 2003 Performance Evaluation Evaluation using simulated network topologies Topology represented by –N subnets, B border routers Compact address assignment to the subnets –B x N distance matrix Individual elements chosen randomely between D min and D max Investigated: –Effectiveness of algorithm as error bound increases Number of subnets (N), number of border routers (B), distance of border routers to subnet (D max – D min ) –Run-time and memory usage Scaling with number of subnets (N) and error bound
UCSC 14 Aman ShaikhICNP 2003 Effectiveness of Algorithm Number of border routers (B) = 2, D max – D min = 100 Observations: –Reduction in number of aggregates by 50% for 25 % error bound –Number of subnets has no impact on effectiveness
UCSC 15 Aman ShaikhICNP 2003 Effectiveness of Algorithm (cont’d.) Number of subnets (N) = 80, D max – D min = 100 Observation: effectiveness of the algorithm decreases as number of border routers (B) increases –Random selection of distances exacerbates problem
UCSC 16 Aman ShaikhICNP 2003 Run-time of Aggregate Selection Algorithm Number of border routers (B) = 2, D max – D min = 100 Observations: –Lower the error bound, higher the run-time –Run-time lies between O(N 3 ) and O(N 4 )
UCSC 17 Aman ShaikhICNP 2003 Algorithm Memory Usage Number of border routers (B) = 2, D max – D min = 100 Observation: space complexity is O(N 3 ) –Majority consumed by array used for dynamic programming –Very little of this space is actually utilized
UCSC 18 Aman ShaikhICNP 2003 Summary Result: Path selection error due to aggregation in OSPF can be bounded by ONLY parameters local to an area Aggregation Algorithm: Select minimum number of aggregates such that bound on path selection error is minimized –Can be applied on a per-area basis Big plus from operational point-of-view –Ability to trade-off number of aggregates with path selection error –Amenable to on-line implementation Performance: Effective in reducing the number of aggregates (50%) with a small error (25%) –Effectiveness decreases as number of border routers increases
UCSC 19 Aman ShaikhICNP 2003 Future Work Evaluate effectiveness of algorithm on real OSPF network topologies Reduce overall algorithm space and time complexities Improve effectiveness of algorithm as number of border routers increases Related subject: algorithm for assigning addresses to subnets to maximize algorithm effectiveness