1.05k likes | 1.06k Views
Module 4 OSPF Overview and Configuration. Module Objectives. Define OSPF, features, advantages over RIP Describe OSPF LSA, format and Types Define LSDB, Initial synchronization, database exchange & reliable flooding
E N D
Module Objectives • Define OSPF, features, advantages over RIP • Describe OSPF LSA, format and Types • Define LSDB, Initial synchronization, database exchange & reliable flooding • Describe Routing Calculations, supported network type & Database Synchronization • Describe how to build OSPF Networks • Define the OSPF routing, areas, router types and virtual Links • Differentiate DR, BDR, Router Election • OSPF Configuration and Examples • Lab Exercises • Summary
Define OSPF • Dynamic Routing Protocol • Link State Protocol • Employ a distributed database model • More efficient than RIP
The OSPF Advantage • OSPF is an interior gateway protocol (IGP) that is more efficient than RIP. • Consumes fewer network resources • Highly scalable • Faster convergence • A more descriptive routing metric • Route load sharing • Greater security
Link-state Protocol • Employ a distributed database model. • Each router advertises a description of its local environment • interfaces • costs • neighbor information • Uses a single synchronized database for collecting advertisements (LSDB) • Routing table is derived from this database • Utilize a shortest-path first algorithm • OSPF is a Link-state routing protocol
Basic Features of OSPF • Hello Packets • Link State Advertisements (LSA) • Link State Database • Reliable Flooding • Shortest Path First Routing Calculations • Areas and Inter-area Routing
OSPF Hello Packet & Neighbor Discover • OSPF Hello packets are sent out all of a router’s interfaces to advertise itself to neighbor routers • A router learns about its neighbors when it receives neighbor router’s Hello packet • Hello packets are sent out every 10 seconds by default • If subsequent Hello packet is not received within 40 seconds, neighbor relationship is terminated
OSPF Hello Packets • Will only be recognized by routers attached to the same subnet with same subnet mask • Contains information on parameters for • Hello Interval and • Router Dead Interval • This information is used by neighbor routers to agree on the communication variables • This allows an occasional lost Hello packet not to be interpreted as a link down condition.
OSPF Hello Packets (cont.) • In a broadcast environment, it contains the OSPF router IDs of all routers the sender has heard up to the point of transmission • This reduces overhead of sending multiple Hellos • Ensure that the OSPF link is bi-directional • NOTE: An OSPF router will not forward data packets over a unidirectional link.
Link State Advertisement (LSA) • Each OSPF router is responsible for describing its local piece of the routing topology through the transmission of link-state advertisements. • Every thirty minutes a router will -- even in the absence of any change, retransmit this self-originating data in the event it may have been lost or corrupted in a neighbor router’s tables.
OSPF LSA Format • All OSPF LSAs start with a 20-byte common header • This provides orderly updating and removal of LSAs and organization to the LSDB
LSA Format - LS Age • Number of seconds since the LSA was originated normally 0 - 30 mins. • If LSA reaches 30 minutes, originating router will refresh the LSA by flooding a new instance. • If LSA reaches 1 hour, it is deleted from the database.
LSA Format - LS Type • Classifies the LSA according to function • Type 1 • Type 2 • Type 3 • Type 4 • Type 5 • Type 7
LSA Format - Link State ID • A unique identification • Used to describe a router in the OSPF routing domain • Depends on the LS Type • Type 1, 2, 3, 4, 5 or 7
LSA Format - Advertising Router • The originating router’s OSPF router ID • In practice, this is one of the router’s IP address
LSA Format - LS Sequence Number • A linear sequence number • Used to compare a new LSA with an old LSA • The LSA instance having the larger LS Sequence Number is considered to be more recent.
LSA Format - LS Checksum • Used to detect data corruption. • Does not include LS Age field • Derived using Fletcher checksum algorithm
LSA Types Type Number Description 1 Router-LSAs 2 Network-LSAs 3 Summary-LSAs (IP network) 4 Summary-LSAs (ASBR) 5 AS external-LSAs 7 NSSA external-LSAs
LS Type 1 - Router-LSAs • Generated by each OSPF router • It describes the router’s set of active interfaces, its associated cost and any neighbor information • Link State ID is set to the router’s OSPF Router ID • Flooded throughout a single area only
LS Type 2 - Network-LSAs • Generated by OSPF Designated Routers (DRs) • Describes a network segment - i.e., broadcast domain along with the IDs of all currently attached routers. • Link State ID field lists the IP interface address of the DR
LS Type 3 - Summary-LSAs (IP Network) • This originate from Area Border Routers (ABRs) • Supports hierarchical routing through the use of OSPF areas • Link State ID field is an IP network number
LS Type 4 - Summary-LSAs (ASBR) • This originate from Area Border Routers (ABRs) • Similar to LS Type 3 • Used when destination is an Autonomous System Boundary Router (ASBR) • The Link State ID is the AS boundary router’s OSPF Router ID
LS Type 5 - AS-external-LSAs • Originated by AS boundary routers and describes destinations ex-ternal to the AS. • Link State ID field specify an IP network number
LS Type 7 - NSSA external-LSAs • Allows the import of external routes that will not be advertised out of the NSSA • NSSA - Not So Stubby Area
Router LSA Format - Link ID • Originating router’s link information follows the LSA header. • There are four Link IDs determined by Link Type. • Type 1 Neighboring router’s Router ID • Three of this Link ID are relevant in a broadcast network
Router LSA Format - Link Data • For transit and Virtual Links • specifies the IP address of associated router interface. • For stub networks • Specifies the stub network mask
Router LSA Format - Metric • The cost of using this router link. • A user-configurable value from 1 - 65,535 • The larger the metric, the less likely (more expensive) data will be routed over that particular link. • Connections to STUB networks are allowed to advertise a metric of zero.
Link-State Database (LSDB) • The collection of all OSPF LSAs received • Each OSPF router has an identical LSDB • Gives complete description of the network: • routers • network segments • interconnectivity (how it is interconnected) • LSDBs are exchanged between neighboring routers soon after routers discover each other • Maintained through a procedure called reliable flooding
LSDB Initial Synchronization • When two neighbors first start communicating, they must synchronize their databases before forwarding traffic over their shared link to prevent routing loops from occurring.
OSPF-specified Database Exchange • Procedure used by the routers to synchronize their databases once the hello protocol determines a bi-directional connection between router neighbors. • During synchronization, the neighbor routers do three things: • Forward current LSA headers • Compares the header received to the LSDB • Request the full LSA for new or newer headers
Example LSDB Initial Synchronization Switches A thru F are in a stable OSPF network and have fully synchronized databases OSPF is restarted on Switch F, forcing database synchronization with switch A.
OSPF Database - Reliable Flooding • LSA Updates are periodically generated by a router wishing to update a self-originated LSA because: • The router’s local state may have changed • The router wants to delete one of its self-originated LSAs • Used to propagate LSA Updates throughout the routing domain
Reliable Flooding - What Happens • A router will generate a Link-state Update packet containing one or more LSAs • Update is forwarded out all interfaces. • Neighbor router receives the Update and compares the LSAs with the LSDB • More recent LSAs are installed in LSDB • Acknowledgement is sent back to originating route • New Link-state Update containing the LSA is sent out all interfaces except receiving one.
OSPF Routing Calculations • With router LSDBs synchronized for all routers in routing domain • The router will use Dijkstra’s Shortest Path First algorithm • This allows calculation of shortest paths to all destinations • Routing table is constructed from the calculations and includes • network destinations • associated costs
OSPF Routing Calculations • Every link carries an associated cost.
OSPF Routing Calculations • Applying Dijkstra’s SPF algorithm, Switch C’s routing table would incorporate the highlighted links Note that Switch A will never talk directly to Switch B as long as the links thru Switch C remain stable.
OSPF Routing Calculations • Note how changing a link cost affects the route calculation for the shortest path With this configuration, Switch C now has two paths of equal cost to communicate with Switch J. Communication with Switch B is no longer direct, but must routed thru Switch A.
OSPF Network Types • Point-to-Point networks • Serial lines • Non-broadcast Multi-access (NBMA) networks • X.25, ATM • Point-to-Multipoint networks • Frame Relay • Broadcast networks
OSPF Network Type - Broadcast Networks • A network with more than two attached devices • Has the ability to address a single physical message to all of the attached devices (broadcast)
OSPF Network Type - Broadcast Networks • Only network type supported by Extreme switches • Other Network Types are for WAN use
Broadcast Networks Terminology • DR - Designated Router • BDR - Backup DR • DR and BDR Election • Network LSAs
Broadcast Networks - Designated Router • Every broadcast network has a Designated Router (DR) and a Backup Designated Router (BDR) • Each router on the network exchanges link state information only with the DR and BDR. • This information is used to maintain database synchronization between the DR and neighbor routers • This reduces the amount of traffic otherwise consumed by routing protocol traffic • Only a DR generates a LS Type 2 - Network-LSAs
DR and BDR Election • First OSPF router on an IP subnet always becomes the DR • Second OSPF router always becomes BDR • If DR or BDR fail, the OSPF router with the highest Router Priority will replace the BDR • If two OSPF routers have same Router Priority, then the OSPF Router ID will break the tie • A Router Priority of 0 will prevent an OSPF router from ever being elected as DR or BDR
Database Synchronization • An OSPF router will send its Link State Update (LSU) to the DR and BDR • The destination IP address for the LSU will be multicast address 224.0.0.6 (All DRouters). • The DR will then flood the update to all OSPF routers • The destination IP address for the LSU will be multicast address 224.0.0.5 (All OSPFRouters).
Representing Broadcast Subnet in LSDB • If an OSPF router included all known routers on a common subnet in its router-LSA, there would be n*(n-1) links in the OSPF database. • By using a new LSA type, the Network-LSA, to represent the broadcast subnet, the number of links is reduced from n*(n-1) to n*2. • Each network LSA has a link to every router-LSA, and every router-LSA has a link to the broadcast subnet’s network-LSA. • DR maintains the network-LSA
Type 2: Network LSAs • Created in order to reduce the number of links in each router’s resulting LSDB • Describes the subnet, all routers on that network DR identity
Type 2: Network LSAs The network-LSA helps in database synchronization, since a router having a router-LSA with a link to the network-LSA and vice-versa is known to have a database synchronized with the Designated Router.
Building OSPF Networks • Hierarchical Routing • OSPF Routing Hierarchy • OSPF Areas • OSPF Types of Routers • Virtual Links • CLI Commands for OSPF Configuration