Skip to content

Network Ninja

The Long Road to Cisco

  • Home
  • About
  • Legal Disclaimer
  • Archives

Less
More
Trim
Untrim
« Older
Home
Loading
Newer »

Tag Archive for 'LSDB'

Open Shortest Path First – OSPF Fundamentals – DR and BDR

Published
by
Deon Botha
on February 18, 2009
in BDR, BSCI, BSCI Notes, Certification, Cisco Systems, Concepts and Constructs, DR, OSPF and VLAN
. 8 Comments

When routers are connected to the same broadcast segment (I.O.W. several routers are in the same VLAN, on the same switch you getting the idea). One router is assigned the duty to maintain adjacencies with all other routers on the segment. This is the designated router (DR) and the DR  router is selected using information in the Hello messages. For redundancy purposes a backup designated router (BDR) is also elected (There is a reason for this, read on).

DRs are created on multi-access links because the number of adjacencies grows at a quadratic rate. For a network of n routers, the number of adjacencies required would be:

ospf adjacency

Two (2) routers require the following adjacencies:

ospf adjacency 2

Four (4) routers require the following adjacencies:

ospf adjacency 4

Ten (10) Routers require the following adjacencies:

ospf adjacency 45

Maintaining a OSPF segment consumes more bandwidth and requires more processing resources (CPU and memory) as more routers are added onto a OSPF network (Due to keeping the tables updated and probability of changes occuring more frequently etc).

The DR and maintaining relationships

The purpose of a DR is to be the “one router” (sounds like the matrix) to which all other routers are adjacent (the router that has all the routes on the network). Using a DR reduces the number of adjacencies that consume bandwidth and processing to n – 1 (Larger networks will however still require more processing even if you are using a DR). With a DR the adjacencies scale more effectively and efficiently with the network (as one can see in the below figure and table).

To show this in a graphic way one can see how this “adjacency” relationship works without a DR, with a DR, and with a DR and BDR with a small example network using 5 routers.

OSPF Adjacenies

Taking this a step further and plotting out the exponential growth requirements of OSPF adjacencies the table below shows the number of adjacencies needed for 1 – 10 routers (imagine the CPU and Memory requirements, not to mention the bandwidth consumption). Plan accordingly when implementing OSPF (at this point you generally use OSPF because you have a non-homogenous network environment and need the open standard because of this fact, I dont really see a point otherwise cause its such a resource hog and mission to setup).

OSPF Adjacency with DR

The job of the DR

The role of the DR is to receive updates and distribute these updates to each segment router, making sure that each router acknowledges receipt and has a synchronized copy of the Link-State Database (LSDB).

Routers advertise changes to the “AllDRs” multicast address of 224.0.0.6 where the DR then advertise the Link-State advertisements (LSAs) using the “AllSPF” multicast address 224.0.0.5 where each router then ack receipt.

The BDR listens passively to this exchange and maintains a relationship with all the routers.

If the DR stops producing hellos, the BDR promotes itself and assumes the role of DR.

NB. DRs and BDRs are only useful on multi-access links because they reduce adjacencies. The concept of a DR is not used nor usefull on point-to-point links because there can only be one adjacency.

DRs are still however elected on Point-to-Point Ethernet links (most common type of links in networking these days) which is a rather pointless and resource waste/hog (as a DR is not really needed) which is why you will find that many design guides recommend changing Ethernet links to Point-to-Point mode to stop this from happening.

If a DR fails, the BDR is pomoted. The BDR is elected on the basis of highest OSPF priority, ties in OSPF priority are broken in favour of the highest IP ADDRESS.

The default priority is 1 and a priority of 0 (zero) prevents a router from being elected to the DR or BDR role.

Priority can be set from 0-255 (manually) to change the priority from default from the interface,

Router(config-if)#ip ospf priority number

DRs  are inherently seen as stable entities  once elected into the position, even if a Router joins a network with a “greater” priority the DR will not change.

OSPF Segment with Priorities

To give an example of this an OSPF Segment with 5 Routers ( A – E, with different priorities 0 – 3). Taking what has been discussed previously A would be the DR, B the BDR, and E would never be elected. However this neglects the following set of circumstances:

Imagine the following sequence of events in this small segment,

  1. Router C starts first.
    1. Router C sends out Hellos and waits the dead time for a response from other routers.
    2. Receiving no Response, Router C conducts an Election and becomes the BDR.
    3. As there is no DR on this network, Router C then promotes itself to DR.
  2. Router E starts (priority= 0)
    1. Router E will not become the BDR due to its priority setting
  3. Router B starts and becomes the BDR.
  4. Router A starts
  5. Router D starts

In the above scenario the startup sequence of the routers caused the election of the DR and BDR (namely Router C is DR and Router B is BDR) which is not what would have been expected. This is because designated routers do not preempt, the elected DR/BDR serves in its role until reboot/failure (DR and BDR are stable entities on the network once elected).

In this network as it stands now If Router C restarts, Router B promotes itself to DR and Router A is elected BDR while C is down. If Router B goes down, Router A promotes itself and elects Router C or Router D (whichever has the highest IP Address). Finally when the BDR is rebooted, Router B wins the election for BDR.

NOTE: In addition to rebooting, clearing the OSPS process using the the command clear ip ospf process * on the DR will force the DR and BDR election.

Notes and Notices: This is a part of my personal BSCI notes and research to assist myself in learning and understanding the concepts and theory for the BSCI exam. I learn by making notes reading and writing things down and wish to file them where I can’t lose them. These notes are not to be seen, judged or mistaken for replacements to Cisco recognized and authorized training which I personally support and attend and suggest you undertake if you are going for the BSCI Certification.

Open Shortest Path First – OSPF Fundamentals – Basics

Published
by
Deon Botha
on October 7, 2008
in BSCI, BSCI Notes, Certification, Cisco Systems, Concepts and Constructs and OSPF
. 0 Comments

Open Shortest Path First (OSPF) is an open standard routing protocol, defined in detail in many Internet Engineering Task Force (IETF) Request For Comments (RFCs)  including RFC 2328.

OSPF uses the Shortest Path First (SPF) Algorithm to calculate the best path to a given destination. OSPF builds loop-free paths that converge quickly, but often requires more processor power and memory than distance vector routing protocols (EIGRP).

OSPF can be more complicated because there are many topology and configuration options to consider versus EIGRP that has is has less of a learning curve.

OSPF is designed to offer flexibility in network design (OSPF is an open standard vs EIGRP that is Cisco Proprietary) which IOW allows OSPF to supports linking between different vendors Cisco, HP, etc.

OSPF Basics

OSPF as mentioned before is a Link-State routing protocol (basics) that is based on the Dijkstra Shortest Path First (SPF) Algorithm.

When one compares distance-vector routing to link-state routing;

  • link-state routing processes more information locally (on the router meaning more memory & CPU use) to reduce network bandwidth use.
  • Link-State routing protocols record all possible routes thus avoiding many of the techniques needed by distance-vector routing protocols to avoid loops.
  • Distance-vector routing protocols advertise routes to neighbours while link-state routing protocols advertise a list of connections.
  • In link-state routing, a neighbour is a directly connected router (or a router on the opposite side of a WAN link with the same network address).

OSPF is used within an Autonomous-System (AS). It has advantages over distance-vector routing protocols:

  • OSPF is classless + allows summarization
  • Converges quickly
  • OSPF is a standard, and fairly widely support can be found in a heterogeneous environment
  • Conserves bandwidth
  • uses multicast and not broadcast
  • sends incremental change-based updates
  • uses cost as the metric
  • KB is fairly widely available and less restricted than EIGRP

When a link goes up or down in a link-state routing protocol network, a link-state advertisement (LSA) is generated. LSAs are shared with neighbours and a topological database (a.k.a link-state database (LSDB) or Topology Table) is built.

LSAs are marked with sequence numbers so that older and/or newer versions of advertisements can be recognized (start 0×8000 0001 end 0xFFFF FFFF before rolling to the start again). The eventual goal is that all routers in the same AS has the same LSDB which is then processed using SPF from which the best routes are selected and a routing table created.

The Topology Database (LSDB) is the routers view of the network within the AS it operates. This includes every OSPF router within that area and all connected networks.

To view the current status of the link state database,
Router#show ip ospf database

The Topology Database is updated by LSAs and each router in a AS has exactly the same topology database. All routers must have the same view of the network otherwise routing loops or loss of connectivity will occur.

When a router realizes there has been a change to the network topology, the router is responsible for informing the rest of the routers in the area with a LSA. This happens mostly due to:

  • A router losing physical or data-link layer connectivity on a connected network
  • A router does not receive a predetermined number of consecutive OSPF hello messages
  • A router receives a LSA update from a adjacent neighbour, informing it of the change in the network topology

In any of the above cases, the router will generate an LSA and flood it to all neighbours with the following stipulations:

  • If the LSA is new, the route is added to the database, the route is flooded out other links so other routers are updated, SPF is rerun.
  • If the sequence number is the same as the current entry in the Topology Database, the router ignores the advertisement.
  • If the sequence number is older, the router sends the newer copy (in memory) back to the advertiser to make sure that all neighbours have the latest LSA.

All OSPF operations centre around populating and maintaining

  • Neighbour Table
  • Topology Table
  • Routing Table

Notes and Notices:

This is a part of my personal BSCI notes and research to assist myself in learning and understanding the concepts and theory for the BSCI exam. I learn by making notes reading and writing things down and wish to file them where I can’t lose them. These notes are not to be seen, judged or mistaken for replacements to Cisco recognized and authorized training which I personally support and attend and suggest you undertake if you are going for the BSCI Certification.


Search

About

You are currently browsing the Network Ninja weblog archives for 'lsdb' tag.

Latest

RSS
  • Digital Growth with your Job
  • Open Shortest Path First – OSPF Fundamentals – Scenario
  • Open Shortest Path First – OSPF Fundamentals – Questions and Answers – Question 13
  • Open Shortest Path First – OSPF Fundamentals – Questions and Answers – Question 12
  • Open Shortest Path First – OSPF Fundamentals – Questions and Answers – Question 11
  • Open Shortest Path First – OSPF Fundamentals – Questions and Answers – Question 10
  • Open Shortest Path First – OSPF Fundamentals – Questions and Answers – Question 9
  • Open Shortest Path First – OSPF Fundamentals – Questions and Answers – Question 8
  • Open Shortest Path First – OSPF Fundamentals – Questions and Answers – Question 7
  • Open Shortest Path First – OSPF Fundamentals – Questions and Answers – Question 6

Archives

  • June 2009
  • April 2009
  • March 2009
  • February 2009
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Categories

  • 802.11 (7)
  • 802.1Q (1)
  • 802.1X (1)
  • AAA (1)
  • Access Point (7)
  • ACL (4)
  • Addressing (3)
  • Asides (31)
  • auto-summary (3)
  • AutoQoS (1)
  • Bandwidth (2)
  • BCMSN (55)
  • BDR (2)
  • BGP (1)
  • BPDU Filtering (1)
  • BPDU Guard (2)
  • BPDU Root Guard (1)
  • BSCI (67)
  • BSCI Notes (18)
  • BSCI Questions (48)
  • Business (1)
  • Cabling and Equiptment (3)
  • CAM (1)
  • CCDA (1)
  • CDP (1)
  • CEF (1)
  • Certification (123)
  • CIDR (2)
  • CIR (2)
  • Cisco Systems (144)
  • Concepts and Constructs (76)
  • CoS (1)
  • Cost (3)
  • DAI (1)
  • DDNS (1)
  • Debug (2)
  • DHCP Snooping (1)
  • DHCP Spoofing (1)
  • DR (3)
  • DUAL (1)
  • Dynamic ARP Inspection (1)
  • ECNM (5)
  • EIGRP (5)
  • Enterprise Architecture (7)
  • EtherChannel (1)
  • GLBP (1)
  • Hello Timer (2)
  • Hold Timer (2)
  • Hot Standby Router Protocol (1)
  • HSRP (1)
  • IGRP (1)
  • IIN (2)
  • Inter-Vlan Routing (1)
  • Interconnection Technologies (2)
  • IP Source Guard (1)
  • IS-IS (1)
  • ISL (1)
  • LACP (1)
  • Link State Advertisements (2)
  • Load Balancing (2)
  • Loop Guard (1)
  • MAC Address Flooding (1)
  • MLS (1)
  • MSTP (1)
  • NBAR (1)
  • NBMA (1)
  • Off-Topic (12)
  • OSPF (18)
  • PAgP (1)
  • passive-interface (1)
  • PoE (1)
  • Port Security (1)
  • Priority (2)
  • Proxy ARP (1)
  • PVC (1)
  • QoS (2)
  • RIP (1)
  • RIPv2 (1)
  • Root Guard (1)
  • RSTP (1)
  • Show (6)
  • Software (1)
  • SONA (2)
  • SSH (2)
  • STP (5)
  • Stub Router (3)
  • summary-address (1)
  • Support (4)
  • Switch Spoofing (1)
  • TCAM (1)
  • Telnet (2)
  • Troubleshooting (1)
  • Trunk (6)
  • Unidirectional Link Detection (1)
  • VACL (3)
  • VC (1)
  • Vine (20)
  • VLAN (11)
  • VLAN Hopping (1)
  • VLSM (1)
  • VoIP (1)
  • VRRP (1)
  • VTP (4)
  • VTY (1)
  • Wireless (7)


Styled with Sawchuk

Powered by WordPressabc and K21.0-RC7

Entries Feed and Comments Feed

44 queries. 2.4030 seconds.