Basic Open Shortest Path First

Một phần của tài liệu CCNP practical studies routing (Trang 87 - 91)

This chapter focuses on a number of objectives falling under the CCNP routing principles. Understanding basic Open Shortest Path First (OSPF) routing principles not only applies to the CCNP certification but to all Cisco-based certifications. A concrete understanding of how OSPF routing works is fundamental for any small or large network. OSPF is commonly used in large service provider networks or large financial institutions. This chapter assumes knowledge of the previous chapter, which deals conceptually with IP routing principles and in particular link-state routing protocols.

The chapter starts by covering the basic OSPF concepts. It then briefly explains why OSPF is considered an improved routing protocol over Routing Information Protocol (RIP) by covering how OSPF discovers, chooses, and maintains routing tables.

Nonbroadcast multiaccess (NBMA) is a particular challenge in any network

environment. This chapter covers how OSPF overcomes any limitations imposed by NBMA networks.

Five practical scenarios, included in the chapter, help you complete your

understanding and ensure you have all the basic OSPF routing skills to complement your understanding of how to configure and maintain OSPF on Cisco Internet Operating System (IOS) routers.

Basic OSPF

OSPF is a link-state routing protocol. Link-state protocols use the shortest path first (SPF) algorithm to populate the routing table. OSPF shares information with every router in the network.

OSPF is considered a difficult protocol to configure and requires a thorough understanding of terms that are commonly used. Table 3-1 explains briefly the common OSPF terminology used throughout this chapter.

Table 3-1. Common OSPF Terms

Term Description

Link state Information is shared between directly connected routers. This information propagates throughout the network unchanged and is also used to create a shortest path first (SPF) tree.

Area A group of routers that share the same area ID. All OSPF routers require area assignments.

Autonomous

system (AS) A network under a common network administration.

Cost The routing metric used by OSPF. Lower costs are always preferred. You can manually configure the cost with the ip ospf cost command. By default, the cost is calculated by using the formula cost = 108 / bandwidth.

Router ID Each OSPF router requires a unique router ID, which is the highest IP address configured on a Cisco router or the highest numbered loopback address. You can manually assign the router ID.

Adjacency When two OSPF routers have exchanged information between each other and have the same topology table. An adjacency can have the following different states or exchange states:

1. Init state— When Hello packets have been sent and are awaiting a reply to establish two-way communication.

2. Establish bi-directional (two-way) communication—

Accomplished by the discovery of the Hello protocol routers and the election of a DR.

3. Exstart— Two neighbor routers form a master/slave relationship and agree upon a starting sequence to be incremented to ensure LSAs are acknowledged.

4. Exchange state— Database Description (DD) packets continue to flow as the slave router acknowledges the master's packets. OSPF is operational because the routers can send and receive LSAs between each other. DD

packets contain information, such as the router ID, area ID, checksum, if authentication is used, link-state type, and the advertising router. LSA packets contain

information, such as router ID also but in addition include MTU sizes, DD sequence numbering, and any options.

5. Loading state— Link-state requests are sent to

neighbors asking for recent advertisements that have not yet been discovered.

6. Full state— Neighbor routers are fully adjacent because their link-state databases are fully synchronized. Routing tables begin to be populated.

Topology table Also called the link-state table. This table contains every link in the whole network.

Designated router

(DR) This router is responsible for ensuring adjacencies between all neighbors on a multiaccess network (such as Ethernet). This ensures all routers do not need to maintain full adjacencies with each other.

The DR is selected based on the router priority. In a tie, the router with the highest router ID is selected.

Backup DR A backup ro uter designed to perform the same functions in case the DR fails.

Link-state advertisement (LSA)

A packet that contains all relevant information regarding a router's links and the state of those links.

Priority Sets the router's priority so a DR or BDR can be correctly elected.

Router links Describe the state and cost of the router's interfaces to the area.

Router links use LSA type 1.

Summary links Originated by area border routers (ABRs) and describe networks in the AS. Summary links use LSA types 3 and 4.

Network links Originated by DRs. Network links use LSA type 2.

External links Originated by autonomous system boundary routers (ASBRs) and describe external or default routes to the outside (that is, non- OSPF) devices for use with redistributio n. External Links use the LSA type 5.

Area border router (ABR)

Router located on the border of one or more OSPF areas that connects those areas to the backbone network.

Autonomous system boundary router (ASBR)

ABR located between an OSPF autonomous system and a non- OSPF network.

OSPF has so many features that the most efficient way to appreciate them is to enable OSPF on routers and observe how the routers dynamically discover IP networks.

Before covering various OSPF scenarios, this chapter covers how OSPF is configured in single and multiple OSPF areas.

Configuring OSPF in a Single Area

When configuring any OSPF router, you must establish which area assignment to enable the interface for. OSPF has some basic rules when it comes to area

assignment. OSPF must be configured with areas. The backbone area 0, or 0.0.0.0, must be configured if you use more than one area assignment. You can configure OSPF in one area; you can choose any area, although good OSPF design dictates that you configure area 0.

To enable OSPF on a Cisco router and advertise interfaces, the following tasks are required:

Step 1. Use the command router ospf process ID to start OSPF.

Step 2. Use the network command to enable the interfaces.

Step 3. Identify area assignments.

Step 4. (Optional) Assign the router ID.

Example 3-1 displays OSPF with a process ID of 1 and places all interfaces

configured with an IP address in area 0. The network command network 0.0.0.0 255.255.255.255 area 0 dictates that you do not care (255.255.255.255) what the IP address is, but if an IP address is enabled on any interface, place it in area 0.

Example 3-1 Configuring OSPF in a Single Area

router ospf 1

network 0.0.0.0 255.255.255.255 area 0

The following is a list of reasons OSPF is considered a better routing protocol than RIP:

• OSPF has no hop count limitations. (RIP has 15 hops only.)

• OSPF understands variable-length subnet masks (VLSMs) and allows for summarization.

• OSPF uses multicasts (not broadcasts) to send updates.

• OSPF converges much faster than RIP, because OSPF propagates changes immediately.

• OSPF allows for load balancing with up to six equal-cost paths.

• OSPF has authentication available. (RIPv2 does also, but RIPv1 does not.)

• OSPF allows for tagging of external routes injected by other autonomous systems.

• OSPF configuration, monitoring, and troubleshooting have a far greater IOS tool base than RIP.

NOTE

OSPF does have some disadvantages, including the level of difficulty and

understanding required to configure, monitor, and troubleshoot it. The other two factors are the memory and Central Processing Unit (CPU) requirements that can affect even high-end router performance. You can configure more than one OSPF process, but you must be mindful that the SPF calculations associated with multiple OSPF processes can consume a considerable amount of CPU and memory.

OSPF and Nonbroadcast Multiaccess Environments

A nonbroadcast multiaccess (NBMA) environment presents the OSPF designer a number of challenges. The main challenge is that NBMA environments do not carry broadcast traffic but have the added characteristics that multiple destinations may be present. In a normal broadcast environment, this is not a challenge because a packet can be sent to a broadcast or multicast address and be received by all recipients.

To overcome these problems, OSPF, and in particular Cisco IOS, allows you to define the networks types and also allows static OSPF neighbor configurations.

Cisco IOS enables you to configure five main network types as displayed in Table 3- 2. These five possible solutions available with Cisco IOS are listed for your reference.

Table 3-2. OSPF over NBMA Using Cisco IOS

Method Description

Point-to-point

nonbroadcast Used typically for Frame Relay interfaces.

Point-to-point This is the default mode for subinterfaces.

Point-to-multipoint Used for multiple destinations.

Nonbroadcast NBMA mode.

Broadcast Used in Ethernet and broadcast environments in which the

election of DR/BDR takes place.

Scenario 3-4 illustrates the behavior of OSPF in an NBMA environment.

Scenarios

The following scenarios are designed to draw together and further explore the content described earlier in this chapter and some of the content you have seen in your own networks or practice labs. There is not always one right way to accomplish the tasks presented, and using good practice and defining your end goal are

important in any real-life design or solution.

Một phần của tài liệu CCNP practical studies routing (Trang 87 - 91)

Tải bản đầy đủ (PDF)

(498 trang)