OSPF
OSPF Operation overview
1. Establish neighbor adjacencies: OSPF-enabled routers must form adjacencies with their neighbor before they can share information with that neighbor. An OSPF enabled router sends Hello packets out all OSPF-enabled interfaces to determine whether neighbors are present on those links. If a neighbor is present, the OSPF enabled router attempts to establish a neighbor adjacency with that neighbor. 2. Exchange link-state advertisements: After adjacencies are established, routers then exchange link-state advertisements (LSAs). LSAs contain the state and cost of each directly connected link. Routers flood their LSAs to adjacent neighbors. Adjacent neighbors receiving the LSA immediately flood the LSA to other directly connected neighbors, until all routers in the area have all LSAs. 3. Build the topology table: After the LSAs are received, OSPF-enabled routers build the topology table (LSDB) based on the received LSAs. This database eventually holds all the information about the topology of the network. It is important that all routers in the area have the same information in their LSDBs. 4. Execute the SPF algorithm: Routers then execute the SPF algorithm. The SPF algorithm creates the SPF tree. 5. Build the routing table: From the SPF tree, the best paths are inserted into the routing table. Routing decisions are made based on the entries in the routing table.
what is an OSPF Type 4 LSA?
A type 4 LSA identifies the ASBR and provides a route to the ASBR. The link-state ID is set to the ASBR router ID. All traffic that is destined to an external autonomous system requires routing table knowledge of the ASBR that originated the external routes. In the figure, the ASBR sends a type 1 router LSA with a bit (known as the external bit) that is set to identify itself as an ASBR. When the ABR (identified with the border bit in the router LSA) receives this type 1 LSA, it builds a type 4 LSA and floods it to the backbone, area 0. Subsequent ABRs regenerate a type 4 LSA to flood it into their areas.
which router advertises type 3 LSA?
ABR
what is an OSPF Type 3 Summary LSA?
ABRs do not forward type 1 and 2 LSAs between areas to improve OSPF scalability. However, other routers still need to learn how to reach interarea subnets in other areas. OSPF advertises these subnets on ABRs by using type 3 summary LSAs. The ABRs generate type 3 summary LSAs to describe any networks that are owned by an area to the rest of the areas in the OSPF autonomous system. Each type 3 LSA has a link-state ID field, which carries the network address, and together with the attached subnet mask describes the interarea network. Notice that all three LSAs were advertised by the router having router ID set to 1.1.1.1, which is the ABR router R1.
which router advertises type 5 LSA?
ASBR
what is a paranoid update?
Although OSPF does not refresh routing updates periodically, it does reflood LSAs every 30 minutes. Each LSA includes the link-state age variable, which counts the age of the LSA packet. When a network change occurs, the LSA's advertising router generates an updated LSA to reflect the change in the network topology. Each updated LSA includes incremented sequence number so that other routers can distinguish an updated LSA from the old one. If the LS age variable reaches 30 minutes, meaning that there was no updated LSA created in the last half an hour, it gets automatically regenerated with an increased sequence number and flooded through the OSPF autonomous system. Only the router that originally generated the LSA, the one with the directly connected link, will resend the LSA every 30 minutes. The output of the OSPF LSDB reveals the value of the current link-state age timer for all LSAs. In a normally operating network, you will not see the age variable with values higher than 1800 seconds. When an LSA reaches a max age of 60 minutes in the LSDB, it is removed from the LSDB, and the router will perform a new SPF calculation. The router floods the LSA to other routers, informing them to remove the LSA as well. Because this update is only used to refresh the LSDB, it is sometimes called a paranoid update.
what will be the metric of an ospf summarized routes?
An internal summary route is generated if at least one subnet within the area falls in the summary address range and the summarized route metric is equal to the lowest cost of all the subnets within the summary address range. Interarea summarization can only be done for the intra-area routes of connected areas, and the ABR creates a route to Null0 to avoid loops in the absence of more specific routes.
OSPF uses a two-layer area hierarchy, what are these?
Backbone area, transit area or area 0: Two principal requirements for the backbone area are that it must connect to all other nonbackbone areas and this area must be always contiguous; it is not allowed to have split up the backbone area. Generally, end users are not found within a backbone area. • Nonbackbone area: The primary function of this area is to connect end users and resources. Nonbackbone areas are usually set up according to functional or geo- graphic groupings. Traffic between different nonbackbone areas must always pass through the backbone area.
the OSPF routing table on R1 shows two routes to the Null 0 interface. What is the purpose of these routes?
Cisco IOS Software creates a summary route to the Null0 interface when manual summarization is configured, to prevent routing loops. For example, if the summarizing router receives a packet to an unknown subnet that is part of the summarized range, the packet matches the summary route based on the longest match. The packet is forwarded to the Null0 interface (in other words, it is dropped), which prevents the router from forwarding the packet to a default route and possibly creating a routing loop.
what is the OSPF best route formula?
Cost = Reference bandwidth / Interface bandwidth The cost value is a 16-bit positive number between 1 and 65,535, where a lower value is a more desirable metric. Reference bandwidth is set to 100 Mbps by default. The metric is only relevant on an outbound path; route decisions are not made for inbound traffic. The OSPF cost is recomputed after every bandwidth change, and the Dijkstra's algorithm determines the best path by adding all link costs along a path.The metric is only relevant on an outbound path; route decisions are not made for inbound traffic. The OSPF cost is recomputed after every bandwidth change, and the Dijkstra's algorithm determines the best path by adding all link costs along a path.
which router advertises type 2 LSA?
DR
after the two way state the DR/BDR election process begins. The OSPF Hello packet contains three specific fields used for the DR/BDR election, what are these?
Designated Router, Backup Designated Router, and Router Priority. The Designated Router and Backup Designate Router fields are populated with a list of routers claiming to be DR and BDR. From all routers listed, the router with the highest priority becomes the DR, and the one with the next highest priority becomes the BDR. If the priority values are equal, the router with the highest OSPF router ID becomes the DR, and the one with the next highest OSPF router ID becomes the BDR.
what is the default OSPF interface priority?
Every broadcast and NBMA OSPF-enabled interface is assigned a priority value between 0 and 255. By default, in Cisco IOS, the OSPF interface priority value is 1 and can be manually changed by using the ip ospf priority interface command.
for virtual link stability, on what interface do you base the router id for virtual link neighborship?
For greater stability, loopback interfaces are used as router IDs, and virtual links are created using these loopback addresses.
effects of mismatch MTU in ospf
If MTUs are mismatched between two neighbors, this could introduce issues with exchange of link-state packets, resulting in continuous retransmissions. To prevent such issues, OSPF requires that the same IPv4 MTU be configured on both sides of the link. If neighbors have a mismatched IPv4 MTU configured, they will not be able to form full OSPF adjacency. They will be stuck in the ExStart adjacency state.
OSPF network design restriction, what is this?
If more than one area is configured, known as multi-area OSPF, one of these areas must be area 0. This is called the backbone area.The backbone has to be at the center of all other areas, and other areas have to be connected to the backbone. The main reason is that OSPF expects all areas to inject routing information into the backbone area, which distributes that information into other areas. Another important requirement for the backbone area is that it must be contiguous. In other words, splitting up area 0 is not allowed.
what happen when the address ranges specified for different areas overlap?
If the address ranges specified for different areas overlap, IOS will adopt the first area in the network command list and ignore subsequent overlapping portions. To avoid conflicts, you must pay special attention to ensure that address ranges do not overlap.
why do ospf uses areas?
If you run OSPF in a simple network, the number of routers and links are relatively small, and best paths to all destinations are easily deduced. However, the information necessary to describe larger networks with many routers and links can become quite complex. SPF calculations that compare all possible paths for routes can easily turn into a complex and time-consuming calculation for the router. One of the main methods to reduce this complexity and the size of the link-state information database is to partition the OSPF routing domain into smaller units called areas
does an LSA learned thru a virtual link also goes on paranoid update every 30minutes?
LSA updates work differently on virtual links. An LSA usually refreshes every 30 minutes. However, LSAs learned through a virtual link have the DoNotAge (DNA) option set so that the LSA does not age out. This DNA technique is required to prevent excessive flooding over the virtual link.
Intra-area changes can influence ospf the reevaluate the routes, does inter-area changes also influence ospf to reevaluate its routes?
Network topology change can influence best path selection; therefore, routers must rerun SPF each time there is an intra-area topology change. Interarea changes, which are described in type 3 LSAs, do not trigger the SPF recalculation because the input information for the best path calculation remains unchanged. The router determines the best paths for interarea routes based on the calculation of the bestpath toward the ABR. The changes that are described in type 3 LSAs do not influence how the router reaches the ABR; therefore, SPF recalculation is not needed.
when ospf learn routes, it will be distinguished as what types?
OSPF clearly distinguishes two types of routes: intra-area routes and interarea routes. Intra-area routes are routes that are originated and learned in the same local area. Code for the intra-area routes in the routing table is O. The second type is interarea routes, which originate in other areas and are inserted into the local area to which your router belongs. Code for the interarea routes in the routing table is O IA. Interarea routes are inserted into other areas on the ABR.
what is the IP protocol number used by OSPF?
OSPF works on top of IP and uses protocol number 89. It does not rely on the functions of the transport layer protocols TCP or UDP.
what is an OSPF Virtual Links?
OSPF's two-tiered area hierarchy requires that if more than one area is configured, one of the areas must be area 0, the backbone area. All other areas must be directly connected to area 0, and area 0 must be contiguous. OSPF expects all nonbackbone areas to inject routes into the backbone, so that the routes can be distributed to other areas. A virtual link is a link that allows discontiguous area 0s to be connected, or a disconnected area to be connected to area 0, via a transit area. The OSPF virtual link feature should be used only in very specific cases, for temporary connections or for backup after a failure. Virtual links should not be used as a primary backbone design feature.
when manually changing the IP address, you must consider to
Once an OSPF router ID is selected, it is not changed even if the interface that is used to select it changed its operational state or its IP address. To change the OSPF router ID, you must reset the OSPF process with the clear ip ospf process command or reload the router. In production networks, the OSPF router ID cannot be changed easily. Changing the OSPF router ID requires reset of all OSPF adjacencies, resulting in a temporary routing outage. The router also has to originate new copies of all originating LSAs with the new router ID. You can either clear the specific OSPF process by specifying the process ID, or you can reset all OSPF processes by using the clear ip ospf process command.
how does the DR/BDR operates?
Only LSAs are sent to the DR/BDR. The normal routing of packets on the segment will go to the best next-hop router. When the DR is operating, the BDR does not perform any DR functions. Instead, the BDR receives all the information, but the DR performs the LSA forwarding and LSDB synchronization tasks. The BDR performs the DR tasks only if the DR fails. When the DR fails, the BDR automatically becomes the new DR, and a new BDR election occurs.
what is OSPF?
Open Shortest Path First uses a link-state algorithm to build and calculate the shortest path to all known destinations. Each router in an OSPF area contains an identical link-state database, which is a list of each of the router-usable interfaces and reachable neighbors.OSPF is a link-state protocol based on the open standard. At a high level, OSPF operation consists of three main elements: neighbor discovery, link-state information exchange, and best-path calculation. To calculate the best path, OSPF uses the shortest path first (SPF) or Dijkstra's algorithm. OSPF was developed by the Internet Engineering Task Force (IETF) to overcome the limitations of distance vector routing protocols. One of the main reasons why OSPF is largely deployed in today's enterprise networks is the fact that it is an open standard; OSPF offers a large level of scalability and fast convergence. Despite its relatively simple configuration in small and medium-size networks, OSPF implementation and troubleshooting in large-scale networks can at times be challenging.
what command can you use to display the interface cost?
R1# show ip ospf interface [interface] R1# show ip ospf interface brief
what is the command to change the default hello and dead timer?
R1(config-if)# ip ospf hello-interval [value] R1(config-if)# ip ospf dead-interval [value] When you configure the hello interval, the default value of the dead interval is automatically adjusted to four times the hello interval.
what command displays OSPF neighbor information on a perinterface basis?
R2# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 1 FULL/DR 00:01:57 172.16.12.1 Serial0/0 • Neighbor ID: Represents neighbor router ID. • Priority: Priority on the neighbor interface used for the DR/BDR election. • State: A Full state represents the final stage of OSPF neighbor establishment process and denotes that the local router has established full neighbor adjacency with the remote OSPF neighbor. DR means that DR/BDR election process has been completed and that the remote router with the router ID 1.1.1.1 has been elected as the designated router (DR). • Dead Time: Represents value of the dead timer. When this timer expires, the router terminates the neighbor relationship. Each time a router receives an OSPF Hello packet from a specific neighbor, it resets the dead timer back to its full value. • Address: Primary IPv4 address of the neighbor router. • Interface: Local interface over which an OSPF neighbor relationship is established.
how can you verify what router-id the router is using?
R2# show ip protocols
how can you see and debug if the ospf neighbor issue is cause by mtu mismatched?
R3# debug ip ospf adj
what is the command to display the type 4 LSA
R4# show ip ospf database asbr-summary
what is the command to display type 5 LSA?
R4# show ip ospf database external
what is the command to display the type 2 lsa?
R4# show ip ospf database network
what command can you use to show type 1 LSA?
R4# show ip ospf database router
what command can you use to display locally generated LSA?
R4# show ip ospf database router self-originate
how can you display type 3 LSA?
R4# show ip ospf database summary
what are the benefits of route summarization?
Route summarization directly affects the amount of bandwidth, CPU power, and memory resources that the OSPF routing process consumes. Without route summarization, every specific-link LSA is propagated into the OSPF backbone and beyond, causing unnecessary network traffic and router overhead. With route summarization, only the summarized routes are propagated into the backbone (area 0). Summarization prevents every router from having to rerun the SPF algorithm, increases the stability of the network, and reduces unnecessary LSA flooding. Also, if a network link fails, the topology change is not propagated into the backbone (and other areas by way of the backbone). Specific-link LSA flooding outside the area does not occur.Receiving a type 3 LSA into its area does not cause a router to run the SPF algorithm. The routes being advertised in the type 3 LSAs are appropriately added to or deleted from the router's routing table, but an SPF calculation is not done.
what is an OSPF hello and dead timers?
Similar to EIGRP, OSPF uses two timers to check neighbor reachability: the hello and dead intervals. The values of hello and dead intervals are carried in OSPF Hello packets and serve as a keepalive message, with the purpose of acknowledging the presence of the router on the segment. The hello interval specifies the frequency of sending OSPF Hello packets in seconds. The OSPF dead timer specifies how long a router waits to receive a Hello packet before it declares a neighbor router as down.
what is an OSPF Type 2 Network LSA?
The DR of the network is responsible for advertising the network LSA. A type 2 network LSA lists each of the attached routers that make up the transit network, including the DR itself, and the subnet mask that is used on the link. The type 2 LSA then floods to all routers within the transit network area. Type 2 LSAs never cross an area boundary. The link-state ID for a network LSA is the IP interface address of the DR that advertises it.
what is an OSPF Router ID and how can you configure it?
The OSPF router ID is a fundamental parameter for the OSPF process. For the OSPF process to start, Cisco IOS must be able to identify a unique OSPF router ID. Similar to EIGRP, the OSPF router ID is a 32-bit value expressed as an IPv4 address. At least one primary IPv4 address on an interface in the up/up state must be configured for a router to be able to choose router ID; otherwise, an error message is logged, and the OSPF process does not start. router-id [ip-address]
how can you configure an area to be a stub area?
The area stub router configuration mode command is used to define an area as a stub area. Each router in the stub area must be configured with the area stub command. The Hello packets that are exchanged between OSPF routers contain a stub area flag that must match on neighboring routers. R1(config)# router ospf 1 R1(config-router)# area 1 stub %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0/1 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
what is the default timer on an OSPF point to point links?
The default OSPF hello and dead timers on point-to-point links are 10 seconds and 40 seconds, respectively
what is the default value of OSPF hello and dead timers?
The default value of the OSPF hello interval on broadcast multiaccess (Ethernet) and point-to-point links is 10 seconds, and the default value of the dead interval is four times hello (40 seconds). Default values of the OSPF hello and dead timers on all other OSPF network types, including nonbroadcast (NBMA) like Frame Relay on the Serial 2/0 interface, are 30 seconds and 120 seconds, respectively.
what is the ospf hello timer value in a virtual link interface?
The hello protocol works over virtual links as it does over standard links, in 10-second intervals.
how does ospf calculate the cost of inter-area routes?
The internal OSPF router within an area receives only summarized info about interarea routes. As a result, the cost of an interarea route cannot be calculated the same way as for the intra-area routes. When ABRs propagate information about the interarea routes with type 3 LSAs, they include their lowest cost to reach a specific subnet in the advertisement. The internal router adds its cost to reach a specific ABR to the cost announced in a type 3 LSA. Then it selects the route with the lowest total cost as the best route.
what is an OSPF LSA?
The link-state advertisement (LSA) is a basic communication means of the OSPF routing protocol for the Internet Protocol (IP). It communicates the router's local routing topology to all other local routers in the same OSPF area. they describe the network topology in great detail. Each router stores the received LSA packets in the link-state database (LSDB).
Type-1 LSA can show the what type of link is the router connected to, what does connected to stub, to another router (point to point) and to transit network means?
The transit network describes Ethernet or NMBA segment, which can include two or more routers. If the link is connected to a transit network, the LSA also includes the info about the DR address.
can virtual link run on stub areas?
The virtual link relies on the stability of the underlying intra-area routing. Virtual links cannot go through more than one area, nor through stub areas. Virtual links can only run through standard nonbackbone areas.
what does Forward Address: 0.0.0.0 means?
The zero forwarding address tells the rest of the routers in the OSPF domain that ASBR itself is the gateway to get to the external routes.
When forming adjacency on multiaccess network, every router will try to establish full OSPF adjacency with all other routers on the segment. This may not represent an issue for the smaller multiaccess broadcast networks, but it may represent an issue for the nonbroadcast multiaccess (NBMA) networks, where in most cases you do not have full-mesh private virtual circuit (PVC) topology. how can this be solved?
This issue in NBMA networks manifests in an inability for neighbors to synchronize their OSPF databases directly among themselves. A logical solution in this case is to have a central point of OSPF adjacency responsible for the database synchronization and advertisement of the segment to the other routers.Again, the solution for this problem is to establish a central point with which every other router forms adjacency and which advertises the segment as a whole to the rest of the network. The routers on the multiaccess segment elect a designated router (DR) and backup designated router (BDR), which centralizes communications for all routers connected to the segment
how does ospf calculate the cost of intra-area routes?
To calculate the cost of intra-area routes, the router first analyzes OSPF database and identifies all subnets within its area. For each possible route, OSPF calculates the cost to reach the destination by summing up the individual interface costs. For each subnet, the route with the lowest total cost is selected as the best route.
how to configure summarization on the ABR?
To consolidate and summarize routes at an area boundary, use the area range command in the router configuration mode. The ABR will summarize routes for a specific area before injecting them into a different area via the backbone as type 3 summary LSAs. area area-id range ip-address mask [advertise | not-advertise] [cost cost] R1(config-router)# area 1 range 192.168.20.0 255.255.252.0
how does ospf select Between Intra-Area and Interarea Routes?
To eliminate the single point of failure on area borders, at least two ABRs are used in most networks. As a result, ABR can learn about a specific subnet from internal routers and also from the other ABR. ABR can learn an intra-area route and also an interarea route for the same destination. Even though the interarea route could have lower cost to the specific subnet, the intra-area path is always the preferred choice.
what are the RFC of OSPF?
Version 1 of the protocol is described in the RFC 1131. The current version used for IPv4, Version 2, is specified in RFCs 1247 and 2328. OSPF Version 3, which is used in IPv6 networks, is specified in RFC 5340.
how does OSPF chose the best path?
When SPF is trying to determine the best path toward a known destination, it compares total costs of specific paths against each other. The paths with the lowest costs are selected as the best paths. The OSPF cost is an indication of the overhead to send packets over an interface.
OSPF identifies all LSAs using a 32-bit LSID. When generating a type 1 LSA, what LSID does a router uses?
When generating a type 1 LSA, the router uses its own router ID as the value of LSID.
how does passive interface affects ospf and how do you enable it?
When you configure a passive interface under the OSPF process, the router stops sending and receiving OSPF Hello packets on the selected interface. The passive interface should be used only on interfaces where the router is not expected to form any OSPF neighbor adjacency. A specific interface can be configured as passive, or passive interface can be configured as the default. If the default option is used, any interfaces that need to form a neighbor adjacency must be exempted with the no passive-interface configuration command. Router(config-if)# passive-interface [ interface | default ]
OSPF cost formula is not really efficient when it comes to high speed link like gig ports, the reference is still 100Mbps thus making all high speed links to have a cost of 1, how can you solve this?
You can change the OSPF reference bandwidth under OSPF configuration mode by using the auto-cost reference-bandwidth command. The reference bandwidth value is inserted in megabits per second.Only consistent reference bandwidth across OSPF domain ensures that all routers calculate the best paths correctly. R1(config)# router ospf 1 R1(config-router)# auto-cost reference-bandwidth 10000
what router configuration command can you use to define an OSPF virtual link?
area area-id virtual-link router-id [authentication [message-digest| null]] [hello-interval seconds] [retransmit-interval seconds] [transmitdelay seconds] [dead-interval seconds] [[authentication-key key] | [message-digest-key key-id md5 key]] Make sure that you understand the effect of these options before changing them. For instance, the smaller the hello interval, the faster the detection of topological changes, but the more routing traffic. You should be conservative with the setting of the retransmit interval, or the result is needless retransmissions. The value should be larger for serial lines and virtual links. The transmit delay value should take into account the interface's transmission and propagation delays.
in OSPF, on what routers can you only do manual summarization?
can configure summarization on an area boundary or autonomous system boundary. ABRs summarize type 3 LSAs, and ASBRs summarize type 5 LSAs.
what command enables you to investigate hello timer mismatch?
debug ip ospf hello
which router advertises type 1 LSA?
each router within the area
how can you change OSPF network type?
ip ospf network [network_type]
By default, OSPF will advertise any subnet configured on the loopback interface as /32 host route, how can you change this?
ip ospf network point-to-point
what command is used to change the ospf interface priority?
ip ospf priority interface command,
what are the things that are needed to match and those doesn't for an OSPF to establish neighborship?
must match : area number hello timers MTU area types must not match : process-id
how many areas can you configure it an interface?
only one.
how do you enable the OSPF Process?
router ospf [process-id]
how can you verify how often the SPF algorithm was run?
show ip ospf
what command displays the content of the LSDB and verifies information about specific LSAs?
show ip ospf database The output reveals the presence of different LSA types. For each LSA type, you can see which router advertised it, the age of the LSA, and the value of the link ID.
how can you verify which interface is currently the DR/BDR?
show ip ospf interface
the different hello/dead timer values on interfaces are observed using what command?
show ip ospf interface
what command shows you all interfaces enabled in the OSPF process. For each enabled interface, you can see detailed information such as OSPF area ID, OSPF process ID, and how the interface was included into the OSPF process.
show ip ospf interface
what command confirms that full OSPF adjacency is established. The output also shows additional information about neighbor router ID, DR/BDR roles, and how long the neighbor session has been established ?
show ip ospf neighbor detail
how can you configure manual summarization in ASBR?
summary-address {{ip-address mask} | {prefix mask}} [not-advertise] [tag tag]
The DR/BDR election process takes place on broadcast and NBMA networks. The main difference between the two are?
the type of IP address used in the Hello packet. On the multiaccess broadcast networks, routers use multicast destination IPv4 address 224.0.0.6 to communicate with the DR (called AllDRRouters), and the DR uses multicast destination IPv4 address 224.0.0.5 to communicate with all other non-DR routers (called AllSPFRouters). On NBMA networks, the DR and adjacent routers communicate using unicast addresses.
once DR and BDR is elected, and another router joins the network with higher priority or ID, will it the DR be re-elected?
they are not preempted. This rule makes the multiaccess segment more stable by preventing the election process from occurring whenever a new router becomes active. It means that the first two DR-eligible routers on the link will be elected as DR and BDR. A new election will occur only when one of them fails.
which router advertises type 4 LSA?
type 4 summary LSA generated by an ABR only when an ASBR exists within an area
what is an OSPF type 5 external LSA?
type 5 external LSAs used to describe routes to networks outside the OSPF autonomous system, The link-state ID is the external network number. Because of the flooding scope and depending on the number of external networks, the default lack of route summarization can also be a major issue with external LSAs. Therefore, you should consider summarization of external network numbers at the ASBR to reduce flooding problems.
how can you define which interfaces will run the OSPF process and to define the area ID for those interfaces ?
use network [ip-address] [wildcard-mask] area [area-id] command
OSPF routers has different names based on their roles, what are these?
• ABR: A router that has interfaces connected to at least two different OSPF areas, including the backbone area. ABRs contain LSDB information for each area, make route calculation for each area and advertise routing information between areas. • ASBR: ASBR is a router that has at least one of its interfaces connected to an OSPF area and at least one of its interfaces connected to an external non-OSPF domain. • Internal router: A router that has all its interfaces connected to only one OSPF area. This router is completely internal to this area. • Backbone router: A router that has at least one interface connected to the back- bone area.
what is a broadcast ospf network type?
• Broadcast: Multicast is used to dynamically discover neighbors. The DR and BDR are elected to optimize the exchange of information. It is a default OSPF network type for Ethernet links. Uses DR/BDR - Yes Hello Timer - 10 Dead Timer - 40 Dynamic Neighbor Discovery - Yes
What are the states that OSPF go through when establishing neighborship?
• Down: No information has been received on the segment. • Init: The interface has detected a Hello packet coming from a neighbor, but bidirectional communication has not yet been established. • 2-Way: There is bidirectional communication with a neighbor. The router has seen itself in the Hello packets coming from a neighbor. At the end of this stage, the DR and BDR election would have been done if necessary. When routers are in the 2-Way state, they must decide whether to proceed in building an adjacency. The decision is based on whether one of the routers is a DR or BDR or the link is a point-to-point or a virtual link. • ExStart: Routers are trying to establish the initial sequence number that is going to be used in the information exchange packets. The sequence number ensures that routers always get the most recent information. One router will become the master and the other will become the slave. The primary router will poll the secondary for information. • Exchange: Routers will describe their entire LSDB by sending database description (DBD) packets. A DBD includes information about the LSA entry header that appears in the router's LSDB. The entries can be about a link or about a network. Each LSA entry header includes information about the link-state type, the address of the advertising router, the link's cost, and the sequence number. The router uses the sequence number to determine the "newness" of the received link-state information. • Loading: In this state, routers are finalizing the information exchange. Routers have built a link-state request list and a link-state retransmission list. Any information that looks incomplete or outdated will be put on the request list. Any update that is sent will be put on the retransmission list until it gets acknowledged. • Full: In this state, adjacency is complete. The neighboring routers are fully adjacent. Adjacent routers will have similar LSDBs
what are the key features of OSPF?
• Independent transport: OSPF works on top of IP and uses protocol number 89. It does not rely on the functions of the transport layer protocols TCP or UDP. • Efficient use of updates: When an OSPF router first discovers a new neighbor, it sends a full update with all known link-state information. All routers within an OSPF area must have identical and synchronized link-state information in their OSPF link-state databases. When an OSPF network is in a converged state and a new link comes up or a link becomes unavailable, an OSPF router sends only a partial update to all its neighbors. This update will then be flooded to all OSPF routers within an area. • Metric: OSPF uses a metric that is based on the cumulative costs of all outgoing interfaces from source to destination. The interface cost is inversely proportional to the interface bandwidth and can be also set up explicitly. • Update destination address: OSPF uses multicast and unicast, rather than broadcast, for sending messages. The IPv4 multicast addresses used for OSPF are 224.0.0.5 to send information to all OSPF routers and 224.0.0.6 to send information to DR/BDR routers. The IPv6 multicast addresses are FF02::5 for all OSPFv3 routers and FF02::6 for all DR/BDR routers. If the underlying network does not have broadcast capabilities, you must establish OSPF neighbor relationships using a unicast address. For IPv6, this address will be a link-local IPv6 address. • VLSM support: OSPF is a classless routing protocol. It supports variable-length subnet masking (VLSM) and discontiguous networks. It carries subnet mask information in the routing updates. • Manual route summarization: You can manually summarize OSPF interarea routes at the Area Border Router (ABR), and you have the possibility to summarize OSPF external routes at the Autonomous System Boundary Router (ASBR). OSPF does not know the concept of autosummarization. • Authentication: OSPF supports clear-text, MD5, and SHA authentication.
what two major problems does route summarization solves?
• Large routing tables • Frequent LSA flooding throughout the autonomous system
what is a loopback ospf network type?
• Loopback: Default network type on loopback interfaces. Uses DR/BDR - No Hello Timer - N/A Dead Timer - N/A Dynamic Neighbor Discovery - No
what is a Nonbroadcast ospf network type?
• Nonbroadcast: Used on networks that interconnect more than two routers but without broadcast capability. Frame Relay and ATM are examples of NBMA networks. Neighbors must be statically configured, followed by DR/BDR election. This network type is the default for all physical interfaces and multipoint subinterfaces using Frame Relay encapsulation. Uses DR/BDR - Yes Hello Timer - 30 Dead Timer - 120 Dynamic Neighbor Discovery - No
what is a point-to-multipoint nonbroadcast ospf network type?
• Point-to-multipoint nonbroadcast: Cisco extension that has the same characteristics as point-to-multipoint type except for the fact that neighbors are not discovered dynamically. Neighbors must be statically defined, and unicast is used for communication. Can be useful in point-to-multipoint scenarios where multicast and broadcast are not supported. Uses DR/BDR - No Hello Timer - 30 Dead Timer - 120 Dynamic Neighbor Discovery - No
what is a point-to-multipoint ospf network type?
• Point-to-multipoint: OSPF treats this network type as a logical collection of pointto- point links even though all interfaces belong to the common IP subnet. Every interface IP address will appear in the routing table of the neighbors as a host /32 route. Neighbors are discovered dynamically using multicast. No DR/BDR election occurs. Uses DR/BDR - No Hello Timer - 30 Dead Timer - 120 Dynamic Neighbor Discovery - Yes
what is a point-to-point ospf network type?
• Point-to-point: Routers use multicast to dynamically discover neighbors. There is no DR/BDR election because only two routers can be connected on a single point-topoint segment. It is a default OSPF network type for serial links and point-to-point Frame Relay subinterfaces. Uses DR/BDR - No Hello Timer - 10 Dead Timer - 40 Dynamic Neighbor Discovery - Yes
how does the DR and BDR improve network functioning?
• Reducing routing update traffic: The DR and BDR act as a central point of contact for link-state information exchange on a multiaccess network; therefore, each router must establish a full adjacency with the DR and the BDR only. Each router, rather than exchanging link-state information with every other router on the segment, sends the link-state information to the DR and BDR only, by using a dedicated IPv4 multicast address 224.0.0.6 or FF00::6 for IPv6. The DR represents the multiaccess network in the sense that it sends link-state information from each router to all other routers in the network. This flooding process significantly reduces the routerrelated traffic on the segment. • Managing link-state synchronization: The DR and BDR ensure that the other routers on the network have the same link-state information about the common segment. In this way, the DR and BDR reduce the number of routing errors.
how can you optimize OSPF?
• Route summarization (ABR, ASBR) • Area Types ( Stub, TStub, NSSA, TNSSA) • Default Routes
what are the special ospf areas?
• Stub area: they use a default route, indicatedas 0.0.0.0. Stub areas cannot contain ASBRs (except that the ABRs may also be ASBRs). The stub area does not accept external routes. • Totally stubby area: If a router needs to send a packet to a network external to the area, it sends the packet using a default route. Totally stubby areas cannot contain ASBRs (except that the ABRs may also be ASBRs). A totally stubby area does not accept external or interarea routes.
OSPF offers two methods of route summarization, what are these?
• Summarization of internal routes performed on the ABRs • Summarization of external routes performed on the ASBRs
what are the conditions that ospf routers can follow to determine which router will be the DR?
• The router with the highest priority value is elected as the DR. • The router with the second-highest priority value is the BDR. • In case of a tie where two routers have the same priority value, router ID is used as the tiebreaker. The router with the highest router ID becomes the DR. The router with the second-highest router ID becomes the BDR. • A router with a priority that is set to 0 cannot become the DR or BDR. A router that is not the DR or BDR is called a DROTHER.
what are the OSPF LSA Types?
• Type 1, Router LSA: Every router generates router link advertisements for each area to which it belongs. Router link advertisements describe the state of the router links to the area and are flooded only within that particular area. For all types of LSAs, there are 20-byte LSA headers. One of the fields of the LSA header is the link-state ID. The link-state ID of the type 1 LSA is the originating router ID. • Type 2, Network LSA: DRs generate network link advertisements for multiaccess networks. Network link advertisements describe the set of routers that are attached to a particular multiaccess network. Network link advertisements are flooded in the area that contains the network. The link-state ID of the type 2 LSA is the IP interface address of the DR. • Type 3, Summary LSA: An ABR takes the information that it learned in one area and describes and summarizes it for another area in the summary link advertisement. This summarization is not on by default. The link-state ID of the type 3 LSA is the destination network number. • Type 4, ASBR Summary LSA: The ASBR summary link advertisement informs the rest of the OSPF domain how to get to the ASBR. The link-state ID includes the router ID of the described ASBR. • Type 5, Autonomous System LSA: Autonomous system external link advertisements, which are generated by ASBRs, describe routes to destinations that are external to the autonomous system. They get flooded everywhere, except into special areas. The link-state ID of the type 5 LSA is the external network number. Other LSA types include the following: • Type 6: Specialized LSAs that are used in multicast OSPF applications • Type 7: Used in special area type NSSA for external routes • Type 8, 9: Used in OSPFv3 for link-local addresses and intra-area prefix • Type 10, 11: Generic LSAs, also called opaque, which allow future extensions of OSPF
what are the five ospf message types?
• Type 1: Hello packet: Hello packets are used to discover, build, and maintain OSPF neighbor adjacencies. To establish adjacency, OSPF peers at both sides of the link must agree on some parameters contained in the Hello packet to become OSPF neighbors. • Type 2: Database Description (DBD) packet: When the OSPF neighbor adjacency is already established, a DBD packet is used to describe LSDB so that routers can compare whether databases are in sync. • Type 3: Link-State Request (LSR) packet: When the database synchronization pro- cess is over, the router might still have a list of LSAs that are missing in its database. The router will send an LSR packet to inform OSPF neighbors to send the most recent version of the missing LSAs. • Type 4: Link-State Update (LSU) packet: There are several types of LSUs, known as LSAs. LSU packets are used for the flooding of LSAs and sending LSA responses to LSR packets. It is sent only to the directly connected neighbors who have previously requested LSAs in the form of LSR packet. In case of flooding, neighbor routers are responsible for re-encapsulation of received LSA information in new LSU packets. • Type 5: Link-State Acknowledgment (LSAck) packet: LSAcks are used to make flooding of LSAs reliable. Each LSA received must be explicitly acknowledged. Multiple LSAs can be acknowledged in a single LSAck packet.
auto-cost reference-bandwidth when used affects all interface, what can you do when you only want to influence a single interface?
• Using the bandwidth command, you can change how IOS treats a specific interface by default. Bandwidth setting changes the artificial value of the interface bandwidth that is derived by IOS based on the interface type. A manually set bandwidth value on the interface overrides the default value and is used by OSPF as input to the interface cost calculation. Modifying the bandwidth not only influences OSPF but also other routing protocolslike EIGRP, which takes the bandwidth into account when calculating the EIGRP metric. • Using the OSPF interface configuration command, you can directly change the OSPF cost of specific interface. Cost of the interface can be set to a value between 1 and 65,535. This command overrides whatever value is calculated based on the reference bandwidth and the interface bandwidth. R1(config-if)# ip ospf cost 500
OSPF Behavior in NBMA Hub-and-Spoke Topology, there are two things you need to consider, what are these?
• neighbor [ip_address] • Setting the OSPF priority value to 0 on the spoke interfaces