[Top][Contents][Prev][Next][Last]Search


OSPF Routing


This chapter covers the following topics:
Introduction to OSPF
Configuring the OSPF router
Configuring LAN and WAN interfaces
Configuring OSPF information in static routes

Introduction to OSPF

Open Shortest Path First (OSPF) is the next generation Internet routing protocol. The Open in its name refers to the fact that OSPF was developed in the public domain as an open specification. Shortest Path First refers to an algorithm developed by Dijkstra in 1978 for building a self-rooted shortest-path tree from which routing tables can be derived. (For a description of the algorithm, see The link-state routing algorithm.)

RIP limitations solved by OSPF

The rapid growth of the Internet has pushed Routing Information Protocol (RIP) beyond its capabilities, particularly in the areas of distance-vector metrics, the 15-hop limitation, and slow convergence due to excessive routing traffic.

Distance-vector metrics

RIP is a distance-vector protocol, which uses a hop count to select the shortest route to a destination network. RIP always uses the lowest hop count, regardless of the speed or reliability of a link.

OSPF is a link-state protocol, which means that OSPF can take into account a variety of link conditions, such as the reliability or speed of the link, when determining the best path to a destination network.

15-hop limitation

With RIP, a destination that requires more than 15 consecutive hops is considered unreachable, which inhibits the maximum size of a network. OSPF has no hop limitation-you can add as many routers to a network as you want.

Excessive routing traffic and slow convergence

RIP creates a routing table and then propagates it throughout the internet of routers, hop by hop. The time it takes for all routers to receive information about a topology change is called convergence. A slow convergence can result in routing loops and errors.

A RIP router broadcasts its entire routing table every 30 seconds. On a 15-hop network, convergence can be as high as 7.5 minutes. In addition, a large table can require multiple broadcasts for each update, which consumes a lot of bandwidth. OSPF uses a topological database to represent the network and propagates only changes to the database. (For more information about propagation, see Exchange of routing information.)

Ascend implementation of OSPF

The primary goal of the OSPF implementation in this release is to allow the MAX TNT to communicate with other routers within a single Autonomous System (AS).

The MAX TNT acts as an OSPF internal router with limited border router capability. At this release, Ascend does not recommend an ABR configuration for the MAX TNT, so its LAN and WAN interfaces should all be in the same area.

The MAX TNT does not currently function as an IGP gateway, although it performs ASBR calculations for external routes (such as WAN links that do not support OSPF). The MAX TNT imports external routes into its OSPF database and flags them as Autonomous System External (ASE). It redistributes those routes via OSPF ASE advertisements, and propagates its OSPF routes to remote WAN routers running RIP.

The MAX TNT supports null and simple password authentication.


Note: The Ascend OSPF implementation conforms with RFC 1583 and does not support virtual IP interfaces. A virtual IP interface is one created by the administrator and associated with a physical LAN interface in the MAX TNT. For example, in the following listing the first port on the Ethernet card in slot 15 (shelf-1, slot-15, port 1) has three virtual interfaces:

OSPF can be enabled on any one of the port's IP interfaces, but not on more than one interface for the same port.

OSPF diagnostic commands

The OSPF diagnostic-level commands enable the administrator to display information related to OSPF routing, including the link state advertisements (LSAs), border router information, and the OSPF areas, interfaces, statistics, and routing table. The following command displays the usage statement:

For information about using these commands, see the MAX TNT Reference Guide.

OSPF features

This section provides a brief overview of OSPF routing to help you configure the MAX TNT properly. For full details about how OSPF works, see RFC 1583, OSPF Version 2, 03/23/1994, J. Moy.

An Autonomous System (AS) is a group of OSPF routers exchanging information, typically under the control of one company. An AS can include a large number of networks, all of which are assigned the same AS number. All information exchanged within the AS is interior.

Exterior protocols are used to exchange routing information between Autonomous Systems. They are referred to by the acronym EGP (exterior gateway protocol). The AS number may be used by border routers to Filter out certain EGP routing information. OSPF can make use of EGP data generated by other border routers and added into the OSPF system as ASE information, as well as static routes configured locally or in RADIUS.

Security

All OSPF protocol exchanges are authenticated. This means that only trusted routers can participate in the AS's routing. A variety of authentication schemes can be used. In fact, different authentication types can be configured for each area. (For a discussion of areas, see Hierarchical routing (areas).) In addition, authentication provides added security for the routers that are on the network. Routers that do not have the password will not be able to gain access to the routing information, because authentication failure prevents a router from forming adjacencies. (For a discussion of adjacencies, see Exchange of routing information.)

Support for variable length subnet masks

OSPF enables the flexible configuration of IP subnets. Each route distributed by OSPF has a destination and mask. Two different subnets of the same IP network number may have different sizes (different masks). This is commonly referred to as variable-length subnet masks (VLSM), or Classless Inter-Domain Routing (CIDR). A packet is routed to the best (longest or most specific) match. Host routes are considered to be subnets whose masks are all ones (0xFFFFFFFF).


Note: Although OSPF is very useful for networks that use VLSM, Ascend recommends that you attempt to assign subnets that are as contiguous as possible in order to prevent excessive link-state calculations by all OSPF routers on the network.

Interior gateway protocol (IGP)

OSPF keeps all AS-internal routing information within the AS. All information exchanged within the AS is interior.

An AS boundary router (ASBR) is required for communication with other Autonomous Systems. ASBRs use an exterior gateway protocol (EGP), as shown in Figure 5-1. An EGP acts as a shuttle service between Autonomous Systems.

Figure 5-1. OSPF Autonomous System Boundary Routers (ASBRs)

ASBRs perform calculations related to external routes. The MAX TNT imports external routes from RIP (for example, when it establishes a WAN link with a caller that does not support OSPF) and performs the ASBR calculations.

Exchange of routing information

OSPF stores its information about the network in a topological database and propagates only changes to the database. Adjacency is a relationship formed between selected neighboring routers for the purpose of exchanging routing information. Not every pair of neighboring routers become adjacent. Routers connected by point-to-point networks and virtual links always become adjacent. On multi-access networks, all routers become adjacent to both the Designated Router and the Backup Designated Router.

As the adjacency is established, the neighbors exchange databases and build a consistent, synchronized database between them. When an OSPF router detects a change on one of its interfaces, it modifies its topological database and multicasts the change to its adjacent neighbors, which in turn propagate the change to their adjacent neighbors, until all routers within an area have synchronized topological databases. This results in quick convergence among routers. OSPF routes can also be summarized in Link-State Advertisements (LSAs).

Designated and Backup Designated Routers

In OSPF terminology, a broadcast network is any network that has more than two OSPF routers attached and supports the capability to address a single physical message to all of the attached routers.

Figure 5-2. OSPF Designated Router (DR) and Backup Designated Router (BDR)


Note: The MAX TNT can function as a Designated Router (DR) or Backup Designated Router (BDR). The administrator chooses a DR and BDR on the basis of the devices' processing power and reliability. However, many sites choose to assign a LAN-based router for these roles in order to dedicate the MAX TNT to WAN processing.

To reduce the number of adjacencies each router must form, OSPF calls one of the routers the Designated Router. A Designated Router is elected as routers are forming adjacencies, and then all other routers establish adjacencies only with the Designated Router. This simplifies the routing table update procedure and reduces the number of link-state records in the database. The Designated Router plays other important roles as well to reduce the overhead of a OSPF link-state procedures. For example, other routers send LSAs to only the Designated Router by using the All-Designated-Routers multicast address of 224.0.0.6.

To prevent the Designated Router from becoming a serious liability to the network if it fails, OSPF also elects a Backup Designated Router at the same time. Other routers maintain adjacencies with both the Designated Router and its backup router, but the backup router leaves as many of the processing tasks as possible to the Designated Router. If the Designated Router fails, the backup immediately becomes the Designated Router and a new backup is elected.

The administrator chooses the Designated Router on the basis of the processing power, speed, and memory of the system, then assigns priorities to other routers on the network in case the Backup Designated Router is also down at the same time.

Configurable cost metrics

The administrator assigns a cost to the output side of each router interface. The lower the cost, the more likely the interface is to be used to forward data traffic. Costs can also be associated with the externally derived routing data.

The OSPF cost can also be used for preferred-path selection. If two paths to a destination have equal costs, you can assign a higher cost to one of the paths to configure it as a backup to be used only when the primary path is not available.

Figure 5-3 shows how costs are used to direct traffic over high-speed links. For example, if Router-2 in Figure 5-3 receives packets destined for Host B, it routes them through Router-1 across two T1 links (Cost=20) rather than across one 56kbps B-channel to Router-3 (Cost=240).

Figure 5-3. OSPF costs for different types of links

The MAX TNT has a default cost of 1 for a connected route (Ethernet) and 10 for a WAN link. If you have two paths to the same destination, the one with the lower cost will be used unless route preferences change the equation. (For information about route preferences, see Chapter 4, IP Routing.) When assigning costs, you should account for the bandwidth of a connection. For example, for a single B-channel connection, the cost would be 24 times greater than a T1 link.


Note: Be careful when assigning costs. Incorrect cost metrics can cause delays and congestion on the network.

Hierarchical routing (areas)

If a network is large, the size of the database, time required for route computation, and related network traffic become excessive. An administrator can partition an AS into areas to provide hierarchical routing, with a backbone area connecting the other areas. The backbone area is special and always has the area number 0.0.0.0. Other areas are assigned area numbers that are unique within the AS.

Each area acts as its own network: all area-specific routing information stays within the area, and all routers within an area must have a synchronized topological database. To tie the areas together, some routers belong to backbone area and to one of the other areas. These routers are Area Border Routers (ABRs). In Figure 5-4, all of the routers are ABRs:

Figure 5-4. Dividing an OSPF Autonomous System (AS) into areas


Note: The MAX TNT does not currently operate as an ABR, so you must use the same area number for each OSPF interface. That area number does not have to be the default backbone area (0.0.0.0).

With the ABRs and area boundaries set up correctly, link-state databases are unique to an area. You can configure the MAX TNT to route in three kinds of area, which differ in their handling of external routes.

Normal areas
AS external routes are originated by ASBRs as Type-5 link state advertisements (LSAs). An OSPF normal area allows Type-5 LSAs to be flooded throughout the area.

Stub areas
For areas that are connected only to the backbone by one ABR (that is, the area has one exit point), there is no need to maintain information about external routes. To reduce the cost of routing, OSPF supports stub areas, in which a default route summarizes all external routes. A stub area allows no Type-5 LSAs to be propagated into or throughout the area, and instead depends on default routing to external destinations.

Because the MAX TNT does not currently operate as an ABR, you should not configure it to route OSPF in a stub area if any of its links are AS-external.

NSSAs
NSSAs are like stub areas in that they do not receive or originate Type-5 LSAs. They differ from stub areas in that they can import AS external routes in a limited fashion.

For NSSAs, all routes imported to OSPF must have the P-bit set (P stands for propagate). When the MAX TNT is configured to route OSPF in an NSSA, all external routes that are imported to OSPF have the P-bit (P stands for propagate) enabled in their respective link-state entry. These external routes are considered Type-7 ASE LSAs. When the P-bit is enabled, Area Border Routers translate Type-7 LSAs to Type-5 LSAs, which can then be flooded to the backbone.

The external routes imported to OSPF may be routes defined in local Connection profiles or RADIUS profiles, or static routes defined in IP-Route profiles.


Note: Please see RFC 1587 for detailed information regarding the NSSA specification.

The link-state routing algorithm

Link-state routing algorithms require that all routers within a domain maintain synchronized (identical) topological databases, and that the databases describe the complete topology of the domain. An OSPF router's domain may be an AS or an area within an AS.

Based on the exchange of information among routers, OSPF routers create a link-state database, which is updated on the basis of packet exchanges among the routers. Link-state databases are synchronized between pairs of adjacent routers (as described in Exchange of routing information). In addition, each OSPF router uses its link-state database to calculate a self-rooted tree of shortest paths to all destinations. The routing table is built from these calculated shortest-path trees.

For example, for the network topology in Figure 5-5:

Figure 5-5. Sample OSPF topology

Table 5-1 shows the relevant information in the routers' link-state databases:

Table 5-1. Link state databases for OSPF topology in Figure 5-5

Router-1

Router-2

Router-3

Network-1/Cost 0

Network-2/Cost0

Network-3/Cost 0

Network-2/Cost 0

Network-3/Cost0

Network-4/Cost 0

Router-2/Cost 20

Router-1/Cost 20

Router-2/Cost 30

Router-3/Cost 30

From the link-state database, each router builds a self-rooted shortest-path tree, and then calculates a routing table stating the shortest path to each destination in the AS. (The table also includes externally derived routing information.)

All of the routers calculate a routing table of shortest paths, based on the link-state database. Externally derived routing data is advertised throughout the AS but is kept separate from the link-state data. Each external route can also be tagged by the advertising router, enabling the passing of additional information between routers on the boundary of the AS.

Table 5-2. Shortest-path tree and resulting routing table for Router-1

Destination

Next Hop

Metric

Network-1

Direct

0

Network-2

Direct

0

Network-3

Router-2

20

Network-4

Router-2

50

Table 5-3. Shortest-path tree and resulting routing table for Router-2

Destination

Next Hop

Metric

Network-1

Router-1

20

Network-2

Direct

0

Network-3

Direct

0

Network-4

Router-2

30

Table 5-4. Shortest-path tree and resulting routing table for Router-3

Destination

Next Hop

Metric

Network-1

Router-2

50

Network-2

Router-2

30

Network-3

Direct

0

Network-4

Direct

0

Configuring the OSPF router

This section describes how to configure the MAX TNT OSPF router in the IP-Global profile. It covers the following topics:

OSPF ASE preferences and handling

For detailed information about each parameter, see the MAX TNT Reference Guide.

OSPF global option for disabling ASBR calculations

Autonomous System Boundary Routers (ASBRs) perform calculations related to external routes. Normally, when the MAX TNT imports external routes from RIP (for example, when it establishes a WAN link with a caller that does not support OSPF) it performs the ASBR calculations for those routes. Now, you can prevent the MAX TNT from performing ASBR calculations by setting the following parameter, which is shown with its default value:

If you set the AS-Boundary-Router parameter to No, the MAX TNT does not perform ASBR calculations.

Configuring LAN and WAN interfaces

This section describes how to add the MAX TNT to an OSPF network. It shows a local OSPF interface in a normal area, and one that routes OSPF across a WAN link. This section assumes that the MAX TNT is configured for IP, as described in Chapter 4, IP Routing.

Following are the related parameters, shown with their default values:

The same parameters appear in the OSPF subprofiles of the IP-Interface and Connection profiles. For detailed information about each parameter, see the MAX TNT Reference Guide.

Parameter

Effect

Active

Enables or disables OSPF on an interface.

Area

Specifies an area number in dotted-decimal format. The default area number is 0.0.0.0, which represents the OSPF backbone. Note that area numbers are not IP addresses, although they use a similar format. See Hierarchical routing (areas).


Note: Because the MAX TNT does not currently operate as an area border router (ABR), all of its interfaces must be in the same area.

Area-Type

Specifies the type of area. The default is the Normal area type, in which external routes are advertised throughout the AS. See Hierarchical routing (areas).


Note: Because the MAX TNT does not currently operate as an area border router (ABR), all of its interfaces must specify the same area.

Hello-Interval

Specifies the number of seconds between Hello packets. For information about how the router uses these packets, see Exchange of routing information.

Dead-Interval

Specifies the number of elapsed seconds without receiving a Hello packet the router will wait before considering its neighbor dead and instituting a link-state change. See Exchange of routing information.

Priority

Specifies a value used to elect a DR and BDR. For example, assigning a priority of 1 or greater would place the MAX TNT in the list of possible DRs. A priority value of 0 excludes the MAX TNT from becoming a DR/BDR. The higher the priority value of the MAX TNT relative to other OSPF routers on the network, the better the chances that it will become a BDR/DR. See Designated and Backup Designated Routers.

Authen-Type

Specifies whether authentication is required for access to the router's area. If set to None, no authentication is required. If set to Simple (the default), the Auth-Key must be specified. See Security.

Auth-Key

Specifies a key that will be required for packets to access the router's area when Authen-Type is set to Simple. See Security.

Cost

Specifies the cost of routing to the interface. The lower the cost assigned to a route, the more likely that it will be used to forward traffic. See Configurable cost metrics.

Down-Cost

The Down-Cost specifies a cost to be applied to the interface when it is down. See Configurable cost metrics.

Ase-Type

Specifies the type of metric to apply to routes learned from RIP. Type-1 expresses the metric in the same units as the interface cost. Type-2 is considered larger than any link-state path. This applies in a Connection profile only when OSPF is not active.

Ase-Tag

Specifies a hexadecimal number that shows up in management utilities and flags this route as external. It can also be used by border routers to filter this record. It is active in a Connection profile only when OSPF is not active.

Transit-Delay

Specifies the estimated number of seconds it takes to transmit a Link State Update Packet over this interface, taking into account transmission and propagation delays. On a connected route, you can leave the default 1.

Retransmit-Interval

Specifies the number of seconds between Link-State Advertisement retransmissions for adjacencies belonging to this interface. Its value is also used when retransmitting database description and link-state request packets. On a connected route, you should typically leave the default 5.

Example of a LAN OSPF interface

Figure 5-6 shows five OSPF routers in the backbone area of an AS. Because all OSPF routers are in the same area, the units form adjacencies and synchronize their databases. This example shows how to configure the LAN interface of the unit labeled MAX-TNT-2 in Figure 5-6.

Figure 5-6. OSPF on a LAN interface


Note: All OSPF routers in Figure 5-6 have RIP turned off. It isn't necessary to run both RIP and OSPF, and turning RIP off reduces processor overhead. OSPF can learn routes from RIP, incorporate them in the routing table, assign them an external metric, and tag them as external routes.

Although there is no limitation stated in the RFC about the number of routers in the backbone area, you should keep the number of routers relatively small, because changes that occur in area zero are propagated throughout the AS. Another way to configure the same units would be to create a second area (such as 0.0.0.1) in one of the existing OSPF routers, and add the MAX TNT to that area. You can then assign the same area number (0.0.0.1) to all OSPF routers reached through the MAX TNT across a WAN link.

Following is an example that shows how to configure MAX-TNT-2 in Figure 5-6. The first set of commands configures the unit as an IP host on Ethernet, with the IP address 10.168.8.17/24 on that interface. (For detailed information about IP configurations, see Chapter 4, IP Routing.)

The next set of commands configures the unit as an OSPF router in the backbone area:


Note: When you write the IP-Interface profile, the MAX TNT comes up as an OSPF router on that interface. It immediately begins forming adjacencies and building its routing table.

Example of WAN OSPF interfaces

This example shows how to configure Connection profiles in the MAX TNT units shown in Figure 5-7, to enable them to route OSPF across the WAN that separates them. In this example, the unit labeled MAX-TNT-2 has the IP address 10.2.3.4/24, and the unit labeled MAX-TNT-1 has the address 10.168.8.17/24.

Figure 5-7. OSPF on a WAN interface

The WAN interface of the MAX TNT is a point-to-point network; that is, it joins a single pair of routers. Point-to-point networks typically do not provide a broadcasting or multicasting service, so all advertisements are sent point to point.

Following is an example that configures the OSPF WAN link in the unit labeled MAX-TNT-1 in Figure 5-7:

Following is an example that configures the OSPF WAN link in the unit labeled MAX-TNT-2 in Figure 5-7:

Example of integrating a RIP-v2 interface

In Figure 5-8, each MAX TNT has a WAN interface to a remote Pipeline unit. The Pipeline is an IP router that supports RIP-v2, and has the IP address 10.6.7.168/24. The route to the Pipeline LAN, as well as any routes the MAX TNT learns about from the remote Pipeline, are AS-external routes (external to the OSPF Autonomous System).

Figure 5-8. Including ASE routes in the OSPF environment

To enable OSPF to add the RIP-v2 routes to its routing table dynamically, you can configure RIP-v2 normally in the Connection profiles. OSPF will import all RIP routes as Type-2 ASEs. However, in this example, RIP is turned off on the link and ASE information is configured explicitly.

The following example shows how to configure a link to the Pipeline. The first set of commands turns off RIP routing and sets a cost of 240 for the route to the remote Pipeline. (Typically, you should account for the bandwidth of a connection when assigning costs. For example, for a single B-channel connection, the cost would be 24 times greater than for a T1 link.)

The next set of commands causes the MAX TNT to tag routes learned from RIP and to import them as Type-2 LSAs:

Example of an NSSA with a Type-7 LSA

For background information about NSSAs, see Hierarchical routing (areas). To configure the MAX TNT to route OSPF in an NSSA, you must assign all interfaces an Area-Type of NSSA. The MAX TNT does not operate as an ABR, so the Area-Type as well as the area number must be the same on all interfaces running OSPF.


Note: When the OSPF Area-Type changes from Normal to NSSA or vice versa, a system reset is required to recognize the change.

To configure a Type-7 LSA in the MAX TNT, you must specify a static route in an IP-Route profile. Following are the related parameters, shown with sample settings:


Note: In previous releases, the ASE7-Adv parameter in IP-Route profiles provided a way to disable the P-bit for static routes imported to OSPF in an NSSA, to prevent those routes from being propagated to the backbone. This is no longer the case. The P-bit is now always enabled for ASE routes, so the MAX TNT disregards the setting of this parameter.

The following example shows how to configures the MAX TNT to route in an NSSA and import a Type-7 LSA that specifies an external route across the WAN link.

  1. Assign an NSSA area type to each IP interface that is running OSPF. For example:

  2. Reset the system.

  3. Configure the WAN link that represents an AS-external route. For example:

  4. Configure a static route to the remote site. For example:

Importing summarized routes to OSPF

For information about defining network summarized address pools, see Configuring address pools for dynamic assignment to dial-in hosts of Chapter 4, IP Routing. You can set the following parameter, which is shown with its default value, to specify how to import the summarized routes to OSPF:

When Pool-Summary is set to Yes and OSPF is enabled, OSPF looks at the Pool-OSPF-Adv-Type parameter to decide how to import pool addresses into OSPF. You can set the parameter to one of the following values:


Note: If you change the value of this parameter, you must reset the MAX TNT for the change to take effect.

Configuring OSPF information in static routes

When the MAX TNT starts up, it builds the initial routing table by using its known static routes, which include those defined in IP-Interface profiles, Connection profiles, and IP-Route profiles. In addition, whenever a route changes, the MAX TNT reads the static routes defined in IP-Route profiles. The following IP-Route parameters (shown with sample settings) apply only when OSPF is enabled:

For information about the ASE-Type and ASE-Tag parameters, see Specifies the type of metric to apply to routes learned from RIP. Type-1 expresses the metric in the same units as the interface cost. Type-2 is considered larger than any link-state path. This applies in a Connection profile only when OSPF is not active..

Assigning a cost to a static route

The lower the cost assigned to a route, the more likely that the route will be used to forward traffic. Typically, you should account for the bandwidth of a connection when assigning costs. For example, the cost for a single-channel connection would be 24 times greater than for a T1 link.

The MAX TNT has a default cost of 1 for a connected route (Ethernet) and 10 for a WAN link. If you have two paths to the same destination, the one with the lower cost is used. Be careful when assigning costs. Incorrect cost metrics can cause delays and congestion on the network. In the following example, the administrator assigns a cost of 25 to a static route:

Specifying a third-party route

OSPF can advertise routes to external destinations on behalf of another gateway (a third party). This is commonly known as advertising a forwarding address. If third-party routing is disabled, the MAX TNT advertises itself as the forwarding address to an external destination. When third-party routing is enabled, it advertises the IP address of another gateway.

Depending on the topology of the network, it might be possible for other routers to use this type of third-party LSA to route directly to the forwarding address without involving the advertising router, thus increasing the total network throughput. This feature can be used only if all OSPF routers know how to route to the forwarding address. This usually means that the forwarding address is on a local network that has an OSPF router acting as the forwarding router, or that Designated Router is sending LSAs for that Ethernet to any area that sees the static route's forwarding address LSAs. Note that third-party routing cannot be used when ASE Type-7s are advertised (as specified in RFC 1587).

In the following sample route, the MAX TNT will advertise a third-party route (a forwarding address) for the destination 10.1.2.0. The forwarding address is 10.9.8.10.



[Top][Contents][Prev][Next][Last]Search

techpubs@eng.ascend.com

Copyright © 1998, Ascend Communications, Inc. All rights reserved.