Foundation Topics

OSPF Network Topology Options

OSPF is capable of routing over every type of data link, but OSPF makes assumptions that do not hold true for all topologies. OSPF assumes that—within a subnet—all routers can communicate directly using multicasts and that no router is uniquely positioned in the topology. Both assumptions are fine for Ethernet: If five routers are attached to a switch, a multicast from one reaches the other four and each would be fine as a designated router (DR).

The aforementioned assumptions do not hold for nonbroadcast multiaccess (NBMA) environments. In a Frame Relay network, for example, multicasts and broadcasts are not supported on "NBMA" OSPF-network-type interfaces on Cisco routers. The following are the OSPF network types available on Cisco router interfaces:

  • Broadcast multiaccess

  • Point-to-point

  • Point-to-multipoint (default is point-to-multipoint broadcast; nonbroadcast option is available)

  • Nonbroadcast multiaccess (NBMA)

To account for the lack of multicast and broadcast support inherent in NBMA OSPF-network-type interfaces on Cisco routers, multicasts are simulated by replicating an advertisement to each neighbor. This chapter describes several strategies for dealing with neighbor discovery and communication in an NBMA topology.

Any-to-any communication within a subnet cannot be assumed in NBMA. DRs need to be able to communicate with all other devices, which leads to design considerations. This chapter discusses the strategies available for overcoming this limitation.

Note

Neither of these issues applies to LANs or to point-to-point links. Ethernet links are automatically recognized as broadcast links. Point-to-point links, such as DS3, are also automatically recognized.

Multipoint interfaces on Cisco routers automatically start in nonbroadcast mode, but there are times when this needs to be manually adjusted. Each of the four OSPF network types has its own advantages and disadvantages, as described in this section. After explaining the differences between these OSPF network types and the use of subinterfaces, this section describes how to select an OSPF design.

Understanding the Differences Between OSPF Network Types

The key differences between the four OSPF network types revolve around the use of DRs, support for partial mesh Frame Relay topologies, support for standards, neighbor recognition, and timers. The following sections compare the properties of each OSPF network type.

Designated Routers and Topology Support

DRs minimize topology traffic, but a DR works under the assumption that it is in contact with all devices. Multiaccess topologies, such as those found in NBMA and broadcast OSPF network types, rely on DRs and so are best applied to full-mesh topologies. If the topology is not a full mesh, then the DR should be manually selected, using priorities, to be a router with permanent virtual circuits (PVCs) connecting it to all other routers. For example, in a hub-and-spoke topology, the DR should be the hub and all spokes should have a priority of zero (there will not be a separate BDR).

The point-to-multipoint OSPF network type does not involve a DR election; this OSPF network type is less efficient in a full mesh, but fine with a partial mesh. It is more tolerant of network changes than the broadcast option. The point-to-multipoint OSPF network type also has a Cisco-specific option called point-to-multipoint nonbroadcast.

The point-to-point OSPF network type also does not involve a DR election.

Standards

OSPF network types can be described as either RFC-compliant or Cisco proprietary, as follows:

  • RFC-compliant— RFC-compliance offers a vendor-neutral routing platform. There are two nonbroadcast OSPF network types (RFC 2328):

    - NBMA

    - Point-to-multipoint

  • Cisco-specific— Of the broadcast, point-to-multipoint (broadcast), point-to-multipoint nonbroadcast, point-to-point, and NBMA OSPF network type options on a Cisco router that can be used in nonbroadcast environment, three of these are Cisco proprietary:

    - Point-to-multipoint nonbroadcast

    - Broadcast

    - Point-to-point

Neighbor Recognition

With the NBMA OSPF network type, routers cannot dynamically discover their neighbors, so the neighbors must be manually identified. The broadcast OSPF network type is similar to the NBMA OSPF network type in that both use DRs and expect a full mesh, but with the broadcast OSPF network type routers are capable of discovering their neighbors automatically. This simplification is very attractive.

The RFC point-to-multipoint mode discovers neighbors automatically; however, point-to-multipoint nonbroadcast requires neighbors to be manually entered. Point-to-multipoint nonbroadcast differs in this regard, and is designed for links that do not have a broadcast capability or even an ability to emulate broadcasts.

The neighbor on point-to-point links is obvious (it is the other router).

Timers

OSPF sends out hellos at regular intervals to discover neighbors and to verify that the neighbor list remains current. Neighbors time-out of the list after a "dead" time, which is four times the hello time by default.

Broadcast links use a 10-second hello timer because capacity is assumed to be plentiful. Point-to-point also uses a faster hello time, because of the simplicity of the network. The other OSPF network types all use 30-second hello and 120-second dead timers, reducing the load on the network.

Table 6-2 compares the five OSPF network types in a nonbroadcast environment.

Table 6-2. OSPF Network Types in a Nonbroadcast Environment
 NonbroadcastPoint-to-Multipoint (Broadcast)Point-to-Multipoint NonbroadcastBroadcastPoint-to-Point
DR/BDRYesNoNoYesNo
Identify Neighbor?YesNoYesNoNo
Timer Intervals (Hello/Dead)30/12030/12030/12010/4010/40
RFC 2328 or CiscoRFCRFCCiscoCiscoCisco
Network SupportedFull meshAnyAnyFull meshPoint-to-point


Subinterfaces

On a Cisco router, it is possible to configure a physical interface with two logical subinterface options. You can configure these subinterfaces to be point-to-point or multipoint. (Note: The default OSPF network type for a physical serial interface is nonbroadcast multiaccess.)

Frame Relay multipoint subinterfaces support multiple PVCs. A Frame Relay multipoint subinterface can be configured using any of the OSPF network types except point-to-point. Do not allow the similar terminology to confuse you! Two distinct things are going on at the same time: OSPF network types and subinterface types.

Multipoint subinterfaces are treated like other interfaces, so the default OSPF network type is NBMA.

Point-to-point subinterfaces are treated by the router exactly as if they were point-to-point circuits. These interfaces automatically use the point-to-point OSPF network type.

Selecting an OSPF Design

Full-mesh Frame Relay networks may be handled using any of the OSPF network types, but are generally left as NBMA. Switching to the broadcast OSPF network type gives automatic neighbor discovery. Because NBMA and broadcast OSPF network types are functionally optimal for a full-mesh nonbroadcast environment, they are generally preferred to the point-to-multipoint OSPF network-type option.

Partial-mesh Frame Relay networks are more difficult. The designated router idea does not work as well in a partial mesh because the router elected may not be able to reach all the other routers. Pick one of the following techniques for dealing with this situation:

  • Use NBMA and pick your DR.

  • Use point-to-multipoint.

  • Break up the network into point-to-point connections.

  • Divide the network into a fully meshed region and some extra point-to-point circuits.

To examine these options consider Figure 6-2, which shows a partial-mesh Frame Relay network.

Figure 6-2. Partial-Mesh Frame Relay Network


The first option—picking a DR—is available only if your network has at least one router with connections to all other routers. In Figure 6-2, Router A has PVCs to all other routers. Set the priority of B, C, and D to zero to make sure that A is the DR and that this network can be configured with interfaces using the NBMA OSPF network type. This should not be your first choice, because if A goes down then C and D cannot communicate, even though they are directly connected.

The second option is to use the point-to-multipoint OSPF network type. This is a good option. Neighbors will automatically recognize each other, so this is easy to set up. Relationships will form along PVCs, so there will be four adjacencies (and using a DR would only reduce this to three adjacencies).

The third option is to treat each PVC as a separate point-to-point circuit. This is the easiest method to document and to troubleshoot, but creates a more involved configuration. This is a very common way to handle this situation.

The final option is to create two subinterfaces on Router A. A multipoint interface would use NBMA or broadcast OSPF network types on the interfaces in the A-C-D full mesh, while a point-to-point subinterface would be used on Router A to connect to Router B.

Each of these options is appropriate in some situations. Generally, point-to-point subinterfaces are a safe, straightforward, and easily understandable way to build out partial mesh networks.

Configuring OSPF in a Nonbroadcast Environment

This section illustrates the configuration commands needed for implementing OSPF in a nonbroadcast environment. Interfaces default to the NBMA OSPF network type in a nonbroadcast environment. To change this, apply the ip ospf network command on the interface, as follows:

       Router(config-if)# ip ospf network {broadcast | non-broadcast | point-
         to-point | {point-to-multipoint [non-broadcast]}}

					  

For example, to change the OSPF network type to point-to-multipoint the command would be ip ospf network point-to-multipoint. Note that if point-to-point subinterfaces are created, they will automatically be assigned the OSPF point-to-point network type.

Configuring OSPF with the Nonbroadcast OSPF Network Type

Configuring a router to support OSPF in a nonbroadcast environment with the NBMA OSPF network type involves two steps: identifying neighbors and picking an OSPF network type for the cloud. Because NBMA is the default OSPF network type, it is only necessary to identify neighbors.

Remember that the DR and BDR need direct connectivity to the other routers. Pick candidates based on PVC attachments and use priorities to prevent poor candidates from being elected DR or BDR.

The syntax of the neighbor command is

      Router(config-if)# neighbor ip-address [priority number ] [poll-interval sec]
        [cost number]

					  

Use the neighbor command to configure interconnecting OSPF routers within a nonbroadcast environment. Three options exist:

  • Priority may be adjusted from the default value of 1. If the ip ospf priority command on the neighbor is set, then the higher value of the two is used. Priority is an eight-bit value.

  • In some situations, it is necessary to continue sending hellos to inactive neighbors. These hello packets will be sent at a reduced rate, called the poll interval, to ensure connectivity is maintained while preserving bandwidth. The default poll interval is 120 seconds.

  • The cost option adjusts the cost value used by the local router to reach this neighbor. It does not affect the cost reported by the neighbor.

Example 6-1 shows how the neighbor command is used. Remember that the NBMA OSPF network type (the default) is in use in this example.

Example 6-1. The OSPF neighbor Command

Router(config)# interface Serial0
Router(config-if)# ip address 131.144.10.100 255.255.255.0
Router(config-if)# encapsulation frame-relay
Router(config)# router ospf 1
Router(config-router)# network 131.144.10.100 0.0.0.255 area 0
Router(config-router)# neighbor 131.144.10.2
Router(config-router)# neighbor 131.144.10.3
Router(config-router)# neighbor 131.144.10.5

Configuring the OSPF Point-to-Multipoint Network Type

Point-to-multipoint forms an adjacency automatically along any PVC, which causes more overhead but is more resilient than the NBMA option. With point-to-multipoint, no DR is elected and neighbors are automatically discovered, so the only configuration command is to change from the default OSPF NBMA network type.

Note

The ip ospf network point-to-multipoint non-broadcast command was introduced with Cisco IOS Release 11.3a. You can find more information online at Cisco.com by searching for "OSPF point-to-multipoint network with separate costs per neighbor." This feature was added to support customers using point-to-multipoint on nonbroadcast media, such as classic IP over ATM.


The commands ip ospf network point-to-multipoint and ip ospf network point-to-multipoint non-broadcast change the OSPF network type on the interface. Point-to-multipoint non-broadcast requires that neighbors are identified.

Example 6-2 shows the necessary configuration for the point-to-multipoint OSPF network type. There is no need to configure neighbors, although you can do so .

Example 6-2. Configuring Point-to-Multipoint Networks

Router(config)# interface Serial0
Router(config-if)# ip address 10.1.1.1 255.255.255.0
Router(config-if)# encapsulation frame-relay
Router(config-if)# ip ospf network point-to-multipoint
Router(config)# router ospf 1
Router(config-router)# network 10.1.1.0 0.0.0.255 area 0

Configuring OSPF with the Broadcast Network Type

With the broadcast OSPF network type, neighbors are automatically discovered and the hello timer is faster than with NBMA . Configuring a broadcast interface just involves changing the OSPF network type—no neighbor statements are required.

The broadcast OSPF network type works best with a fully meshed network. Example 6-3 shows a typical configuration of the broadcast OPSF network type.

Example 6-3. Configuring a Broadcast Network

Router(config)# interface Serial0
Router(config-if)# ip address 10.1.1.1 255.255.255.0
Router(config-if)# encapsulation frame-relay
Router(config-if)# ip ospf network broadcast
Router(config)# router ospf 1
Router(config-router)# network 10.1.1.0 0.0.0.255 area 0

Configuring OSPF with the Point-to-Point Network Type on a Frame Relay Subinterface

With the point-to-point OSPF network type, each subinterface behaves as a physical point-to-point network. Therefore, the communication between the routers is direct and the adjacency is automatic.

Simply creating a point-to-point subinterface with an IP address that is matched by a network statement is the only step. Example 6-4 shows the necessary configuration required for a point-to-point Frame Relay subinterface.

Example 6-4. Configuring a Point-to-Point Frame Relay Subinterface

Router(config)# interface Serial0
Router(config-if)# no ip address
Router(config-if)# encapsulation frame-relay
Router(config)# interface Serial0.1 point-to-point
Router(config-subif)# ip address 10.1.1.1 255.255.255.0
Router(config-subif)# frame-relay interface-dlci 51
Router(config)# interface Serial0.2 point-to-point
Router(config-subif)# ip address 10.1.2.1 255.255.255.0
Router(config-subif)# frame-relay interface-dlci 52
Router(config)# router ospf 1
Router(config-router)# network 10.1.0.0 0.0.255.255 area 0