840 likes | 925 Views
Designing OSPF Networks. 284_045/c2. 1. Amir Khan. Consulting Engineer akhan@cisco.com. 284_045/c2. 2. Agenda. Technical Overview Protocol Functionality Design Considerations Case Studies. OSPF Technical Overview. Background Features Hierarchical Organization. Why OSPF: Advantages.
E N D
Designing OSPFNetworks 284_045/c2 1
Amir Khan Consulting Engineerakhan@cisco.com 284_045/c2 2
Agenda • Technical Overview • Protocol Functionality • Design Considerations • Case Studies
OSPF Technical Overview • Background • Features • Hierarchical Organization
Why OSPF: Advantages • Fast re-routing • Minimizes routing protocol traffic • Multi-vendor
Why OSPF: Disadvantages • Topology restrictive • Not easily centrally controlled • Security transmitted in clear • No route filtering
A Q 2 B Z 13 C X 13 Link State Technology Z’s Link States Y Q’s Link State Topology information iskept in a database separatefrom the routing table X’s Link State
OSPF Background • Dynamic routing protocol • Link state or SPF technology • Developed by OSPF Working Group of IETF • Intra-autonomous system (IGP) • Designed expressly for TCP/IP Internet environment
OSPF Background (Cont.) • Runs directly over IP (Protocol 89) • Each router maintains an identical database (within areas) • Each router constructs a tree of shortest paths by running SPF algorithm on the database • Tree provides route to each known destination • Cisco’s implementation is fully compliant with the specification as of software release 9.1 (November, 1992)
OSPF Technical Overview • Background • Features • Hierarchical Organization
Fast Convergence • Detection Plus LSA/SPF R2 Alternate Path X N1 N2 R1 R3 Primary Path
Load Balancing • Equal cost multiple paths R2 T1 T1 N2 N1 R1 R4 T1 T1 R3
FDDI Dual Ring Low Bandwidth Utilization • Only changes propagated • Multicast on multi-access broadcast networks LSA X R1 LSA
FDDI Dual Ring Low Bandwidth Utilization ? • Database synchronization LSA Remote Site X R1 LSA R2 LSA
Optimal Path Utilization The optimal path is determined by thesum of the interface costs Cost = 1 Cost = 1 N3 N2 R2 R3 R1 N1 N5 Cost = 10 R4 Cost = 10 N4
IP Subneting Support • Network number, mask pair • Variable length subnet mask (VLSM) • Discontiguous subnets • Supernets/subnet prefixes
Route Summarization • Prefix or all subnets • Prefix or all networks • ‘Area range’ command R2 Backbone Area 0 FDDI Dual Ring With summarization Network 1 Next Hop R1 R1 (ABR) Area 1 Without summarization Network 1.A 1.B 1.C Next Hop R1 R1 R1 1.A 1.B 1.C
Authenticated Routing Updates • AuType 0: No authentication • AuType 1: Simple password • Password is transmitted in clear
External Routes • Redistributed into OSPF • Flooded unaltered throughout the AS • OSPF supports two types of external metrics • Type 1 external metrics • Type 2 external metrics (Default) RIP IGRP EIGRP BGP etc. OSPF Redistribute
to N1 External Cost = 1 Cost = 10 R1 to N1 External Cost = 2 R2 Cost = 8 R3 External Routes • Type 1 external metric Next Hop R1 R2 Network N1 N1 Type 1 11 10 Selected Route
to N1 External Cost = 1 Cost = 10 R1 to N1 External Cost = 2 R2 Cost = 8 R3 External Routes • Type 2 external metric Next Hop R1 R2 Network N1 N1 Type 2 1 2 Selected Route
FDDIDualRing External Routes • Forwarding Address on shared/common network • (Field in AS external links advertisement) R1 AS#2 N1 AS#1 BGP OSPF N3 N2 R3 R2 Network N3 Next Hop R3
B D Route Tagging • Autonomous System B wants to • Propagate routes from A —> D, but NOT propagate routes from C —> D • OSPF tags routes with AS input • This info can be used when redistributing routes A C
TOS Based Routing • IP header supports 3 bit priority field • IP header supports 4 special types of service • Bandwidth • Delay • MTU • Cost • Currently only TOS 0 supported
Utilizes IP Multicast for Sending/Receiving Updates • Broadcast networks • DR and BDR —> AllSPFRouters (224.0.0.5) • All other routers —> AllDRRouters (224.0.0.6) • Hello packets sent to AllSPFRouters (Unicast on point-to-point and virtual links)
OSPF Technical Overview • Background • Features • Hierarchical Organization
Backbone Area #0 Area #1 Area #2 Area #3 Hierarchical Structure • Structure must exist or be created • Explicit topology has precedence over addressing
OSPF Areas • OSPF areas • Group of contiguous hosts and networks • Per area topological database • Backbone area (contiguous) • Virtual links • Inter-area routing Area 2 Area 3 Area 0 Area 1 Area 4
Backbone Area #0 Area #1 Area #2 Area #3 OSPF Areas • Rules • Backbone area must be present • All other areas must have connection to backbone • Backbone must be contiguous
Backbone Area #0 Area #1 Area #2 Area #3 Why Areas • Topology of an area is invisible from outside of the area • Results in marked reduction in routing traffic
Topology/Link State Database • A router has a separate LS database for each area to which it belongs • All routers belonging to the same area have identical database • SPF calculation is performed separately for each area • LSA flooding is bounded by area
Area Link State Database • Area database is composed of: • Router links advertisements • Network links advertisements • Summary links advertisements (IP network, ASBR) • AS external advertisements (in non-stub areas)
Area 1 Classification of Routers • Internal Router (IR) • Area Border Router (ABR) • Backbone Router (BR) • Autonomous System Border Router (ASBR) IR Area 2 Area 3 ABR/BR Area 0 IR/BR ASBR To other AS
OSPF Address to Area Mapping • Area can be one or more networks • Area can be one or more subnets • Any combination of networks and subnets possible • (But bad in practice) • For summarization subnets must be grouped • Mask in area...range command consolidates
Virtual Links • Virtual links configured between any two backbone routers that have an interface to a common non-backbone area • A router connected to two or more areas is considered to be a backbone router Area 3 Backbone Area 0 Backbone Area 0 Area 1 Area 2
Agenda • Technical Overview • Protocol Functionality • Design Considerations • Case Studies
Protocol Functionality • Bringing up adjacencies • Convergence • Subneting • Route summarization • Area classification
OSPF Terminology • Hello protocol • Designated router • Router ID • Neighboring routers • Adjacency • Link state advertisement
FDDI Dual Ring The Hello Protocol • Responsible for establishing and maintaining neighbor relationships • Elects designated router on multi-access networks Hello Hello Hello
FDDI Dual Ring The Hello Packet • Router priority • Hello interval • Router dead interval • Network mask • Options: T-bit, E-bit • List of neighbors Hello Hello Hello
Designated Router • One per multi-access network • Generates network links advertisements • Assists in database synchronization Backup Designated Router Designated Router Designated Router Backup Designated Router 284_045/c2 41
Designated Router by Priority • Configured priority (per interface) • Else determined by highest router ID • Router ID is the highest IP address on the box 131.108.3.2 131.108.3.3 DR R1 Router ID = 144.254.3.5 R2 Router ID = 131.108.3.3 144.254.3.5
Neighboring States • 2-way • Router sees itself in other Hello packets • DR selected from neighbors in state 2-way or greater 2-way DR BDR
Neighboring States • Full • Routers are fully adjacent • Databases synchronized • Relationship to DR and BDR Full DR BDR
When to Become Adjacent • Underlying network is point to point • Underlying network type is virtual link • The router itself is the designated router • The router itself is the backup designated router • The neighboring router is the designated router • The neighboring router is the backup designated router
LSAs Propagate Along Adjacencies • LSAs acknowledged along adjacencies DR BDR
Convergence • Detection Plus LSA/SPF R2 Alternate Path X N1 N2 R1 R3 Primary Path
Convergence • Fault detection • Serial lines • Detection immediate for carrier loss • 2 to 3 times keepalive otherwisekeepalive 10 seconds by default • Token Ring and FDDI immediate • Ethernet • 2 to 3 times keepalive • Hello can supersede keepalive • Dead timer is 40 sec by default Alternate Path X N1 R1 Primary Path
LSA Convergence • Finding a new route • LSA flooded throughout area • Acknowledgment based • Topology database synchronized • Each router derives routing table • Tree to each destination network X N1 R1
Convergence • Finding a new route • Load balancing provides immediate convergence • Equal cost paths only R2 T1 T1 N2 N1 R1 R4 T1 T1 R3