Configuring OSPF Routing
This chapter covers these topics:
Introduction to OSPF
OSPF (Open Shortest Path First) 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. The 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. This algorithm is described in The link-state routing algorithm.
Note: If you have a MAX running Multiband Simulation, ospf is disabled.
RIP limitations solved by OSPF
The rapid growth of the Internet has pushed RIP (Routing Information Protocol) beyond its capabilities, especially because of the following problems:
Problem
|
Description and solution
|
---|
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.
Note: You can configure the DownMetric and DownPreference parameters to assign different metrics or preferences to routes on the basis of whether the route is in use or is down. You might want to direct the MAX to use active routes, if available, rather than choose routes that are down.
|
15-hop limitation
|
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 of the network and propagates only changes to the database (as described in Exchange of routing information).
|
Ascend implementation of OSPF
The primary goal of OSPF at this release is to allow the MAX to communicate with other routers within a single autonomous system (AS).
The MAX acts as an OSPF internal router with limited border router capability. At this release, we do not recommend an area border router (ABR) configuration for the MAX, so the Ethernet interface and all of the MAX WAN links should be configured in the same area.
The MAX does not function as a full AS border router (ASBR) at this release. However, ASBR calculations are performed for external routes such as WAN links that do not support OSPF. The MAX imports external routes into its OSPF database and flags them as ASE (autonomous system external). It redistributes those routes via OSPF ASE advertisements, and propagates its OSPF routes to remote WAN routers running RIP.
The MAX supports null and simple password authentication.
OSPF features
This section provides a brief overview of OSPF routing to help you configure the MAX properly. For full details about how OSPF works, see RFC 1583, "OSPF Version 2", 03/23/1994, J. Moy.
An AS (autonomous system) 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 ASEs, as well as static routes configured in the MAX or 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. 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.
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, we recommend 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 that AS. All information exchanged within the AS is interior.
An AS border router (ASBR) is required to communicate with other autonomous systems by using an external gateway protocol (EGP), as shown in Figure 11-1. An EGP acts as a shuttle service between autonomous systems.
Figure 11-1. Autonomous system border routers
ASBRs perform calculations related to external routes. The MAX imports external routes from RIP-for example, when it establishes a WAN link with a caller that does not support OSPF-and the ASBR calculations are always performed.
If you must prevent the MAX from performing ASBR calculations, you can disable them in Ethernet > Mod Config > OSPF Global Options.
Exchange of routing information
OSPF uses a topological database of the network and propagates only changes to the database. Part of the SPF algorithm involves acquiring neighbors, and then forming an adjacency with one neighbor, as shown in Figure 11-2.
Figure 11-2. Adjacency between neighboring routers
An OSPF router dynamically detects its neighboring routers by sending its Hello packets to the multicast address All SPFRouters. It attempts to form adjacencies with some of its newly acquired neighbors.
Adjacency is a relationship formed between selected neighboring routers for the purpose of exchanging routing information. Not every pair of neighboring routers become adjacent. Adjacencies are established during network initialization in pairs, between two neighbors. 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 neighbor, which in turn propagates the change to its adjacent neighbor 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 11-3. Designated and backup designated routers
The MAX can function as a designated router (DR) or backup designated router (BDR). However, many sites choose to assign a LAN-based router for these roles in order to dedicate the MAX to WAN processing. The administrator chooses a DR and BDR based on the device's processing power and reliability.
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 link-state advertisements it to the designated router only 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 which router is to be the designated router based on the processing power, speed, and memory of the system, and then assigns priorities to other routers on the network in case the backup designated router is also down at the same time.
Configurable 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 11-4 shows how costs are used to direct traffic over high-speed links. For example, if Router-2 in Figure 11-4 receives packets destined for Host B, it will route them through Router-1 across two T1 links (Cost=20) rather than across one 56kbps B-channel to Router-3 (Cost=240).
Figure 11-4. OSPF costs for different types of links
The MAX 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. You may want to reflect the bandwidth of a connection when assigning costs; 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 connected by a backbone.
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 autonomous system.
Each areas acts like 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 an area and to the backbone area. These routers are area border routers (ABRs). In Figure 11-5, all of the routers are ABRs.If the ABRs and area boundaries are set up correctly, link-state databases are unique to an area.
Figure 11-5. Dividing an AS into areas
Note: At this release, we recommend that you do not configure the MAX as an ABR. We
currently recommend that you use the same area number for the Ethernet interface of the MAX
and each of its WAN links. That are number does not have to be the backbone; the MAX can
reside in any OSPF area.
Stub areas
To reduce the cost of routing, OSPF supports stub areas, in which a default route summarizes all external routes. For areas that are connected to the backbone by only one ABR (that is, the area has one exit point), there is no need to maintain information about external routes. Stub areas are similar to regular areas except that the routers do not enter external routes in the area's databases.
To prevent flooding of external routes throughout the AS, you can configure an area as a stub when there is a single exit point from the area, or when the choice of exit point need not be made on a per-external-destination basis. You might need to specify a stub area with no default cost (StubNoDefault) if the area has more than one exit point.
In a stub area, routing to AS-external destinations is based on a per-area default cost. The per-area default cost is advertised to all routers within the stub area by a border router, and is used for all external destinations.
If the MAX supports external routes across its WAN links, you should not configure it in a stub area. Because an ABR configuration is not currently recommended for the MAX, the area in which it resides should not be a stub area if any of its links are AS-external.
Not So Stubby Areas (NSSAs)
The MAX supports OSPF Not So Stubby Areas (NSSAs) as described in RRC 1587. NSSAs allow you to treat complex networks similar to stub areas. This can simplify your networks topology and reduce OSPF-related traffic.
NSSAs and type-7 LSAs
NSSAs are similar to stub areas, except that they allow limited importing of Autonomous System (AS) external routes. NSSAs use type-7 LSAs to import external route information into an NSSA. Type-7 LSAs are similar to type-5 LSAs except that:
- NSSAs can originate and import type-7 LSAs; like stub areas, NSSAs cannot originate or import type-5 LSAs.
- Type-7 LSAs can only be advertised within a single NSSA; they are not flooded throughout the AS as are type-5 LSAs.
When you configure the MAX as an NSSA internal router, you define the type-7 LSAs you want to advertise throughout the NSSA as static routes.
You must also specify whether these type-7 LSAs should be advertised outside the NSSA. If you choose to advertise a type-7 LSA, the NSSA Area Border Router (ABR) converts it to a type-5 LSA, which can then be flooded throughout the AS. If you choose not to advertise a type-7 LSA, it is not advertised beyond the NSSA.
Refer to RFC 1587 for complete information on NSSAs.
Configuring the MAX as an NSSA internal router
Because the MAX cannot be an area border router, when you configure OSPF on the MAX keep in mind that:
- The Area-Type must be the same on all MAX interfaces running OSPF.
- The Area ID (configured in the Area parameter) must be the same on all MAX interfaces running OSPF.
Refer to the documentation that came with your MAX for complete information on configuring OSPF on the MAX.
To configure the MAX as NSSA:
- Select Ethernet > Mod Config > OSPF options.
- Set AreaType to NSSA.
- Exit and save the Mod Config profile.
- Select Ethernet > Static Rtes > any Static Route profile.
- Configure a static route to the destination outside the NSSA.
- Refer to the documentation that came with your MAX.
- In this static route profile, specify whether you want to advertise this route outside the
NSSA:
- To advertise this route outside the NSSA, set NSSA-Type to Advertise.
- To not advertise this route outside the NSSA, set NSSA-Type to DoNotAdvertise.
- Exit and save the Static Rtes profile.
- Reset the MAX.
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.
OSPF routers exchange routing information and build Link-state databases. 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, as shown in Figure 11-6.
Figure 11-6. Sample network topology
The routers then use the trees to build their routing tables, as shown in Table 11-1.
Table 11-2, Table 11-3, and Table 11-4 show another example of self-rooted shortest-path trees calculated from link-state databases, and the resulting routing tables. Actual routing tables also contain externally derived routing data, which is advertised throughout the AS but kept separate from the Link-state data. Also, each external route can be tagged by the advertising router, enabling the passing of additional information between routers on the boundary of the AS.
Configuring OSPF routing in the MAX
These are the parameters related to OSPF routing in the MAX:
Ethernet
Mod Config
OSPF options...
RunOSPF=Yes
Area=0.0.0.0
AreaType=Normal
HelloInterval=10
DeadInterval=40
Priority=5
AuthType=Simple
AuthKey=ascend0
Cost=1
LSA-type=N/A
ASE-tag=N/A
TransitDelay=1
RetransmitInterval=5
OSPF global options...
Enable ASBR=Yes
Ethernet
Connections
OSPF options
RunOSPF=Yes
Area=0.0.0.0
AreaType=Normal
HelloInterval=40
DeadInterval=120
Priority=5
AuthType=Simple
AuthKey=ascend0
Cost=10
LSA-type=N/A
ASE-tag=N/A
TransitDelay=5
RetransmitInterval=20
For more information on each parameter, see the MAX Reference Guide.
Understanding the OSPF routing parameters
This section provides some background information about the OSPF parameters. Notice that the same configuration parameters appear in Ethernet > Mod Config > OSPF Options and Ethernet > Connections > OSPF Options. The parameters are the same, but some of the default values are different. For OSPF routing, you configure the following settings:
Setting
|
Description
|
---|
Enabling OSPF on an interface
|
OSPF is turned off by default. To enable it on an interface, set RunOSPF to Yes.
|
Specifying an area number and type
|
Area sets the area ID for the interface. The format for this ID is dotted decimal, but it is not an IP address. (For a description of areas, see Hierarchical routing (areas).)
AreaType specifies the type of area: Normal, Stub, or StubNoDefault. (For descriptions, see Stub areas.)
|
Intervals for communicating with an adjacent router
|
HelloInterval specifies how frequently, in seconds, the MAX sends out Hello packets on the specified interface. OSPF routers use Hello packets to dynamically detect neighboring routers in order to form adjacencies.
DeadInterval specifies how many seconds the MAX waits before declaring its neighboring routers down after it stops receiving their Hello packets
(For background information, see Exchange of routing information.)
|
Priority
|
The routers in the network use the Priority value to elect a Designated Router (DR) and Backup Designated Router (BDR). Assigning a priority of 1 would place the MAX near the top of the list of possible designated routers. (Currently, you should assign a larger number.) Acting as a DR or BDR significantly increases the amount of OSPF overhead for the router. (For a discussion of the functions of DRs and BDRs, see Designated and backup designated routers.)
|
Authentication type and key
|
You can specify that the MAX supports OSPF router authentication, and the key it looks for in packets to support that authentication. See Security.
|
Cost of the route on this interface
|
This parameter specifies the link-state or output cost of a route. Assign realistic costs for each interface that supports OSPF. The lower the cost, the higher the likelihood of using that route to forward traffic. See Configurable metrics.
|
Autonomous System External route (ASE) type and tag
|
ASEs are used only when OSPF is turned off on a particular interface. When OSPF is enabled, the ASE parameters are not applicable. ASE-type specifies he type of metric that the MAX advertises for external routes. A Type 1 external metric is expressed in the same units as the link-state metric (the same units as interface cost). A Type 2 external metric is considered larger than any link state path. Use of Type 2 external metrics assumes that routing between autonomous systems is the major cost of routing a packet, and eliminates the need for conversion of external costs to internal link-state metrics. ASE-tag is a hexadecimal number used to tag external routes for filtering by other routers.
|
LSA Type
|
LSAType is used only when OSPF is turned off on a particular interface. When OSPF is enabled, the LSA type is not applicable.
LSA type specifies the type of metric that the MAX advertises for external routes. A Type 1 external metric is expressed in the same units as the link-state metric (the same units as interface cost). A Type 2 external metric is considered larger than any link state path. Use of Type 2 external metrics assumes that routing between autonomous systems is the major cost of routing a packet, and eliminates the need for conversion of external costs to internal link-state metrics. You can also select Internal, which indicates that the static route be advertised in an internal LSA.
|
Transit delay
|
Specify 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 of 1.
|
Retransmit interval
|
Specify the number of seconds between retransmissions of Link-State Advertisements, Database Description, and Link State Request Packets.
|
OSPF global option for disabling ASBR calculations
|
Autonomous ASBRs (autonomous system border routers) perform calculations related to external routes. The MAX imports external routes from RIP-for example, when it establishes a WAN link with a caller that does not support OSPF-and the ASBR calculations are always performed. If you must prevent the MAX from performing ASBR calculations, you can disable them in Ethernet > Mod Config > OSPF Global Options.
|
Example configurations adding the MAX to an OSPF network
This section describes how to add a MAX to your OSPF network. It assumes that you know how to configure the MAX with an appropriate IP address as described in Chapter 10, Configuring IP Routing. The procedures in this section are examples based on Figure 11-7. Configuring the unit labeled MAX-1 in Figure 11-7. To apply one or more of the procedures to your network, enter the appropriate settings instead of the ones shown.
Figure 11-7. An example OSPF setup
In Figure 11-7, all OSPF routers are in the same area (the backbone area), so the units will all form adjacencies and synchronize their databases together.
Note: All OSPF routers in Figure 11-7 have RIP turned off. OSPF can learn routes from RIP
without the added overhead of running RIP.
Configuring OSPF on the Ethernet interface
The MAX Ethernet interface in the example network diagram is in the OSPF backbone area. Although there is no limitation stated in the RFC about the number of routers in the backbone area, it is recommended that you 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 to that area. You can then assign the same area number (0.0.0.1) to all OSPF routers reached through the MAX across a WAN link.
After you configure the MAX as an IP host on that interface, you can configure it as an OSPF router in the backbone area in the Ethernet profile. To configure the MAX as an OSPF router on Ethernet:
- Open Ethernet > Mod Config > Ether Options, and make sure the MAX is configured as
an IP host. For example:
Ethernet
Mod Config
Ether options...
IP Adrs=10.168.8.17/24
2nd Adrs=0.0.0.0
RIP=Off
Ignore Def Rt=Yes
Proxy Mode=Always
Filter=0
IPX Frame=N/A
Note that RIP is turned off. It is not necessary to run both RIP and OSPF, and it reduces processor overhead to turn RIP off. OSPF can learn routes from RIP, incorporate them in the routing table, assign them an external metric, and tag them as external routes. See Chapter 10, Configuring IP Routing.
- Open Ethernet > Mod Config > OSPF Options and turn on RunOSPF.
OSPF options...
RunOSPF=Yes
- Specify the area number and area type for the Ethernet.
Area=0.0.0.0
AreaType=Normal
In this case, the Ethernet is in the backbone area. (The backbone area number is always 0.0.0.0.) The backbone area is not a stub area, so leave the setting at its default. See Stub areas for background information.
- Leave the Hello interval, Dead interval, and Priority values set to their defaults.
HelloInterval=10
DeadInterval=40
Priority=5
- If authentication is required to get into the backbone area, specify the password.
For example:
AuthType=Simple
AuthKey=ascend0
If authentication is not required, set AuthType=None.
- Configure the cost for the MAX to route into the backbone area. For example:
Cost=1
Then type a number greater than zero and less than 16777215. By default the cost of a Ethernet connected route is 1.
- Set the expected transit delay for Link State Update packets. For example:
TransitDelay=1
- Specify the retransmit interval for OSPF packets.
RetransmitInterval=5
This specifies the number of seconds between retransmissions of Link-State Advertisements, Database Description and Link State Request Packets.
- Close the Ethernet profile.
When you close the Ethernet profile, the MAX comes up as an OSPF router on that interface. It forms adjacencies and begins building its routing table.
Configuring OSPF across the WAN
The WAN interface of the MAX is a point-to-point network. A point-to-point network is any network that joins a single pair of routers. These networks typically do not provide a broadcasting or multicasting service, so all advertisements are sent point to point.
An OSPF WAN link has a default cost of 10. You can assign higher costs to reflect a slower connection or lower costs to set up a preferred route to a certain destination. If the cost of one route is lower than another to the same destination, the higher-cost route will not be used unless route preferences change that equation (see Route preferences).
OSPF on the WAN link is configured in a Connection profile. In this example, the MAX is connecting to another MAX unit across a T1 link (see Figure 11-7 on page 11-13). To configure this interface:
- Open the Connection profile for the remote MAX unit.
- Turn on Route IP and configure the IP routing connection. For example:
Ethernet
Connections
IP options
LAN Adrs=10.2.3.4/24
WAN Alias=0.0.0.0
IF Adrs=0.0.0.0
Metric=7
Preference=N/A
Private=No
RIP=Off
Pool=0
See Chapter 10, Configuring IP Routing.
- Open Connections > OSPF Options and turn on RunOSPF.
OSPF options
RunOSPF=Yes
- Specify the area number for the remote device and the area type.
The area number must always be specified in dotted-quad format similar to an IP address. For example:
Area=0.0.0.0
AreaType=Normal
At this release, we recommend that you use the same area number for the Ethernet interface of the MAX and each of its WAN links. In this example, the Ethernet interface is in the backbone area (0.0.0.0). You can use any area numbering scheme that is consistent throughout the AS and uses this format.
- Leave the Hello interval, Dead interval, and Priority values set to their defaults.
HelloInterval=40
DeadInterval=120
Priority=5
The Priority value is used to configure the MAX as a DR or BDR.
- If authentication is required to get into the backbone area, specify the password.
For example:
AuthType=Simple
AuthKey=ascend0
If authentication is not required, set AuthType=None.
- Configure the cost for the route to MAX-2.
For example, for a T1 link the cost should be at least 10.
Cost=10
- Close the Connection profile.
Note: Of course, the remote MAX unit must also have a comparable Connection profile to
connect to MAX-1.
Configuring a WAN link that does not support OSPF
In this example, the MAX has a Connection profile to a remote Pipeline unit across a BRI link (see Figure 11-7 on page 11-13). The remote Pipeline is an IP router that transmits routes using RIP-v2. The route to this network, as well as any routes the MAX learns about from the remote Pipeline, are ASEs (external to the OSPF system).
To enable OSPF to add the RIP-v2 routes to its routing table, configure RIP-v2 normally in this Connection profile. OSPF will import all RIP routes as Type-2 ASEs.
In this example, RIP is turned off on the link and ASE information is configured explicitly.
- Open the Connection profile for the remote Pipeline unit.
- Turn on Route IP and configure the IP routing connection. For example:
Ethernet
Connections
IP options
LAN Adrs=10.2.3.4/24
WAN Alias=0.0.0.0
IF Adrs=0.0.0.0
Metric=7
Preference=N/A
Private=No
RIP=Off
Pool=0
See Chapter 10, Configuring IP Routing. Note that Connections > OSPF Options includes two ASE parameters that are active only when OSPF is not running on a link. When you configure these parameters, the Connection profile route will be advertised whenever the MAX is up.
- Open the OSPF Options subprofile.
- Leave RunOSPF set to No.
OSPF options
RunOSPF=No
- Configure the cost for the route to the remote Pipeline.
For example, for a single-channel BRI link could have a cost approximately 24 times the cost of a dedicated T1 link:
Cost=240
- Specify the LSA type for this route.
LSA-type=Type 2
LSA-type=Type 2
This specifies the type of metric to be advertised for an external route.
A Type 1 external metric is expressed in the same units as the link state metric (the same units as interface cost). Type 1 is the default.
A Type 2 external metric is considered larger than any link state path. Use of Type 2 external metrics assumes that routing outside the AS is the major cost of routing a packet, and eliminates the need for conversion of external costs to internal link state metrics.
- Enter an ASE-tag for this route.
The ASE-tag is a hexadecimal number that shows up in management utilities and "flags" this route as external. It may also be used by border routers to filter this record. For example:
ASE-tag=cfff8000
- Close the Connection profile.
Note: Of course, the remote MAX unit must also have a comparable Connection profile to
connect to MAX-1.
Administering OSPF
This section describes how to work with OSPF information in the routing table and how to monitor OSPF activity in the terminal server command-line interface.
To invoke the terminal-server interface, select System > Sys Diag > Term Serv and press Enter.
Working with the routing table
The OSPF routing table includes routes built from the router's link-state database as well as those added by external routing protocols such as RIP. You can also add routes statically, for example, to direct traffic destined for a remote site through one of several possible border routers. For details on adding static routes, for example, if you want to force the use of one route over those learned from OSPF, see Chapter 10, Configuring IP Routing..
To view the IP routing table with added OSPF information, invoke the terminal-server (System > Sys Diag > Term Serv) and use the Iproute Show command with the -l option:
ascend% iproute show -l
In addition to the standard routing-table fields, which are described in Chapter 10, Configuring IP Routing, the following three columns are specific to OSPF and are displayed only when you use the -l option. These OSPF-specific columns are displayed on the far right of each entry in the routing table:
... Cost T Tag
... 1 0 0xc0000000
... 9 1 0xc8000000
... 10 0 0xc0000000
... 9 1 0xc8000000
... 1 1 0xc0000000
... 3 1 0xc8000000
... 9 1 0xc8000000
... 4 1 0xc8000000
... 5 1 0xc8000000
... 3 1 0xc8000000
... 3 1 0xc8000000
... 3 1 0xc8000000
Multipath routing
A MAX running OSPF can alternate between two equal cost gateways. When OSPF detects more than one equally good gateway, in terms of routing costs, each equal-cost gateway is put on an equal-cost list. The router will alternate between all the gateways on the list. This is called equal-cost multipath routing.
For example, if a router A has two equal-cost routes to example.com, one via router B and the other via router C, the routing table could look like this:
Destination Gateway IF Flg Pref Met Use
Age
10.174.88.0/25 10.174.88.12 wan2 OGM 10 10 52 19
10.174.88.0/25 10.174.88.13 wan3 OGM 10 10 52 19
10.174.88.12/32 10.174.88.12 wan2 OG 10 10 0 28
10.174.88.13/32 10.174.88.13 wan3 OG 10 10 0 28
192.168.253.0/24 - ie0 C 0 0 1 49
192.168.253.6/32 - lo0 CP 0 0 53 49
223.1.1.0/24 10.174.88.12 wan2 OG 10 10 0 19
223.5.1.0/24 10.174.88.12 wan2 OG 10 10 0 19
223.12.9.0/24 10.174.88.12 wan2 OG 10 10 0 19
255.255.255.255/32 - ie0 CP 0 0 0 49
Note that the "M" in the Flags column indicates an equal-cost multipath. A Traceroute from A to example.com would look like this:
ascend% traceroute -q 10 example.com
traceroute to example.com (10.174.88.1), 30 hops max, 0 byte packets
1 C.example.com (10.174.88.13) 20 ms B .example.com (10.174.88.12) 20 ms C.example.com (10.174.88.13) 20 ms B .example.com (10.174.88.12) 20 ms 20 ms C.example.com (10.174.88.13) 60 ms 20 ms B .example.com (10.174.88.12) 20 ms C.example.com (10.174.88.13) 20 ms B .example.com (10.174.88.12) 20 ms
2 example.com (10.174.88.1) 20 ms 20 ms 20 ms 20 ms 30 ms 20 ms 20 ms 30 ms 20 ms 30 ms
Note: Notice the alternating replies. The replies are statistically dispatched to B and C, with
roughly 50% of the packets sent through each gateway. For background information on the
routing table and on the Traceroute command, see Chapter 10, Configuring IP Routing.
Third-party routing
A MAX running OSPF can advertise routes to external destinations on behalf of another gateway (a "third-party"). This is commonly known as advertising a forwarding address. Depending on the exact topology of the network, it may be possible for other routers to use this type of LSA and route directly to the forwarding address without involving the advertising MAX, increasing the total network throughput.
Third-party routing requires that all OSPF routers know how to route to the forwarding address. This will usually mean that the forwarding address must be on an Ethernet 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. To configure a static route for OSPF to advertise a third-party gateway:
- Open a static route in Ethernet > Static Rtes.
- Set Third-Party to Yes.
- Set the Gateway to the forwarding address.
Ethernet
Static Rtes
Name=third-party
Silent=No
Active=Yes
Dest=10.212.65.0/24
Gateway=101.2.3.4
Metric=3
Preference=100
Private=No
Ospf-Cost=1
LSA-Type=Type1
ASE-tag=c00000000
Third-Party=Yes
- Close the static route.
How OSPF adds RIP routes
When the MAX establishes an IP routing connection with a caller that does not support OSPF, it imports the AS-external route from the Connection profile and adds it to the routing table. The MAX does not have to run RIP to learn these routes. RIP should be turned off when the MAX is running OSPF.
To enable OSPF to add the RIP-v2 routes to its routing table, configure RIP-v2 normally in this Connection profile. OSPF will import all RIP routes as Type-2 ASEs. The reason why RIP routes are imported with Type-2 metrics by default is that RIP metrics are not directly comparable to OSPF metrics. To prevent OSPF from interpreting RIP metrics, we assign the imported ASE route a Type-2 metric, which means that it is so large compared to OSPF costs that the metric can be ignored.
Route preferences
Route preferences provide additional control over which types of routes take precedence over others. They are necessary in a router which speaks multiple routing protocols, largely because RIP metrics are not comparable with OSPF metrics.
For each IP address and netmask pair, the routing table holds one route per protocol, where the protocols are defined as follows:
When choosing which routes should be put in the routing table, the router first compares the Preference value, preferring the lower number. If the Preference values are equal, the router then compares the Metric field, using the route with the lower Metric.
If multiple routes exist for a given address and netmask pair, the route with the lower Preference is better. If two routes have the same Preference, then the lower Metric is better. The best route by these criteria is actually used by the router. The others remain latent or hidden, and are used in case the best route was removed.
To assign a WAN link the same preference as a route learned from OSPF:
- Open Connections > IP Options.
- Specify a preference value of 10 (the default value for OSPF routes). For example:
Ethernet
Connections
IP options
LAN Adrs=10.9.8.10/22
WAN Alias=0.0.0.0
IF Adrs=0.0.0.0
Metric=5
Preference=10
Private=No
RIP=Off
Pool=0
- Close the Connection profile.
On Ethernet, the route preferences also include ASE type and ASE tag information for routes learned from RIP. These values affect all RIP information learned across the Ethernet. To change the route preferences on Ethernet:
- Open Ethernet > Mod Config > Route Pref.
- Modify the parameters to adjust preference values. For example, to assign static routes the
same preference value as those learned from OSPF:
Ethernet
Mod Config
Route prefs...
Static Preference=10
Rip Preference=100
RipAseType=Type2
Rip Tag=c8000000
OSPF Preference=10
Or, to change RIP metrics to Type 1:
Ethernet
Mod Config
Route prefs...
Static Preference=100
Rip Preference=100
RipAseType=Type1
Rip Tag=c8000000
OSPF Preference=10
- Close the Ethernet profile.
Monitoring OSPF
The terminal server command-line interface provides commands for monitoring OSPF in the MAX. To see the options, invoke the terminal server interface (System > Sys Diag > Term Serv) and use the Show OSPF command; for example:
ascend% show ospf ?
show ospf ? Display help information
show ospf errors Display OSPF errors
show ospf areas Display OSPF areas
show ospf general Display OSPF general info
show ospf interfaces Display OSPF interfaces
show ospf lsdb Display OSPF link-state DB
show ospf lsa Display OSPF link-state advertisements
show ospf nbrs Display OSPF neighbors
show ospf rtab Display OSPF routing tab
show ospf io Display OSPF io
Viewing OSPF errors
To see OSPF errors, type:
ascend% show ospf errors
ERRORS from: boot
0: IP: Bad OSPF pkt type 0: IP: Bad IP Dest
0: IP: Bad IP proto id 1: IP: Pkt src = my IP addr
0: OSPF: Bad OSPF version 0: OSPF: Bad OSPF checksum
0: OSPF: Bad intf area id 0: OSPF: Area mismatch
0: OSPF: Bad virt link info 0: OSPF: Auth type != area type
0: OSPF: Auth key != area key 0: OSPF: Packet is too small
0: OSPF: Packet size > IP length 0: OSPF: Transmit bad
0: OSPF: Received on down IF 0: Hello: IF mask mismatch
0: Hello: IF hello timer mismatch 0: Hello: IF dead timer mismatch
0: Hello: Extern option mismatch 0: Hello: Nbr Id/IP addr confusion
0: Hello: Unknown Virt nbr 0: Hello: Unknown NBMA nbr
0: DD: Unknown nbr 0: DD: Nbr state low
0: DD: Nbr's rtr = my rtrid 0: DD: Extern option mismatch
0: Ack: Unknown nbr 0: Ack: Nbr state low
0: Ls Req: Nbr state low 0: Ls Req: Unknown nbr
0: Ls Req: Empty request 0: LS Req: Bad pkt
0: LS Update: Nbr state low 0: Ls Update: Unknown nbr
0: Ls Update: Newer self-gen LSA 0: Ls Update: Bad LS chksum
0: Ls Update: less recent rx 0: Ls Update: Unknown type
The output lists all error messages related to OSPF, with each message preceded by the number of times it has been generated since the MAX powered up. Immediately following the number is a field indicating the packet type:
- IP (IP packets)
- OSPF (OSPF packets)
- Hello (Hello packets)
- DD (Database Description packets, which are exchanged periodically between neighbors)
- Ack (every DD packet must be acknowledged)
- LS Req (Link-state request- a request for an updated database)
- LS Update (An exchange to update databases)
Viewing OSPF areas
To view information about OSPF areas, type:
ascend% show ospf areas
Area ID: 0.0.0.0
Auth Type: Simple Passwd Import ASE: On Spf Runs: 23
Local ABRs: 0 Local ASBRs: 5 Inter LSAs: 7 Inter Cksum sum: 0x2ee0e
- Area ID specifies the area number in dotted-decimal format.
- The Auth Type field states the type of authentication, simple or null.
- Import ASE relates to the way routes are calculated, in effect, it specifies whether the router is an ABR or not. This functionality is always ON in the MAX.
- Spf Runs show how many times the SPF calculation was run. The calculation is performed every time the router notes a topology change or receives an update from another router.
- Local ABRs shows the number of ABRs the router knows about and the number of areas. The number 0 means that the router knows about the backbone area only.
- Local ASBRs shows the number of ASBRs the router knows about.
- Inter LSAs shows the number of entries in the link-state database.
- Inter Cksum sum shows the checksum that is used to note that a database has changed.
Viewing OSPF general info
To see general information about OSPF, type:
ascend% show ospf general
Rtr ID: 10.5.2.154
Status: Enabled Version: 2 ABR: Off ASBR: On
LS ASE Count: 8 ASE Cksum sum: Ox4c303 Tos Support: TOS 0 Only
New LSA Originate Count: 13 Rx New LSA Count: 498
- The Rtr ID field contains the MAX IP address (the IP address assigned to the MAX Ethernet interface).
- Status shows whether OSPF is enabled or disabled.
- Version is the version of the OSPF protocols running.
- ABR can be on or off, depending on where the MAX is situated on the network. If ABR is on, the MAX performs additional calculations related to external routes.
- ASBR is always on in the MAX. Although the MAX cannot function as an IGP gateway, it does import external routes- for example, when it establishes a WAN link with a caller that does not support OSPF-and the ASBR calculations are always performed.
- LS ASE count specifies the number of link-state database entries that are external.
- ASE Cksum sum specifies a checksum that is used to note that ASE routes in the database have changed.
- TOS Support shows the level of TOS support in the router.
- New LSA Originate Count shows the number of LSAs this router created.
- Rx New LSA Count shows the number of LSAs this router received from other OSPF routers.
To display the OSPF interfaces, type:
ascend% show ospf interfaces
Area IP Address Type State Cost Pri DR BDR
----------------------------------------------------------------------
-----
0.0.0.0 10.5.2.154 Bcast BackupDR 1 5 10.5.2.155
10.5.2.154
0.0.0.0 10.5.2.154 PtoP P To P 10 5 None None
0.0.0.0 10.5.2.154 PtoP P To P 10 5 None None
- The Area field shows the area ID (0.0.0.0 is the backbone).
- IP Address shows the address assigned to the interface. In the MAX, the IP address is always the address assigned to the Ethernet interface. To identify WAN links, use the Type and Cost fields.
- Type can be broadcast or point-to-point. WAN links are point-to-point.
- State shows how far along the router is in the election process of a DR or BDR. The state may be 1-way (indicating that the election process has begun), 2-way (indicating that the router has received notification), BackupDR, or DR.
- Cost is the metric assigned to the link. The default cost for Ethernet is 1.
- Pri shows the designated router election priority assigned to the MAX.
- DR identifies the designated router.
- BDR identifies the backup designated router.
Viewing the OSPF link-state database
To view the router's link-state database, type:
ascend% show ospf lsdb
Note: You can expand each entry in the link-state database to view additional information
about a particular LSA. See Viewing OSPF link-state advertisements.
LS Data Base:
Area LS Type Link ID Adv Rtr Age Len Seq # Metric
----------------------------------------------------------------------
-
0.0.0.0 STUB 10.5.2.146 10.5.2.146 3600 24 0 0
0.0.0.0 STUB 10.5.2.154 10.5.2.154 3600 24 0 0
0.0.0.0 STUB 10.5.2.155 10.5.2.155 3600 24 0 0
0.0.0.0 STUB 10.5.2.162 10.5.2.162 3600 24 0 0
0.0.0.0 STUB 10.5.2.163 10.5.2.163 3600 24 0 0
0.0.0.0 RTR 10.5.2.146 10.5.2.146 659 72 8000003e 0
0.0.0.0 RTR 10.5.2.154 10.5.2.154 950 84 8000000a 0
0.0.0.0 RTR 10.5.2.155 10.5.2.155 940 60 80000005 0
0.0.0.0 RTR 10.5.2.162 10.5.2.162 980 84 8000003b 0
0.0.0.0 RTR 10.5.2.163 10.5.2.163 961 60 80000005 0
0.0.0.0 NET 10.5.2.155 10.5.2.155 940 32 80000003 0
0.0.0.0 NET 10.5.2.163 10.5.2.163 961 32 80000003 0
0.0.0.0 ASE 10.5.2.16 10.5.2.163 18 36 80000098 3
0.0.0.0 ASE 10.5.2.18 10.5.2.163 546 36 80000004 10
0.0.0.0 ASE 10.5.2.144 10.5.2.146 245 36 80000037 1
0.0.0.0 ASE 10.5.2.152 10.5.2.154 536 36 80000006 1
0.0.0.0 ASE 10.5.2.152 10.5.2.155 526 36 80000004 1
0.0.0.0 ASE 10.5.2.152 10.5.2.163 18 36 80000097 9
0.0.0.0 ASE 10.5.2.155 10.5.2.163 17 36 80000097 9
0.0.0.0 ASE 10.5.2.160 10.5.2.162 568 36 80000037 1
Viewing OSPF link-state advertisements
To view additional information about an LSA in the link-state database, first display the database as described in the preceding section. You can specify an LSA to expand using this format:
show ospf lsa area ls-type ls-id adv-rtr
This command requires that you include the first four fields of the LSA as listed in the database. You can select the first four fields and paste them in after typing the command, for example, to see an expanded view of the last entry in the link-state database shown in the previous section:
ascend% show ospf lsa 0.0.0.0 ase 10.5.2.160 10.5.2.162
LSA type: ASE ls id: 10.5.2.160 adv rtr: 110.5.2.162 age: 568
len: 36 seq #: 80000037 cksum: 0xfffa
Net mask: 255.255.255.255 Tos 0 metric: 10 E type: 1
Forwarding Address: 0.0.0.0 Tag: c0000000
Viewing OSPF neighbors
To view adjacencies, type:
ascend% show ospf nbrs
Area Interface Router Id Nbr IP Addr State Mode
Pri
----------------------------------------------------------------------
-----
0.0.0.0 10.5.2.154 10.5.2.155 10.5.2.155 Full Slave 5
0.0.0.0 10.5.2.154 10.5.2.146 10.5.2.146 Full Master 5
0.0.0.0 10.5.2.154 10.5.2.162 10.5.2.162 Full Slave 5
- Area is the area ID.
- Interface shows the address assigned to the interface. In the MAX, the IP address is always the address assigned to the Ethernet interface.
- Router Id is the IP address of the router used to reach a neighbor. This is often the same address as the neighbor itself.
- Nbr IP Addr is the IP address of the neighbor.
- State indicates the state of the link-state database exchange. Full means that the databases are fully aligned between the MAX and its neighbor.
- Mode indicates whether the neighbor is functioning in master or slave mode. The master sends Database Description packets (polls) which are acknowledged by Database Description packets sent by the slave (responses).
- Pri shows the designated router election priority assigned to the MAX.
Viewing the OSPF routing table
To view the OSPF routing table, type:
ascend% show ospf rtab
SPF algorithm run 24 times since boot
Dest D_mask Area Cost E Path Nexthop AdvRtr L
----------------------------------------------------------------------
-----
Nets:
10.5.2.163 255.255.255.248 0.0.0.0 10 3 EXT 10.5.2.163 10.5.2.163
0
10.5.2.163 255.255.255.255 0.0.0.0 20 0 EXT 10.5.2.163 10.5.2.163
0
10.5.2.146 255.255.255.248 0.0.0.0 20 1 EXT 10.5.2.154 10.5.2.146
0
10.5.2.146 255.255.255.255 0.0.0.0 20 0 STUB 10.5.2.154 10.5.2.146
0
10.5.2.155 255.255.255.248 0.0.0.0 10 0 INT 10.5.2.154 10.5.2.155
1
10.5.2.154 255.255.255.255 0.0.0.0 21 0 STUB 10.5.2.163 10.5.2.154
0
10.5.2.155 255.255.255.255 0.0.0.0 20 9 STUB 10.5.2.155 10.5.2.155
1
10.5.2.163 255.255.255.248 0.0.0.0 11 1 INT 10.5.2.163 10.5.2.163
0
10.5.2.162 255.255.255.255 0.0.0.0 20 0 STUB 10.5.2.163 10.5.2.162
0
10.5.2.163 255.255.255.255 0.0.0.0 10 0 STUB 10.5.2.163 10.5.2.163
0
- The Dest field shows the destination address.
- D_mask is the destination netmask.
- Area is the area ID.
- Cost is the cost of the route.
- E is the cost of the link. (The cost of a route is the sum of the cost of each intervening link, including the cost to the connected route.)
- Path specifies the type of link: EXT (exterior), INT (interior), or STUB (a default).
- Next hop specifies the target address from this router.
- Adv Rtr is the advertising router. Sometimes a router will advertise routes for which it is not the gateway.
Viewing OSPF protocol i/o
To display information about packets sent and received by the OSPF protocol, type:
ascend% show ospf io
IO stats from: boot
>> RECEIVED:
0: Monitor request
785: Hello
13: DB Description
6: Link-State Req
1387: Link-State Update
64: Link-State Ack
>> SENT:
794: Hello
15: DB Description
6: Link-State Req
1017: Link-State Update
212: Link-State Ack
techpubs@eng.ascend.com
Copyright © 1998, Ascend Communications, Inc. All rights
reserved.