220 likes | 432 Views
Optimizing OSPF. Bernard Fortz (Universit é Libre de Bruxelles) Mikkel Thorup (AT&T Labs-Research). Presented by : Lei Tian. OSPF . Variable-length subnet masks Discontinuous subnets No periodic updates Route authentication OSPF standard described in RFC 2328.
E N D
Optimizing OSPF • Bernard Fortz (Université Libre de Bruxelles) • Mikkel Thorup (AT&T Labs-Research) Presented by : Lei Tian
OSPF • Variable-length subnet masks • Discontinuous subnets • No periodic updates • Route authentication • OSPF standard described in RFC 2328 • Open Shortest Path First • Link State SPF technology • Developed by OSPF working group of IETF (RFC 1247) • Designed for TCP/IP Internet environment • Fast convergence
The Metrics in OSPF 56 Kbps serial link 1758 64 Kbps serial link 1562 T1 (1.544 Mbps serial link) 65 E1 (2.048 Mbps serial link) 48 4 Mbps token ring 25 Ethernet 10 16 Mbps token ring 6 FDDI 1
Change the weight • Administrator can change the weight manually. • ip ospf cost • Use to configure the cost of sending a packet on the network. • Cost is a metric value in the range 0-65535; the default value is 1. • The router LSA advertises the link-state metric as the link cost. • Example host1(config)#interface fastethernet 0/0 host1(config-if)#ip ospf cost 50 • Use the no version to reset the path cost to the default value, 1.
How well does OSPF perform on real network • We define the cost of an arc as
Cont. • For a given network topology, we can get the optimal solution in term of link cost.
OSPF vs general routing • Can OSPF perform as well as optimal routing? • No • How close is OSPF compare with general routing • Not even close
OSPF vs general routing cont. For instance s 3n 3 1 n2-2 3n 3 3 2 n2-3 3n 3 3 t n2-4 3 3 3 n 3 n2-n-1
OSPF vs general routing cont. In general routing s Each path has length n2 3n 3 1 1 n2-2 3n 3 1 2 n2-3 3n 3 t 1 n2-4 3 3 1 n n2-n-1
OSPF vs general routing cont. n/2 s n 3 1 n2-2 n/4 n/2 3 2 n/8 n2-3 n/4 3 t n2-4 3 3 n n2-n-1
Improve OSPF • Can we improve OSPF performance? • Yes, by changing the weight of each link. • Since it is NP-hard to find the optimal solution of OSPF, so a Local Search Heuristic to approximate optimal OSPF is needed.
A Local Search Heuristic(HEUR) • W={1,2,…,wmax} is the set of all possible weights. • The search is on all possible functions (vectors) • Start with a random vector • Do { • } Until x meets some optimality criteria
The Neighborhood Structure • if x’ can be obtained from x by one of the following two: • Single weight change: • Choose an arc and change its weight • There are |A|x(|W|-1) such neighbors • Evenly balance flows: • Choose a node x and a destination t and balance • There are |N|x(|N|-1) such neighbors
x1 P1 x2 P2 t x3 P3 xp Pp Evenly Balancing Flows x Every xi is on a shortest path to t.
Local Search • Do { • } Until x is a local minimum • SEARCH returns x’ s.t. cost(x’)<cost(x) • Problem: A local minimum may be far from global minimum • Solution: Allow non-improving moves
Local Search (cont’d) • Problem: We may encounter cycles. • Solution: Tabu Search (maintain a tabu list of the attributes of visited points) • HEUR uses a hash function h and a table T with 1 bit for each possible value of h. • If T(h(x’))=true, SEARCH does not return x’.
Local Search (cont’d) • Problem: Duplicate neighbors due to the complex neighborhood structure. • Solution: SEARCH maintains an internal hash table T’. • If T’(h(x’))=true, SEARCH does not evaluate the cost of x’.
Local Search (cont’d) • Problem: Too much neighbors. • Solution: • r=0.2 • At each iteration evaluate only a subset of the neighbors such that • If (the cost is improved) {r=max(0.01,r/3)} • Else {r=min(1,10c)}
Diversification • In order to avoid “long valley”. • If cost is not improved for 300 iterations, perturb x by adding a random perturbation, selected at random from [-2,2] to %10 of the weights.
Numerical Results • Two Additional routings are measured, along the others: • L2OSPF : weights proportional to the Euclidean distance between nodes. • RANDOMOSPF : Weight are assigned randomly (The first step of HEUR).
Conclusion • HEUR is the best algorithm. • In fact it is the only algorithm “knowing” the demands • It achieves performance close to %2 of OPT.