www.networkbulls.com
Best Institute for CCNA CCNP CCSP CCIP CCIE Training in India
M-44, Old Dlf, Sector-14 Gurgaon, Haryana, India
Call: +91-9654672192
RFC 2328 defines OSPFv2, a link-state routing protocol that uses Dijkstra's shortest path first (SPF) algorithm to calculate paths to destinations. OSPFv2 is used in IPv4 networks. OSPF was created for its use in large networks where RIP failed. OSPF improved the speed of convergence, provided for the use of VLSMs, and improved the path calculation.
In OSPF, each router sends link-state advertisements about itself and its links to all other routers in the area. Note that it does not send routing tables but link-state information about its interfaces. Then, each router individually calculates the best routes to the destination by running the SPF algorithm. Each OSPF router in an area maintains an identical database describing the area's topology. The routing table at each router is individually constructed using the local copy of this database to construct a shortest-path tree.
OSPFv2 is a classless routing protocol that permits the use of VLSMs and classless interdomain routing (CIDR). With Cisco routers, OSPF also supports equal-cost multipath load balancing and neighbor authentication. OSPF uses multicast addresses to communicate between routers. OSPF uses IP protocol 89.
OSPFv2 Concepts and Design
This section covers OSPF theory and design concepts. It discusses OSPF LSAs, area types, and router types. OSPF uses a two-layer hierarchy with a backbone area at the top and all other areas below. Routers send LSAs informing other routers of the status of their interfaces. The use of LSAs and the limitation of OSPF areas are important concepts to understand for the test.
OSPFv2 Metric
The metric that OSPFv2 uses is cost. It is an unsigned 16-bit integer in the range of 1 to 65,535. The default cost for interfaces is calculated based on the bandwidth in the formula 108/BW, where BW is the bandwidth of the interface expressed as a full integer of bps. If the result is smaller than 1, the cost is set to 1. A 10BASE-T (10 Mbps = 107 bps) interface has a cost of 108/107 = 10. OSPF performs a summation of the costs to reach a destination; the lowest cost is the preferred path. Table 11-2 shows some sample interface metrics.
| Interface Type | OSPF Cost |
|---|---|
| 10 Gigabit Ethernet | .01 => 1 |
| Gigabit Ethernet | .1 => 1 |
| OC-3 (155 Mbps) | .64516 => 1 |
| Fast Ethernet | 108/108 = 1 |
| DS-3 (45 Mbps) | 2 |
| Ethernet | 108/107 = 10 |
| T1 | 64 |
| 512 kbps | 195 |
| 256 kbps | 390 |
The default reference bandwidth used to calculate OSPF costs is 108 (cost = 108/BW). Notice that for technologies that support speeds greater than 100 Mbps, the default metric gets set to 1 without regard for the network's different capabilities (speed).
Because OSPF was developed prior to high-speed WAN and LAN technologies, the default metric for 100 Mbps was 1. Cisco provides a method to modify the default reference bandwidth. The cost metric can be modified on every interface.
OSPFv2 Adjacencies and Hello Timers
OSPF uses Hello packets for neighbor discovery. The default Hello interval is 10 seconds (30 seconds for nonbroadcast multiaccess [NBMA] networks). Hellos are multicast to 224.0.0.5 (ALLSPFRouters). Hello packets include such information as the router ID, area ID, authentication, and router priority.
Figure 11-1 shows a point-to-point network and an NBMA network.
For point-to-point networks, valid neighbors always become adjacent and communicate using multicast address 224.0.0.5. For broadcast (Ethernet) and NBMA networks (Frame Relay), all routers become adjacent to the DR and BDR but not to each other. All routers reply to the DR and BDR using the multicast address 224.0.0.6. The later section "OSPF DRs" covers the DR concept.
On OSPF point-to-multipoint nonbroadcast networks, it might be necessary to configure the set of neighbors that are directly reachable over the point-to-multipoint network. Each neighbor is identified by its IP address on the point-to-multipoint network. Non-broadcast point-to-multipoint networks do not elect DRs, so the DR eligibility of configured neighbors is undefined. OSPF communication in point-to-point networks use unicast addresses.
OSPF virtual links unicast OSPF packets. Later in this chapter, the section "Virtual Links" discusses virtual links.
OSPFv2 Areas
As a network grows, the initial flooding and database maintenance of LSAs can burden a router's CPU. OSPF uses areas to reduce these effects. An area is a logical grouping of routers and links that divides the network. Routers share link-state information with only the routers in their areas. This setup reduces the size of the database and the cost of computing the SPF tree at each router.
Each area is assigned a 32-bit integer number. Area 0 (or 0.0.0.0) is reserved for the backbone area. Every OSPF network should have a backbone area. The backbone area is responsible for distributing routing information between areas. It must exist in any internetwork using OSPF over multiple areas as a routing protocol. As you can see in Figure 11-2, communication between Area 1 and Area 2 must flow through Area 0. This communication can be internal to a single router that has interfaces directly connected to Areas 0, 1, and 2.
OSPF Router Types
OSPF classifies participating routers based on their place and function in the area architecture. Figure 11-3 shows OSPF router types.
The following list explains each router type in Figure 11-3:
Tip
An OSPF router can be an ABR, an ASBR, and a backbone router at the same time. The router is an ABR if it has an interface on Area 0 and another interface in another area. The router is a backbone router if it has one or more interfaces in Area 0. The router is an ASBR if it redistributes external routes into the OSPF network.
OSPF DRs
On multiaccess networks (such as Ethernet), some routers get selected as DRs. The purpose of the DR is to collect all LSAs for the multiaccess network and to forward the LSA to all non-DR routers; this arrangement reduces the amount of LSA traffic generated. A router can be the DR for one multiaccess network and not the DR in another attached multiaccess network.
The DR also floods the network LSAs to the rest of the area. OSPF also selects a BDR; it takes over the function of the DR if the DR fails. Both the DR and BDR become adjacent to all routers in the multiaccess network. All routers that are not DR and BDR are sometimes called DRothers. These routers are only adjacent to the DR and BDR. OSPF routers multicast LSAs only to adjacent routers. DRothers multicast packets to the DR and BDR using the multicast address 224.0.0.6 (ALLDRouters). The DR floods updates using ALLSPFRouters (224.0.0.5).
DR and BDR selection is based on an OSPF DR interface priority. The default value is 1, and the highest priority determines the DR. In a tie, OSPF uses the numerically highest router ID. The router ID is the IP address of the configured loopback interface. The router ID is the highest configured loopback address, or if the loopback is not configured then it's the highest physical address. Routers with a priority of 0 are not considered for DR/BDR selection. The dotted lines in Figure 11-4 show the adjacencies in the network.
In Figure 11-4, Router A is configured with a priority of 10, and Router B is configured with a priority of 5. Assuming that these routers are turned on simultaneously, Router A becomes the DR for the Ethernet network. Router C has a lower priority, becoming adjacent to Router A and Router B but not to Router D. Router D has a priority of 0 and thus is not a candidate to become a DR or BDR.
If you introduce a new router to the network with a higher priority than that of the current DR and BDR, it does not become the selected DR unless both the DR and BDR fail. If the DR fails, the current BDR becomes the DR.
LSA Types
OSPF routers generate LSAs that are flooded throughout an area or the entire autonomous system. OSPF defines different LSA types for participating routers, DRs, ABRs, and ASBRs. Understanding the LSA types can help you with other OSPF concepts. Table 11-3 describes the major LSA types. There are other LSA types that are not covered in this book.
Type 1 and Type 2 LSAs are contained within each OSPF area. Routers in different areas pass interarea traffic. ABRs exchange Type 3 and Type 4 LSAs. Type 4 and Type 5 LSAs are flooded throughout all areas.
AS External Path Types
The two types of AS external paths are Type 1 (E1) and Type 2 (E2), and they are associated with Type 5 LSAs. ASBRs advertise external destinations whose cost can be just a redistribution metric (E2) or a redistribution metric plus the costs of each segment (E1) used to reach the ASBR.
By default, external routes are of Type 2, which is the metric (cost) used in the redistribution. Type 1 external routes have a metric that is the sum of the redistribution cost plus the cost of the path to reach the ASBR.
OSPF Stub Area Types
OSPF provides support for stub areas. The concept is to reduce the number of interarea or external LSAs that get flooded into a stub area. RFC 2328 defines OSPF stub areas. RFC 1587 defines support for NSSAs. Cisco routers use totally stubby areas, such as Area 2 as shown in Figure 11-5.
Stub Areas
Consider Area 1 in Figure 11-5. Its only path to the external networks is via the ABR through Area 0. All external routes are flooded to all areas in the OSPF AS. You can configure an area as a stub area to prevent OSPF external LSAs (Type 5) from being flooded into that area. A single default route is injected into the stub area instead. If multiple ABRs exist in a stub area, all inject the default route. Traffic originating within the stub area routes to the closest ABR.
Totally Stubby Areas
Take the Area 1 in Figure 11-5 one step further. The only path for Area 1 to get to Area 0 and other areas is through the ABR. A totally stubby area does not flood network summary LSAs (Type 3). It stifles Type 4 LSAs as well. Like regular stub areas, totally stubby areas do not flood Type 5 LSAs. They send just a single LSA for the default route. If multiple ABRs exist in a totally stubby area, all ABRs inject the default route. Traffic originating within the totally stubby area routes to the closest ABR.
NSSAs
Notice that Area 2 in Figure 11-5 has an ASBR. If this area is configured as an NSSA, it generates the external LSAs (Type 7) into the OSPF system while retaining the characteristics of a stub area to the rest of the AS. There are two options for the ABR. First, the ABR for Area 2 can translate the NSSA external LSAs (Type 7) to AS external LSAs (Type 5) and flood the rest of the internetwork. Second, the ABR is not configured to convert the NSSA external LSAs to Type 5 external LSAs, thus the NSSA external LSAs remain within the NSSA.
Virtual Links
OSPF requires that all areas be connected to a backbone router. Sometimes, WAN link provisioning or failures can prevent an OSPF area from being directly connected to a backbone router. You can use virtual links to temporarily connect (virtually) the area to the backbone.
As shown in Figure 11-6, Area 4 is not directly connected to the backbone. A virtual link is configured between Router A and Router B. The flow of the virtual link is unidirectional and must be configured in each router of the link. Area 2 becomes the transit area through which the virtual link is configured. Traffic between Areas 2 and 4 does not flow directly to Router B. Instead, the traffic must flow to Router A to reach Area 0 and then pass through the virtual link.
OSPFv2 Router Authentication
OSPFv2 supports the authentication of routes using 64-bit clear text or cryptographic Message Digest 5 (MD5) authentication. Plain-text authentication passwords do not need to be the same for the routers throughout the area, but they must be the same between neighbors.
MD5 authentication provides higher security than plain-text authentication. As with plain-text authentication, passwords don't have to be the same throughout an area, but they do need to be same between neighbors.
OSPFv2 Summary
OSPFv2 is used in large enterprise IPv4 networks. The network topology must be hierarchical. OSPF is used in the enterprise campus building access, distribution, and core layers. OSPF is also used in the enterprise data center, WAN/MAN, and branch offices.
- Link-state routing protocol.
- Uses IP protocol 89.
- Classless protocol (supports VLSMs and CIDR).
- Metric is cost (based on interface bandwidth by default).
- Fast convergence. Uses link-state updates and SPF calculation.
- Reduced bandwidth use. Sends partial route updates only when changes occur.
- Routes are labeled as intra-area, interarea, external Type 1, or external Type 2.
- Support for authentication.
- Uses the Dijkstra algorithm to calculate the SPF tree.
- Default administrative distance is 110.
- Uses multicast address 224.0.0.5 (ALLSPFRouters).
- Uses multicast address 224.0.0.6 (ALLDRouters).
- Very good scalability. Recommended for large networks.
No comments:
Post a Comment