| 0 comments ]

Configuring and Verifying Basic OSPF Routing

Add a note here This section discusses the basic OSPF configuration and verification of single-area and multiarea OSPF networks.

Add a note hereThe following topics are discussed:

Add a note here Planning and Configuring OSPF

Add a note hereThis section describes how to plan and configure basic OSPF and provides some detailed examples.

Planning OSPF Routing Implementations

Add a note hereThis section describes how to plan, implement, and document an OSPF deployment.

Add a note hereWhen preparing to deploy OSPF routing in a network, the existing network state and requirements first need to be gathered, and deployment options considered. Considerations for OSPF include the following:

  • Add a note here IP addressing plan— The IP addressing plan governs how OSPF can be deployed and how well the OSPF deployment will scale. A detailed hierarchical IP subnet and addressing plan must be produced, to enable OSPF summarization, allow the network to scale more easily, and to optimize OSPF behavior.

  • Add a note here Network topology— The topology consists of the devices (routers, switches, and so on) and the links connecting them. A detailed network topology should be created to assess OSPF scalability requirements and to determine which OSPF features might be required (for example, multiple areas, OSPF summarization, stub areas, and redistribution). The topology should include backup links where necessary.

  • Add a note here OSPF areas— Dividing an OSPF network into areas decreases the LSDB size and limits the propagation of link-state updates when the topology changes. The routers that are to be ABRs and ASBRs must be identified, as are those that are to perform any summarization or redistribution.

Add a note hereAfter the requirements have been assessed, the implementation plan can be created. The implementation plan should include the following steps:

  • Add a note here Define the network requirements

  • Add a note hereGather the required parameters

  • Add a note hereDefine the OSPF routing parameters

  • Add a note hereConfigure OSPF

  • Add a note hereVerify the OSPF configuration

Add a note hereThe information necessary to implement OSPF routing includes the following:

  • Add a note hereThe IP addresses to be configured on individual router interfaces.

  • Add a note hereA list of routers on which OSPF is to be enabled, along with the OSPF process number to use and the connected networks that are to run OSPF and that need to be advertised (per individual router).

  • Add a note hereThe area in which each interface is to be configured.

  • Add a note hereMetrics that need to be applied to specific interfaces, to influence the OSPF best path selection. The required metric and the interface where the metric needs to be applied should be specified.

Add a note hereIn the implementation plan, the list of tasks for each router in the network must be defined. For OSPF, the tasks include the following:

  • Add a note hereEnabling the OSPF routing protocol, directly on an interface or by using the correct network command under the OSPF routing process configuration mode.

  • Add a note hereAssigning the correct area id to the interface, via the OSPF configuration on the interface or under the OSPF routing process configuration mode.

  • Add a note hereOptionally configuring the metric to appropriate interfaces.

Add a note hereAfter implementing OSPF, proper deployment on each router should be verified. Verification tasks include the following:

  • Add a note hereVerifying that the appropriate OSPF neighbor relationships and adjacencies are established

  • Add a note hereVerifying that the OSPF LSDB is populated with the necessary information

  • Add a note hereVerifying that IP routing table is populated with the necessary information

  • Add a note hereVerifying that there is connectivity in the network between routers and to other devices

  • Add a note hereVerifying that OSPF behaves as expected in a case of a topology change, by testing link failure and router failure events

Add a note here After a successful OSPF deployment, the solution and verification process and results should be documented for future reference. Documentation should include a topology map, the IP addressing plan, the area hierarchy, the networks and interfaces included in OSPF on each router, the default and any special metrics configured, and the verification results.

Configuring Basic OSPF

Add a note hereThis section describes how you can configure OSPF using the router ospf command with network area commands under it, or directly on router interfaces with the ip ospf area command.

Add a note hereTo configure the OSPF process, do the following:

Add a note here Step 1

Add a note hereEnable the OSPF process on the router using the router ospf process-id [vrf vpn-name] global configuration command. Table 3-3 describes the parameters of the router ospf command.

Add a note here Table 3-3: router ospf Command
Open table as spreadsheet

Add a note hereParameter

Add a note hereDescription

Add a note here process-id

Add a note hereAn internally used number that identifies the OSPF routing process. The process-id does not need to match process IDs on other routers. It can be any positive integer in the range from 1 to 65535.

Add a note here vrf vpn-name

Add a note here(Optional) Specifies the name of the virtual private network (VPN) routing and forwarding (VRF) instance to associate with OSPF VRF processes.

Add a note here Step 2

Add a note hereIdentify which interfaces on the router are part of the OSPF process, and identify the OSPF area to which the network belongs, using the network ip-address wildcard-mask area area-id router configuration command. Table 3-4 describes the parameters of the network command in the context of OSPF.

Add a note here Table 3-4: network Command Parameters with OSPF
Open table as spreadsheet

Add a note hereParameter

Add a note hereDescription

Add a note here ip-address

Add a note hereEither the network address, subnet address, or the interface’s address. This address instructs the router to determine which links to advertise to, which links to check for advertisements, and which networks to advertise.

Add a note here wildcard-mask

Add a note hereDetermines how to interpret the ip-address. The mask has wildcard bits, in which 0 is a match and 1 is “don’t care.” For example, 0.0.255.255 indicates a match in the first 2 bytes.

Add a note hereTo specify the interface address, use the mask 0.0.0.0 to match all 4 bytes of the address.

Add a note hereAn address and wildcard mask combination of 0.0.0.0 255.255.255.255 matches all interfaces on the router.

Add a note here area-id

Add a note hereSpecifies the OSPF area to be associated with the address. This parameter can be a decimal number in the range from 0 to 4294967295, or it can be in dotted-decimal notation similar to an IP address, such as A.B.C.D.

Add a note hereAlternatively, starting with Cisco IOS Software Release 12.3(11)T (and some specific versions of earlier releases), OSPF can be enabled directly on the interface using the ip ospf process-id area area-id [secondaries none] interface configuration command. This command simplifies the configuration of unnumbered interfaces. Because this command is configured explicitly for the interface, it takes precedence over the network area command. Table 3-5 describes the parameters of the ip ospf area command.

Add a note here Table 3-5: ip ospf area Command
Open table as spreadsheet

Add a note hereParameter

Add a note hereDescription

Add a note here process-id

Add a note hereAn internally used number that identifies the OSPF routing process. The process ID is entered as a decimal number in the range from 1 to 65535.

Add a note here area-id

Add a note hereSpecifies the OSPF area to be associated with the interface. The area ID is entered either as a decimal value in the range from 0 to 4294967295, or it can be in dotted-decimal notation similar to an IP address, such as A.B.C.D.

Add a note here second-aries none

Add a note here(Optional) Prevents secondary IP addresses on the interface from being advertised.


Note

Add a note hereTo configure an unnumbered interface, use the ip unnumbered interface-type interface-number interface configuration command. This command enables IP processing on an interface without assigning an explicit IP address to the interface. The interface will use the IP address of the interface specified by the interface-type interface-number parameters as the source address of traffic from the configured interface. The interface specified in the command must be in the “up” state.

Single-Area OSPF Configuration Example

Add a note here Figure 3-14 shows the OSPF configuration for Fast Ethernet broadcast networks and serial point-to-point links, on two of the three routers. All three routers in Figure 3-14 are assigned to area 0 and are configured for network 10.0.0.0.

Click to collapse
Add a note hereFigure 3-14: Configuring OSPF on Internal Routers of a Single Area.

Add a note hereRouter A uses a general network 10.0.0.0 0.255.255.255 statement. This technique assigns all interfaces defined in the 10.0.0.0 network to OSPF process 1.

Add a note hereRouter B uses a specific host address technique. The wildcard mask of 0.0.0.0 matches all 4 bytes of the address. This technique allows the administrator to define which specific interfaces will run OSPF.

Add a note here Although the two examples shown in Figure 3-14 are a commonly used combination of a network statement and a wildcard mask, others could also work. For instance, a range of subnets could be specified.


Note

Add a note hereThe network command for OSPF is used strictly to enable OSPF for a single interface or for multiple interfaces. The network command and its wildcard mask are not used for route summarization purposes.

Multiarea OSPF Configuration Example

Add a note here Figure 3-15 shows an example of multiarea OSPF configuration. Router A is in area 0, Router C is in area 1, and Router B is the ABR between the two areas.

Click to collapse
Add a note hereFigure 3-15: Configuring OSPF for Multiple Areas.

Add a note hereThe configuration for Router A is the same as it was in Figure 3-14.

Add a note hereRouter B has a network statement for area 0. The configuration for area 1 in this example uses the ip ospf 50 area 1 interface configuration command. Alternatively a separate network router configuration command, such as network 10.2.1.2 0.0.0.0 area 1, could have been used.

Add a note here OSPF Router ID

Add a note here An OSPF router ID uniquely identifies each OSPF router in the network. The OSPF routing process chooses a router ID for itself when it starts up. The router ID is a unique number in IP address format that can be assigned in the following ways:

  • Add a note hereBy default, the highest IP address of any active physical interface when OSPF starts is chosen as the router ID. The interface does not have to be part of the OSPF process, but it has to be up. There must be at least one “up” IP interface on the router for OSPF to use as the router ID. If no up interface with an IP address is available when the OSPF process starts, the following error message occurs:

    Add a note hereR1(config)#router ospf 1
    2w1d: %OSPF-4-NORTRID: OSPF process 1 cannot start.
  • Add a note hereAlternatively, if a loopback interface exists, its IP address will always be preferred as the router ID instead of the IP address of a physical interface, because a loopback interface never goes down. If there is more than one loopback interface, the highest IP address on any active loopback interface becomes the router ID.

  • Add a note hereAlternatively, if the router-id ip-address OSPF router configuration command is used, it will override the use of the address of a physical or loopback interface as the router ID. Using the router-id command is the preferred procedure for setting the router ID.

Add a note hereThe OSPF database uses the router ID to uniquely describe each router in the network. Remember that every router keeps a complete topology database of all routers and links in an area and network. Therefore, router IDs should be unique throughout the OSPF autonomous system, no matter how they are configured.

Add a note hereAfter the router ID has been set, it does not change, even if the interface that the router is using for the router ID goes down. The OSPF router ID changes only if the router reloads or if the OSPF routing process restarts.

Add a note hereThe following sections describe how loopback interfaces are configured, and how the router ID is configured and verified.

Loopback Interfaces

Add a note hereTo allow OSPF to use a loopback address as the router ID, first define a loopback interface with the interface loopback number global configuration command, and then configure an IP address on the loopback interface.

Add a note hereAs mentioned, configuring an IP address on a loopback interface overrides the highest IP address on any active physical interface being used as the router ID. OSPF is more stable if a loopback interface address is used, rather than a physical interface address, because the loopback interface is always active and cannot fail, whereas a real interface could go down. For this reason, you should use a loopback address on all key routers (unless the router-id command is used).

Add a note hereIf the loopback address is advertised with the network command, then this address can be pinged for testing purposes, and used for management of the router and for the OSPF router ID. The IP address chosen for the loopback address can be either a private or public IP address, dictated by the network requirements (of course, if a private IP address is used it saves public IP address space).


Note

Add a note hereUsing a loopback address requires a different subnet for each router, unless the host address itself is advertised. By default, OSPF advertises loopback interface addresses as /32 host routes.

OSPF router-id Command

Add a note hereThe router-id ip-address OSPF router configuration command ensures that OSPF selects a specific planned router ID. The ip-address parameter can be any unique arbitrary 32-bit value in an IP address format (dotted decimal).

Add a note hereAfter configuring the router-id command, use the clear ip ospf process EXEC command to restart the OSPF routing process, so the router reselects the new IP address as its router ID. For example, the commands shown in Example 3-3 ensure that OSPF selects the preconfigured router ID 172.16.1.1.


Caution

Add a note here The clear ip ospf process command temporarily disrupts an operational network.

Add a note here Example 3-3: router-id Command

Add a note hereRouter(config)#router ospf  1
Router(config-router)#router-id 172.16.1.1

Router#clear ip ospf process


Note

Add a note hereChanging a router ID of a router whose router ID was set with the router-id command requires only that the OSPF process be cleared. However, changing the OSPF router ID of a router whose router ID was set by configuring a loopback interface address may require you to either reboot the router or to disable and then enable OSPF. (The IOS documentation is unclear on this point; we have seen both of these ways, and clearing the OSPF process, work in testing.)

Verifying the OSPF Router ID

Add a note hereUse the show ip ospf command to verify the OSPF router ID. This command also displays OSPF timer settings and other statistics, including the number of times the SPF algorithm has been executed. Optional parameters allow you to specify other information to be displayed.

Add a note here Example 3-4 shows example output from this command when executed on Router B in Figure 3-15.

Add a note here Example 3-4: show ip ospf Command from Router B in Figure 3-15

Add a note hereRouterB#show ip ospf
Routing Process "ospf 50" with ID 10.64.0.2
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
It is an area border router
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
Area BACKBONE(0)
Area BACKBONE(0)
Area has no authentication
SPF algorithm last executed 00:01:25.028 ago
SPF algorithm executed 7 times
Area ranges are
Number of LSA 6. Checksum Sum 0x01FE3E
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 1
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:00:54.636 ago
SPF algorithm executed 3 times
Area ranges are
Number of LSA 4. Checksum Sum 0x01228A
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0

RouterB#

Add a note here Verifying OSPF Operations

Add a note here To verify that OSPF has been properly configured, use the following show commands:

  • Add a note hereThe show ip ospf command displays the OSPF router ID, OSPF timers, the number of times the SPF algorithm has been executed, and LSA information.

  • Add a note hereThe show ip ospf interface [type number] [brief] command verifies that interfaces are configured in the intended areas. In addition, this command displays the timer intervals (including the hello interval) and shows the neighbor adjacencies.

  • Add a note hereThe show ip ospf neighbor [type number] [neighbor-id] [detail] command displays a list of neighbors, including their OSPF router ID, their OSPF priority, their neighbor adjacency state (such as init, exstart, or full), and the dead timer.

  • Add a note here The show ip route ospf command displays the OSPF routes known to the router. This command is one of the best ways to determine connectivity between the local router and the rest of the internetwork. This command also has optional parameters so that you can further specify the information to be displayed, including the OSPF process-id.

  • Add a note hereThe show ip protocols command displays IP routing protocol parameters, including timers, filters, metrics, networks, and other information for the entire router.

Add a note hereThe debug ip ospf events command displays OSPF-related events, such as adjacencies, flooding information, DR selection, and SPF calculations. The debug ip ospf adj command tracks adjacencies as they go up and down. The debug ip ospf packet command verifies that OSPF packets are flowing.


Note

Add a note hereThe log-adjacency-changes router configuration command configure the router to send a Syslog message when an OSPF neighbor goes up or down.

Add a note hereThe following sections illustrate example output from some of these commands, and the syntax of the command parameters.


Note

Add a note hereSample output from the show ip ospf command was provided in the “Verifying the OSPF Router ID” section, earlier in this chapter.

Add a note hereSample output from the debug ip ospf packet command was provided in the “OSPF Link-State Sequence Numbers” section, earlier in this chapter.

Add a note hereSample output from the debug ip ospf adj command is provided in the “Displaying OSPF Adjacency Activity” section, later in this chapter.

The show ip ospf interface Command

Add a note here Table 3-6 describes the parameters of the show ip ospf interface [type number] [brief] command.

Add a note here Table 3-6: show ip ospf interface Command
Open table as spreadsheet

Add a note hereParameter

Add a note hereDescription

Add a note here type

Add a note here(Optional) Specifies the interface type

Add a note here number

Add a note here(Optional) Specifies the interface number

Add a note here brief

Add a note here(Optional) Displays brief overview information for OSPF interfaces, states, addresses and masks, and areas on the router

Add a note hereThe show ip ospf interface command output in Example 3-5 is from Router A in the configuration example in Figure 3-15 and details the OSPF status of the Fast Ethernet 0/0 interface. This command verifies that OSPF is running on that particular interface and shows the OSPF area it is in. The command also displays other information, such as the OSPF process ID, the router ID, the OSPF network type, the DR and BDR, timers, and neighbor adjacency information.

Add a note here Example 3-5: show ip ospf interface Command on Router A in Figure 3-15

Add a note hereRouterA#show ip ospf interface fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 10.64.0.1/24, Area 0
Process ID 1, Router ID 10.64.0.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DROTHER, Priority 0
Designated Router (ID) 10.64.0.2, Interface address 10.64.0.2
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:04
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 4
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 10.64.0.2 (Designated Router)
Suppress hello for 0 neighbor(s)

The show ip ospf neighbor Command

Add a note here One of the most important OSPF troubleshooting commands is the show ip ospf neighbor [type number] [neighbor-id] [detail] command. OSPF does not send or receive updates without having full adjacencies between neighbors. This command displays OSPF neighbor information for each interface.

Add a note here Table 3-7 contains information about the parameters of this command.

Add a note here Table 3-7: show ip ospf neighbor Command
Open table as spreadsheet

Add a note hereParameter

Add a note hereDescription

Add a note here type

Add a note here(Optional) Specifies the interface type

Add a note here number

Add a note here(Optional) Specifies the interface number

Add a note here neighbor-id

Add a note here(Optional) Specifies the neighbor ID

Add a note here detail

Add a note here(Optional) Displays details of all neighbors

Add a note here Example 3-6 illustrates output from Router B in Figure 3-15. Router B has two neighbors. The first entry in the table represents the adjacency formed on the Fast Ethernet interface. A FULL state means that the LSDB has been exchanged successfully. The DROTHER entry means that a router other than this neighboring router (Router A) is the designated router. (Note that the OSPF priority on Router A’s Fast Ethernet 0/0 interface has been set to 0, indicating that it cannot be the DR or BDR on that interface.)

Add a note here Example 3-6: show ip ospf neighbor Command from Router B in Figure 3-15

Add a note hereRouterB#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
10.64.0.1 0 FULL/DROTHER 00:00:30 10.64.0.1 FastEthernet0/0
10.2.1.1 0 FULL/ - 00:00:34 10.2.1.1 Serial0/0/1

Add a note here The second line of output in Example 3-6 represents Router C, Router B’s neighbor on the serial interface. DR and BDR are not used on point-to-point interfaces (as indicated by a dash [-]).

Add a note here Example 3-7 shows further output from Router B in Figure 3-15, providing details of Router B’s neighbors.

Add a note here Example 3-7: show ip ospf neighbor detail Command from Router B in Figure 3-15

Add a note hereRouterB#show ip ospf neighbor detail
Neighbor 10.64.0.1, interface address 10.64.0.1
In the area 0 via interface FastEthernet0/0
Neighbor priority is 0, State is FULL, 16 state changes
DR is 10.64.0.2 BDR is 0.0.0.0
Options is 0x52
LLS Options is 0x1 (LR)
Dead timer due in 00:00:35
Neighbor is up for 00:07:14
Index 2/2, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
Neighbor 10.2.1.1, interface address 10.2.1.1
In the area 1 via interface Serial0/0/1
Neighbor priority is 0, State is FULL, 6 state changes
DR is 0.0.0.0 BDR is 0.0.0.0
Options is 0x52
LLS Options is 0x1 (LR)
Dead timer due in 00:00:39
Neighbor is up for 00:01:50
Index 1/1, retransmission queue length 0, number of retransmission 1
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 1, maximum is 1
Last retransmission scan time is 0 msec, maximum is 0 msec

The show ip route ospf Command

Add a note here As illustrated in Example 3-8, the show ip route ospf command is used to verify the OSPF routes in the IP routing table.

Add a note hereThe O code indicates that the route was learned from OSPF. The IA code indicates that the learned route is in another area (interarea). In Example 3-8, the 10.2.1.0 subnet is learned on Fast Ethernet 0/0 via neighbor 10.64.0.2. The [110/782] in the routing table represents the administrative distance assigned to OSPF (110) and the total cost of the route to subnet 10.2.1.0 (cost of 782).

Add a note here Example 3-8: show ip route ospf Command

Add a note hereRouterA#show ip route ospf
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O IA 10.2.1.0/24 [110/782] via 10.64.0.2, 00:03:05, FastEthernet0/0
RouterA#

The show ip protocols Command

Add a note hereThe show ip protocols command verifies that OSPF is running and provides OSPF routing protocol parameters, including timers, filters, metrics, networks, and other information for the entire router.

Add a note hereThe command output in Example 3-9 shows that the OSPF routing protocol with process number 1 is configured. The router ID of the router is 10.64.0.1 and it belongs to area 0.

Add a note here Example 3-9: show ip protocols Command

Add a note hereRouterA#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.64.0.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.0.0.0 0.255.255.255 area 0
Reference bandwidth unit is 100 mbps

The debug ip ospf events Command

Add a note here As illustrated in Example 3-10, the debug ip ospf events command is used to display OSPF-related events. This sample output shows that the router received a hello packet on its Serial 0/0/1 interface.

Add a note here Example 3-10: debug ip ospf events Command

Add a note hereR1#debug ip ospf events
OSPF events debugging is on
*Apr 27 11:47:00.942: OSPF: Rcv hello from 10.0.0.12 area 1 from Serial0/0/1
10.1.0.2
*Apr 27 11:47:00.942: OSPF: End of hello processing


Understanding OSPF Network Types

Add a note hereUnderstanding that an OSPF area is made up of different types of network links is important because the adjacency behavior is different for each network type, and OSPF must be properly configured to function correctly over certain network types.

Add a note here Types of OSPF Networks

Add a note hereOSPF defines distinct types of networks, based on their physical link type. OSPF operation on each type is different, including how adjacencies are established and the configuration required.

Add a note hereOSPF defines three types of networks:

  • Add a note here Point-to-point— A network that joins a single pair of routers.

  • Add a note here Broadcast— A multiaccess broadcast network, such as Ethernet.

  • Add a note here Nonbroadcast multiaccess (NBMA)— A network that interconnects more than two routers but that has no broadcast capability. Frame Relay, ATM, and X.25 are examples of NBMA networks. There are five modes of OSPF operation available for NBMA networks, as described later in the “OSPF over NBMA Topology Modes of Operation” section of this chapter.

Add a note hereOSPF operation on each of these network types is described in the following sections. Because DR and BDR play a role in some network types, the election of the DR and BDR on these network types is also described first. OSPF operation over both Layer 2 and Layer 3 Multiprotocol Label Switching (MPLS) virtual private networks (VPNs) is also explored.

Add a note here Electing a DR and BDR and Setting Priority

Add a note here To elect a DR and BDR, the routers view the OSPF priority value of the other routers during the hello packet exchange process and then use the following conditions to determine which router to select:

  • Add a note hereThe router with the highest priority value is the DR, as shown in Figure 3-16.

    Add a note here Image from book
    Add a note hereFigure 3-16: Electing the DR and BDR.

  • Add a note hereThe router with the second-highest priority value is the BDR.

  • Add a note hereThe default for the interface OSPF priority is 1. In case of a tie, the router ID is used. The router with the highest router ID becomes the DR. The router with the second-highest router ID becomes the BDR.

  • Add a note hereA router with a priority of 0 cannot become the DR or BDR. A router that is not the DR or BDR is a DROTHER.

  • Add a note hereIf a router with a higher priority value gets added to the network, it does not preempt the DR and BDR. The only time a DR or BDR changes is if one of them goes out of service. If the DR is out of service, the BDR becomes the DR, and a new BDR is selected. If the BDR is out of service, a new BDR is elected.

Add a note hereThe BDR does not perform any DR functions when the DR is operating. Instead, the BDR receives all the information, but the DR performs the LSA forwarding and LSDB synchronization tasks. The BDR performs the DR tasks only if the DR fails. To determine whether the DR is out of service, the BDR uses the wait timer. This timer is a reliability feature. If the BDR does not confirm that the DR is forwarding LSAs before the wait timer expires, the BDR assumes that the DR is out of service.

Add a note hereIt is important to remember that the DR concept is at the link level. In a multiaccess broadcast environment each network segment has its own DR and BDR. For example, a router connected to multiple multiaccess broadcast networks can be a DR on one segment and a regular (DROTHER) router on another segment.

Add a note hereUse the ip ospf priority number interface configuration command to affect which router interfaces on a multiaccess link are the DR and the BDR. The default priority is 1, and the range is from 0 to 255. The highest priority interface becomes the DR, and the second-highest priority interface becomes the BDR. Any interfaces set to 0 priority cannot be involved in the DR or BDR election process.

Add a note here Example 3-11 illustrates an example of configuring the Fast Ethernet interface on a router with an OSPF priority of 10.

Add a note here Example 3-11: ip ospf priority Command

Add a note hereRouter(config)#interface FastEthernet 0/0
Router(config-if)#ip ospf priority 10


Note

Add a note hereAn interface’s priority usually takes effect only when the existing DR goes down. A DR does not relinquish its status just because a new interface reports a higher priority in its hello packet.

Add a note hereSetting an interface’s OSPF priority to 0—indicating that it should not be the DR or the BDR—takes effect immediately, however. A new election takes place, and the interface in question will not be elected for either the DR or BDR role.

Add a note here Adjacency Behavior for a Point-to-Point Link

Add a note hereA point-to-point network joins a single pair of routers. A T1 serial line configured with a link-layer protocol such as PPP or HDLC is an example of a point-to-point network.

Add a note hereOn point-to-point networks, the router dynamically detects its neighboring routers by multicasting its hello packets to all OSPF routers using the address 224.0.0.5. On point-to-point networks, neighboring routers become adjacent whenever they can communicate directly. No DR or BDR election is performed, because a point-to-point link can have only two routers, so there is no need for a DR or BDR.

Add a note hereUsually, the IP source address of an OSPF packet is set to the address of the outgoing interface on the router. If an unnumbered interface is used, the IP source address is set to the IP address of another interface on the router.

Add a note hereThe default OSPF hello and dead intervals on point-to-point links are 10 seconds and 40 seconds, respectively. (The hello and dead timers can be changed with the ip ospf hello-interval seconds and ip ospf dead-interval seconds interface configuration commands.)

Add a note here Adjacency Behavior for a Broadcast Network

Add a note hereAn OSPF router on a multiaccess broadcast network such as Ethernet forms an adjacency with its DR and BDR. Adjacent routers have synchronized LSDBs. A common media segment is the basis for adjacency, such as two routers connected on the same Ethernet segment. When routers first come up on the segment, they perform the hello process and then elect the DR and BDR to represent the multiaccess broadcast network. The routers then attempt to form adjacencies with the DR and BDR.

Add a note here The DR and BDR add value to the network in the following ways:

  • Add a note here Reducing routing update traffic— The DR and BDR act as a central point of contact for link-state information exchange on a given multiaccess broadcast network. Therefore, each router must establish a full adjacency with the DR and the BDR only. Instead of each router exchanging link-state information with every other router on the segment, each router sends the link-state information to the DR and BDR only. The DR represents the multiaccess broadcast network in the sense that it sends link-state information from each router to all other routers in the network. This flooding process significantly reduces the router-related traffic on a segment.

  • Add a note here Managing link-state synchronization— The DR and BDR ensure that the other routers on the network have the same link-state information about the internetwork. In this way, the DR and BDR reduce the number of routing errors.

Add a note hereRemember that after a DR and BDR have been selected, any router added to the broadcast network establishes full adjacencies with the DR and BDR only.

Add a note here Adjacency Behavior over a Layer 2 MPLS VPN

Add a note hereAs described in Chapter 2, “Configuring the Enhanced Interior Gateway Routing Protocol,” Ethernet over MPLS (EoMPLS) is used to deploy Layer 2 MPLS VPNs, in which an MPLS backbone provides a Layer 2 Ethernet port-to-port connection, as illustrated in Figure 3-17. (EoMPLS is also known as a type of Metro Ethernet service.)

Click to collapse
Add a note hereFigure 3-17: EoMPLS Provides Layer 2 MPLS VPN Connectivity.

Add a note hereIn Figure 3-17, Routers R1 and R2 are exchanging Ethernet frames transparently across the MPLS backbone. They are connected to provider edge (PE) routers. The PE1 router takes the Ethernet frame received from the directly connected router R1, encapsulates it into an MPLS packet and forwards it across the backbone to the PE2 router. The PE2 router decapsulates the MPLS packet and reproduces the Ethernet frame on its Ethernet link to router R2.

Add a note here EoMPLS does not include any MAC layer address learning and filtering. Therefore routers PE1 and PE2 do not filter any frames based on MAC addresses. EoMPLS also does not use the Spanning Tree Protocol (STP). Bridge protocol data units (BPDUs) are propagated transparently and not processed, so LAN loop detection must be performed by other devices or avoided by design. A service provider can use LAN switches in conjunction with EoMPLS to provide these features.

Add a note hereThe two customer routers R1 and R2 in Figure 3-17 could also be connected to the MPLS edge routers PE1 and PE2 via virtual LAN (VLAN) subinterfaces, using different subinterfaces in the PE1 and PE2 routers to connect to different VLANs. In this case, the PE1 subinterface to the VLAN where the router R1 is connected is used for EoMPLS forwarding. The Ethernet frame that arrives from router R1 on the specific VLAN subinterface is encapsulated into MPLS and forwarded across the backbone to router PE2. The PE2 router decapsulates the packet and reproduces the Ethernet frame on its outgoing VLAN subinterface to router R2.

Add a note hereWhen you are deploying OSPF over EoMPLS, there are no changes to the OSPF configuration from the customer perspective. For example, the OSPF process needs to be enabled, and network commands must be configured to include all the interfaces that will run in the OSPF process, in the appropriate OSPF areas. These interfaces include the link toward the PE routers (Routers PE1 and PE2) over which the Routers R1 and R2 will form their neighbor relationship.

Add a note hereFrom the OSPF perspective, the Layer 2 MPLS VPN backbone and the PE1 and PE2 routers are not visible. A neighbor relationship is established directly between Routers R1 and R2 over the MPLS backbone, and behaves in the same way as on an Ethernet broadcast network. The OSPF network type is a multiaccess broadcast network, so DR and BDR routers are elected. Other routers form full adjacencies only with the DR and BDR.

Add a note here Adjacency Behavior over a Layer 3 MPLS VPN

Add a note hereAs described in Chapter 2, a Layer 3 MPLS VPN architecture provides a peer-to-peer VPN where PE routers participate in customer routing, providing optimum routing between customer sites. Figure 3-18 illustrates such a network. The PE routers carry a separate set of routes for each customer, isolating customers from each other. In Layer 3 MPLS VPN technology (even when running OSPF as a PE-CE routing protocol), the following requirements must be met:

  • Add a note hereThe customer routers (also called the C-routers, R1 and R2 in the figure) should not be MPLS VPN-aware. They should run standard IP routing software.

  • Add a note hereThe provider core routers (also called the P-routers, within the cloud in the figure) must not carry customer (VPN) routes, to make the MPLS VPN solution scalable.

  • Add a note hereThe provider edge routers (the PE routers) must support MPLS VPN services and traditional IP services.

Click to collapse
Add a note hereFigure 3-18: OSPF over Layer 3 MPLS VPN Connectivity.

Add a note here To the customer routers running OSPF (Routers R1 and R2 in Figure 3-18), the Layer 3 MPLS VPN backbone looks like a standard corporate backbone. The customer routers run standard IP routing software and exchange routing updates with the PE routers that appear to them as normal routers in the customer’s network.

Add a note hereOSPF is enabled on these routers on proper interfaces using the network command. The customer has to agree upon OSPF parameters (such as authentication) with the service provider (SP) to ensure connectivity. These parameters are often governed by the SP.

Add a note hereThe P-routers are hidden from the customer’s routers, and the customer edge (CE) routers are unaware of MPLS VPN. The internal topology of the Layer 3 MPLS backbone is therefore totally transparent to the customer. The PE routers receive IPv4 routing updates from the CE routers and install the updates in the appropriate VRF table. This part of the configuration and operation is the SP’s responsibility.

Add a note hereThe OSPF network type of the CE-PE link can be point to point, broadcast or NBMA.

Add a note here Adjacency Behavior for an NBMA Network

Add a note hereWhen a single interface interconnects multiple sites over an NBMA network, the network’s nonbroadcast nature can create reachability issues. NBMA networks can support more than two routers, but they have no inherent broadcast capability. To implement broadcasting or multicasting, the router replicates the packets to be broadcast or multicast and sends them individually on each permanent virtual circuit (PVC) to all destinations. This process is CPU and bandwidth intensive. If the NBMA topology is not fully meshed, a broadcast or multicast sent by one router does not reach all the other routers. Frame Relay, ATM, and X.25 are examples of NBMA networks.

Add a note hereThe default OSPF hello and dead intervals on NBMA interfaces are 30 seconds and 120 seconds, respectively.

Add a note hereThe following sections detail issues with DR elections in an NBMA topology, OSPF topology options in a Frame Relay network, OSPF modes for NBMA topologies, and how to configure OSPF in each of these modes.

DR Election in an NBMA Topology

Add a note here By default, OSPF cannot automatically build adjacencies with neighbor routers over NBMA interfaces.

Add a note hereOSPF considers the NBMA environment to function similarly to other multiaccess media such as Ethernet. However, NBMA networks are usually hub-and-spoke (star) topologies using PVCs or switched virtual circuits (SVCs). In these cases, the physical topology does not provide the multiaccess capability on which OSPF relies.

Add a note hereThe election of the DR becomes an issue in NBMA topologies because the DR and BDR need to have full Layer 2 connectivity with all routers in the NBMA network. The DR and BDR also need to have a list of all the other routers so that they can establish adjacencies.

OSPF over Frame Relay Topology Options

Add a note hereDepending on the network topology, several OSPF configuration choices are available for a Frame Relay network. By default, interfaces that support Frame Relay are multipoint connection types. With Frame Relay, remote sites interconnect in a variety of ways, as shown in Figure 3-19. The following examples are types of Frame Relay topologies:

Image from book
Add a note hereFigure 3-19: Frame Relay Topologies.
  • Add a note here Star topology— A star topology, also known as a hub-and-spoke configuration, is the most common Frame Relay network topology. In this topology, remote sites connect to a central site that generally provides a service or application. The star topology is the least expensive topology because it requires the fewest PVCs. The central router provides a multipoint connection because it typically uses a single interface to interconnect multiple PVCs.

  • Add a note here Full-mesh topology— In a full-mesh topology, all routers have virtual circuits (VCs) to all other destinations. This method, although costly, provides direct connections from each site to all other sites and allows for redundancy. As the number of nodes in the full-mesh topology increases, the topology becomes increasingly expensive. To calculate how many VCs are needed to implement a full-mesh topology, use the formula n(n 1)/2, where n is the number of nodes in the network.

  • Add a note here Partial-mesh topology— In a partial-mesh topology, not all sites have direct access to a central site. This method reduces the cost compared to implementing a full-mesh topology.

OSPF over NBMA Topology Modes of Operation

Add a note hereOSPF on Cisco routers can operate in various modes over NBMA networks. The choice of modes available depends on the topology of the NBMA network. Each mode has unique configuration requirements.

Add a note hereAs described in RFC 2328, the following are the two official modes for OSPF in NBMA topologies:

  • Add a note here Nonbroadcast— The nonbroadcast (NBMA) mode simulates the operation of OSPF in broadcast networks. Neighbors must be configured manually, and DR and BDR election is required. This configuration is typically used with full-mesh networks.

  • Add a note here Point-to-multipoint— Point-to-multipoint mode treats the nonbroadcast network as a collection of point-to-point links. In this environment, the routers automatically identify their neighboring routers but do not elect a DR and BDR. This configuration is typically used with partial-mesh networks.

Add a note hereThe choice between nonbroadcast and point-to-multipoint modes determines how the Hello protocol and flooding work over the nonbroadcast network.

Add a note hereThe main advantage of point-to-multipoint mode is that it requires less manual configuration. The main advantage of nonbroadcast mode is that there is less overhead traffic compared to point-to-multipoint mode.

Add a note hereIn addition, Cisco offers the following modes for OSPF operation in an NBMA network:

  • Add a note herePoint-to-multipoint nonbroadcast

  • Add a note hereBroadcast

  • Add a note herePoint-to-point

Selecting the OSPF Network Type for NBMA Networks

Add a note hereUse the ip ospf network {broadcast | non-broadcast | point-to-multipoint [non-broadcast] | point-to-point} interface configuration command to select the OSPF mode. Table 3-8 describes the parameters of this command, and the modes, in greater detail.

Add a note here Table 3-8: ip ospf network Command
Open table as spreadsheet

Add a note here Command Options

Add a note hereDescription

Add a note here broadcast

Add a note here(Cisco mode)

Add a note hereMakes the WAN interface appear to be a LAN.

Add a note hereOne IP subnet.

Add a note hereUses a multicast OSPF hello packet to automatically discover the neighbors.

Add a note hereDR and BDR are elected.

Add a note hereFull- or partial-mesh topology.

Add a note here non-broadcast

Add a note here(RFC-compliant mode)

Add a note hereOne IP subnet.

Add a note hereNeighbors must be manually configured.

Add a note hereDR and BDR are elected.

Add a note hereDR and BDR need to have full connectivity with all other routers.

Add a note hereTypically used in a full- or partial-mesh topology.

Add a note here point-to-multipoint

Add a note here(RFC-compliant mode)

Add a note hereOne IP subnet.

Add a note hereUses a multicast OSPF hello packet to automatically discover the neighbors.

Add a note hereDR and BDR are not required. The router sends additional LSAs with more information about neighboring routers.

Add a note hereTypically used in a partial-mesh or star topology.

Add a note here point-to-multipoint non-broadcast

Add a note here(Cisco mode)

Add a note hereIf multicast and broadcast are not enabled on the VCs, the RFC-compliant point-to-multipoint mode cannot be used, because the router cannot dynamically discover its neighboring routers using the hello multicast packets, so this Cisco mode should be used instead.

Add a note hereNeighbors must be manually configured.

Add a note hereDR and BDR election is not required.

Add a note here point-to-point

Add a note here(Cisco mode)

Add a note hereDifferent IP subnet on each subinterface.

Add a note hereNo DR or BDR election.

Add a note hereUsed when only two routers need to form an adjacency on a pair of interfaces.

Add a note hereInterfaces can be either LAN or WAN.

Add a note hereThe default OSPF modes are as follows:

  • Add a note hereThe default OSPF mode on a point-to-point Frame Relay subinterface is the point-to-point mode.

  • Add a note hereThe default OSPF mode on a Frame Relay multipoint subinterface is the nonbroadcast mode.

  • Add a note hereThe default OSPF mode on a main Frame Relay interface is also the nonbroadcast mode.

Add a note hereThe following sections detail the configuration of OSPF in each of these modes.

OSPF Configuration in Cisco Broadcast Mode

Add a note here Broadcast mode is a workaround for statically listing all existing neighboring routers. The interface is set to broadcast and behaves as though the router connects to a LAN. DR and BDR election is still performed. Therefore, take special care to ensure either a full-mesh topology or a static election of the DR based on the interface priority to ensure that the selected DR and BDR have full connectivity to all other neighbor routers.

Add a note here Example 3-12 shows a sample configuration of a Frame Relay router in a full-mesh topology, with the broadcast mode of operation defined.

Add a note here Example 3-12: Frame Relay Router in OSPF Broadcast Mode with Full-Mesh Topology

Add a note hereRouter(config)#interface serial 0/0/0
Router(config-if)#encapsulation frame-relay
Router(config-if)#ip ospf network broadcast

OSPF Nonbroadcast Mode Configuration

Add a note hereIn nonbroadcast mode, OSPF emulates operation over a broadcast network. A DR and BDR are elected for the NBMA network, and the DR originates an LSA for the network. In this environment, the routers are usually fully meshed to facilitate the establishment of adjacencies among them. If the routers are not fully meshed, the DR and BDR should be selected manually to ensure that the selected DR and BDR have full connectivity to all other neighbor routers. Neighboring routers are statically defined to start the DR/BDR election process. When using nonbroadcast mode, all routers are on one IP subnet.

Add a note hereFor flooding over a nonbroadcast interface, the LSU packet must be replicated for each PVC. The updates are sent to each of the interface’s neighboring routers, as defined in the neighbor table.

Add a note hereWhen few neighbors exist in the network, nonbroadcast mode is the most efficient way to run OSPF over NBMA networks because it has less overhead than point-to-multipoint mode.

Add a note hereAfter you enable the OSPF process for specific interfaces, you configure nonbroadcast mode by

  • Add a note hereManually configuring OSPF neighbors

  • Add a note hereDefining the OSPF network type as nonbroadcast (unless it is the default)

Add a note hereUse the neighbor ip-address [priority number] [poll-interval number] [cost number] [database-filter all] router configuration command to statically define adjacent relationships in NBMA networks using the nonbroadcast mode. Table 3-9 describes the parameters of this command in detail.

Add a note here Table 3-9: neighbor Command
Open table as spreadsheet

Add a note hereParameter

Add a note hereDescription

Add a note here ip-address

Add a note hereSpecifies the IP address of the neighboring router.

Add a note here priority number

Add a note here(Optional) Specifies priority of neighbor. The default is 0, which means that the neighboring router does not become the DR or BDR.

Add a note here poll-interval number

Add a note here(Optional) Specifies how long an NBMA interface waits before sending hellos to the neighbors even if the neighbor is inactive. The poll interval is defined in seconds.

Add a note here cost number

Add a note here(Optional) Assigns a cost to the neighbor in the form of an integer from 1 to 65535. Neighbors with no specific cost configured assume the cost of the interface based on the ip ospf cost command. For point-to-multipoint interfaces, the cost keyword and the number argument are the only options that are applicable. This keyword does not apply to nonbroadcast mode.

Add a note here database-filter all

Add a note here(Optional) Filters outgoing LSAs to an OSPF neighbor.


Note

Add a note hereYou cannot use the OSPF neighbor command to specify an OSPF neighbor on nonbroadcast networks within an OSPF VPN routing instance.

Add a note here Figure 3-20 shows an example of statically defining adjacencies. All three routers are using the default nonbroadcast mode on their Frame Relay interfaces, so neighboring routers must be manually configured on each. The priority parameter is set to 0 for Routers B and C to ensure that Router A becomes the DR. Only Router A has full connectivity to the other two routers because the topology is not a full-mesh. No BDR will be elected in this case.

Click to collapse
Add a note hereFigure 3-20: Using the neighbor Command in Nonbroadcast Mode.

Note

Add a note here The default priority on the neighbor command is supposed to be 0. However, during testing it was noted that configuring the priority in this way for nonbroadcast mode interfaces actually resulted in a priority of 1, not 0. Setting the OSPF priority to 0 at the interface level (with the ip ospf priority command) on Routers B and C did result in a priority of 0 and the routers not being elected as DR or BDR.

Add a note hereIn nonbroadcast mode, neighbor statements are required only on the DR and BDR. In a hub-and-spoke topology, neighbor statements must be placed on the hub, which must be configured to become the DR by being assigned a higher priority. Neighbor statements are not mandatory on the spoke routers. In a full-mesh NBMA topology, you might need neighbor statements on all routers unless the DR and BDR are statically configured using the ip ospf priority command.

Add a note hereThe show ip ospf neighbor command displays OSPF neighbor information on a per-interface basis, as described earlier in the “Verifying OSPF Operations” section. Example 3-13 demonstrates sample output from the show ip ospf neighbor command for Router A in Figure 3-20 (with the OSPF priorities of Routers B and C set to 0 at the interface level, as noted). Router A has a serial Frame Relay interface and a Fast Ethernet interface. The Serial 0/0/0 interface on this router has two neighbors; both have a state of FULL/DROTHER. DROTHER means that the neighboring router is not a DR or BDR (because Router A is the DR and there is no BDR in this network). The neighbor learned on Fast Ethernet 0/0 has a state of FULL/BDR, which means that it has successfully exchanged LSDB information with the router issuing the show command, and that it is the BDR.

Add a note here Example 3-13: show ip ospf neighbor Output for Router A in Figure 3-20

Add a note hereRouterA#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
192.168.1.3 0 FULL/DROTHER 00:01:57 192.168.1.3 Serial0/0/0
192.168.1.2 0 FULL/DROTHER 00:01:33 192.168.1.2 Serial0/0/0
172.16.1.1 1 FULL/BDR 00:00:34 172.16.1.1 FastEthernet0/0

OSPF Configuration in Point-to-Multipoint Mode

Add a note hereNetworks in RFC 2328-compliant point-to-multipoint mode are designed to work with partial-mesh or star topologies. In point-to-multipoint mode, OSPF treats all router-to-router connections over the nonbroadcast network as if they are point-to-point links.

Add a note hereIn point-to-multipoint mode, DRs are not used, and a type 2 network LSA is not flooded to adjacent routers. (The “Understanding OSPF LSAs” section, later in this chapter, covers the different types of LSAs in greater detail.) Instead, OSPF point-to-multipoint works by exchanging additional LSUs that are designed to automatically discover neighboring routers and add them to the neighbor table.

Add a note hereIn large networks, using point-to-multipoint mode reduces the number of PVCs required for complete connectivity, because you are not required to have a full-mesh topology. In addition, not having a full-mesh topology reduces the number of neighbor entries in the neighborship table.

Add a note here Point-to-multipoint mode has the following properties:

  • Add a note here Does not require a full-mesh network— This environment allows routing to occur between two routers that are not directly connected but that are connected through a router that has VCs to each of the two routers. All three routers connected to the Frame Relay network in Figure 3-21 could be configured for point-to-multipoint mode.

    Add a note here Image from book
    Add a note hereFigure 3-21: Using OSPF Point-to-Multipoint Mode.

  • Add a note here Does not require a static neighbor configuration— In nonbroadcast mode, neighboring routers are statically defined to start the DR election process, and allow the exchange of routing updates. However, because point-to-multipoint mode treats the network as a collection of point-to-point links, multicast hello packets discover neighboring routers dynamically. Statically configuring neighboring routers is not necessary.

  • Add a note here Uses one IP subnet— As in nonbroadcast mode, when using point-to-multipoint mode, all routers are on one IP subnet.

  • Add a note here Duplicates LSA packets— Also as in nonbroadcast mode, when flooding out a nonbroadcast interface in point-to-multipoint mode, the router must replicate the LSU. The LSU packet is sent to each of the interface’s neighboring routers, as defined in the neighbor table.

Add a note here Example 3-14 shows partial configurations of routers A and C in Figure 3-21 in point-to-multipoint mode. This configuration does not require subinterfaces and uses only a single subnet. In point-to-multipoint mode, a DR or BDR is not required, so DR and BDR election and priorities are not a concern.

Add a note here Example 3-14: Point-to-Multipoint Configuration for Routers A and C in Figure 3-21

Add a note hereRouterA(config)#interface Serial0/0/0
RouterA(config-if)#ip address 192.168.1.1 255.255.255.0
RouterA(config-if)#encapsulation frame-relay
RouterA(config-if)#ip ospf network point-to-multipoint

RouterA(config)#router ospf 100
RouterA(config-router)#log-adjacency-changes
RouterA(config-router)#network 172.16.0.0 0.0.255.255 area 0
RouterA(config-router)#network 192.168.1.0 0.0.0.255 area 0

RouterC(config)#interface Serial0/0/0
RouterC(config-if)#ip address 192.168.1.3 255.255.255.0
RouterC(config-if)#encapsulation frame-relay
RouterC(config-if)#ip ospf network point-to-multipoint

RouterC(config)#router ospf 100
RouterC(config-router)#log-adjacency-changes
RouterC(config-router)#network 192.168.1.0 0.0.0.255 area 0

Add a note here Example 3-15 demonstrates output from the show ip ospf interface command, which displays key OSPF details for each interface. This sample output is from Router A in Figure 3-21.

Add a note here Example 3-15: show ip ospf interface Output from Router A in Figure 3-21

Add a note hereRouterA#show ip ospf interface s0/0/0
Serial0/0/0 is up, line protocol is up
Internet Address 192.168.1.1/24, Area 0
Process ID 100, Router ID 192.168.1.1, Network Type POINT_TO_MULTIPOINT, Cost:
781
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
oob-resync timeout 120
Hello due in 00:00:26
Supports Link-local Signaling (LLS)
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 192.168.1.3
Adjacent with neighbor 192.168.1.2
Suppress hello for 0 neighbor(s)
RouterA#

Add a note hereThe OSPF network type, area number, cost, and state of the interface are all displayed. The hello interval for a point-to-multipoint interface is 30 seconds and the dead interval is 120 seconds. Point-to-multipoint mode, point-to-multipoint nonbroadcast mode, and nonbroadcast mode default to a 30-second hello timer, while point-to-point mode and broadcast mode default to a 10-second hello timer. Recall that the hello and dead timers on the neighboring interfaces must match for the neighbors to form successful adjacencies.

Add a note here The listed adjacent neighboring routers are all dynamically learned.

OSPF Configuration in Cisco Point-to-Multipoint Nonbroadcast Mode

Add a note herePoint-to-multipoint nonbroadcast mode is a Cisco extension of the RFC-compliant point-to-multipoint mode. You must statically define neighbors, and you can modify the cost of the link to the neighboring router to reflect the different bandwidths of each link. The RFC point-to-multipoint mode was developed to support underlying point-to-multipoint VCs that support multicast and broadcast. If multicast and broadcast are not enabled on the VCs, RFC-compliant point-to-multipoint mode cannot be used because the router cannot dynamically discover its neighboring routers using the hello multicast packets. In this case, the Cisco point-to-multipoint nonbroadcast mode should be used instead.

Add a note hereIn point-to-multipoint nonbroadcast mode, you must statically define neighbors, like in nonbroadcast mode. As in point-to-multipoint mode, DRs and BDRs are not elected.

Using Subinterfaces in OSPF over Frame Relay Configuration

Add a note hereOSPF can also be run over subinterfaces. This section first describes subinterfaces and how to configure them, and then describes OSPF operation over subinterfaces.

Add a note hereA physical interface can be split into multiple logical interfaces called subinterfaces. Subinterfaces were originally created to better handle issues caused by split horizon over NBMA for distance vector-based routing protocols. Each subinterface requires an IP subnet.

Add a note hereEach subinterface is defined as either a point-to-point or multipoint interface. A point-to-point subinterface has similar properties to a physical point-to-point interface.

Add a note hereDefine subinterfaces using the interface serial number.subinterface-number {multipoint | point-to-point} global configuration command. Table 3-10 lists the parameters of this command.

Add a note here Table 3-10: interface serial Command Parameters
Open table as spreadsheet

Add a note hereParameter

Add a note hereDescription

Add a note here number.subinterface-number

Add a note hereSpecifies the interface number and subinterface number. The subinterface number is in the range of 1 to 4294967293.

Add a note hereThe interface number that precedes the period (.) is the interface number to which this subinterface belongs.

Add a note here multipoint

Add a note hereSpecifies that the subinterface is multipoint. On multipoint subinterfaces routing IP, all routers are in the same subnet.

Add a note here point-to-point

Add a note hereSpecifies that the subinterface is point-to-point. On point-to-point subinterfaces routing IP, each pair of point-to-point routers is in its own subnet.

Add a note hereThe choice of point-to-point or multipoint keywords affects the OSPF operation, as described in the sections that follow.

Add a note hereIt is important to remember that OSPF defaults to point-to-point mode on point-to-point subinterfaces, and to nonbroadcast mode on the multipoint subinterfaces.

OSPF over Point-to-Point Subinterfaces

Add a note here When point-to-point subinterfaces are configured, each virtual circuit (PVC and SVC) gets its own subinterface. A point-to-point subinterface has the properties of any physical point-to-point interface: there is no DR or BDR and neighbor discovery is automatic, so neighbors do not need to be configured.

Add a note herePoint-to-point mode is used when only two nodes exist on the NBMA network. This mode is typically used only with point-to-point subinterfaces. Each point-to-point connection is one IP subnet. An adjacency forms over the point-to-point network with no DR or BDR election.

Add a note hereIn the example in Figure 3-22 and the configurations in Example 3-16, Router A’s serial 0/0/0 interface is configured with point-to-point subinterfaces. Although all three routers on the Frame Relay network have only one physical serial port, Router A appears to have two logical ports. Each logical port (subinterface) has its own IP address and operates in OSPF point-to-point mode. Each subinterface is on its own IP subnet. Router B’s configuration is also presented in Example 3-16.

Image from book
Add a note hereFigure 3-22: OSPF Point-to-Point Subinterface Example.
Add a note here Example 3-16: Point-to-Point Subinterface Configuration for Routers A and B in Figure 3-22

Add a note hereRouterA#
interface Serial0/0/0
no ip address
encapsulation frame-relay
!
interface Serial0/0/0.1 point-to-point
ip address 192.168.1.1 255.255.255.0
frame-relay interface-dlci 121
interface Serial0/0/0.2 point-to-point
ip address 192.168.2.1 255.255.255.0
frame-relay interface-dlci 132


RouterB#
interface Serial0/0/0
no ip address
encapsulation frame-relay
!
interface Serial0/0/0.1 point-to-point
ip address 192.168.1.2 255.255.255.0
frame-relay interface-dlci 122

OSPF over Multipoint Subinterfaces

Add a note here When multipoint subinterfaces are configured, multiple virtual circuits (PVCs or SVCs) exist on a single subinterface. Multipoint Frame Relay subinterfaces default to OSPF nonbroadcast mode, which requires neighbors to be statically configured and a DR and BDR election.

Add a note hereIn the example in Figure 3-23 and partial configuration in Example 3-17, Router A has one point-to-point subinterface and one multipoint subinterface. The multipoint subinterface supports two other routers in a single subnet. The configuration for Routers B and C are also presented in Example 3-17. Router D’s configuration is similar to Router C’s configuration.

Click to collapse
Add a note hereFigure 3-23: Multipoint Subinterface Example.
Add a note here Example 3-17: Point-to-Point Subinterface Configuration for Routers A, B, and C in Figure 3-23

Add a note hereRouterA#
interface Serial0/0/0.1 point-to-point
ip address 192.168.1.1 255.255.255.0

interface Serial0/0/0.2 multipoint
ip address 192.168.2.1 255.255.255.0

router ospf 100
network 192.168.0.0 0.0.255.255 area 0
neighbor 192.168.2.2 priority 0
neighbor 192.168.2.3 priority 0

RouterB#
interface Serial0/0/0
ip address 192.168.1.2 255.255.255.0


RouterC#
interface Serial0/0/0
ip address 192.168.2.2 255.255.255.0
ip ospf priority 3

router ospf 100
network 192.168.0.0 0.0.255.255 area 0

OSPF Configuration in Cisco Point-to-Point Mode

Add a note here Although the Cisco point-to-point mode is typically used only with point-to-point subinterfaces, it can also be used when a single PVC exists on a serial interface and point-to-point behavior is desired. In this mode, the PVC emulates a leased line. Because they are treated as point-to-point links, DR and BDR are not used, and only a single subnet is used on each point-to-point link.


Note

Add a note hereThe Cisco point-to-point mode may also be used on other interface types. For example, when the ip ospf network point-to-point command is used on point-to-point Ethernet links, no DR or BDR is elected.


Note

Add a note here Recall that, by default, OSPF advertises loopback interface addresses as /32 host routes. If the ip ospf network point-to-point command is configured on a loopback interface, OSPF advertises the actual loopback subnet mask, instead of a /32 host route.

Add a note here Figure 3-24 and the partial configurations of routers A and B in Example 3-18 illustrate the use of point-to-point mode. Subinterfaces are not used, and only a single subnet is used. Because the default OSPF mode on a Frame Relay main interface is nonbroadcast mode, it is necessary to configure the ip ospf network point-to-point command.

Click to collapse
Add a note hereFigure 3-24: Network for Point-to-Point Configuration Example.
Add a note here Example 3-18: Point-to-Point Configuration for Routers A and B in Figure 3-24

Add a note hereRouterA#
interface Serial0/0/0
ip address 192.168.1.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-point

router ospf 100
network 172.16.0.0 0.0.255.255 area 0
network 192.168.0.0 0.0.255.255 area 0

RouterB#
interface Serial0/0/0
ip address 192.168.1.2 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-point

OSPF over NBMA Modes of Operation Summary

Add a note here Table 3-11 briefly compares the different modes of operation for OSPF.

Add a note here Table 3-11: OSPF Mode Summary
Open table as spreadsheet

Add a note here OSPF Mode

Add a note hereNBMA Preferred Topology

Add a note hereSubnet Address

Add a note hereHello Timer

Add a note hereAdjacency

Add a note hereRFC or Cisco

Add a note hereExample

Add a note hereBroadcast

Add a note hereFull or partial mesh

Add a note hereSame

Add a note here10 sec

Add a note hereAutomatic DR/BDR elected

Add a note hereCisco

Add a note hereLAN interface such as Ethernet

Add a note hereNonbroadcast (NBMA)

Add a note hereFull or partial mesh

Add a note hereSame

Add a note here30 sec

Add a note hereManual configuration DR/BDR elected

Add a note hereRFC

Add a note hereFrame Relay configured on a serial interface

Add a note herePoint-to-multipoint

Add a note herePartial mesh or star

Add a note hereSame

Add a note here30 sec

Add a note hereAutomatic No DR/BDR

Add a note hereRFC

Add a note hereOSPF over Frame Relay mode that eliminates the need for a DR; used when VCs support multicast and broadcast

Add a note herePoint-to-multipoint nonbroadcast

Add a note herePartial mesh or star

Add a note hereSame

Add a note here30 sec

Add a note hereManual configuration No DR/BDR

Add a note hereCisco

Add a note hereOSPF over Frame Relay mode that eliminates the need for a DR; used when VCs do not support multicast and broadcast

Add a note herePoint-to-point

Add a note herePartial mesh or star, using subinterfaces

Add a note hereDifferent for each subinterface

Add a note here10 sec

Add a note hereAutomatic No DR/BDR

Add a note hereCisco

Add a note hereSerial interface with point-to-point subinterfaces

Add a note here Displaying OSPF Adjacency Activity

Add a note hereUse the debug ip ospf adj command to track OSPF adjacencies as they go up or down. Debugging enables you to see exactly which OSPF packets are being sent between routers. The ability to see packets as they are sent over a link is an invaluable tool to the troubleshooter.


Note

Add a note hereThe last parameter in this command is adj, not adjacency.

Add a note hereThe debug output in Example 3-19 illustrates the activity on a serial interface in point-to-point mode. No DR/BDR election occurs. However, the adjacency forms, allowing DBD packets to be sent during the exchange process. Notice that the neighbor relationship passes through the two-way phase and into the exchange phase. After database description packets are sent between routers, the neighbors move into the final state, FULL adjacency.

Add a note here Example 3-19: debug ip ospf adj Command Output for a Point-to-Point Serial Link

Add a note hereRouterA# debug ip ospf adj
OSPF: Interface Serial0/0/0.1 going Up
OSPF: Build router LSA for area 0, router ID 192.168.1.1, seq 0x80000023
OSPF: Rcv DBD from 192.168.1.2 on Serial0/0/0.1 seq 0xCF0 opt 0x52 flag 0x7 len
32 mtu 1500 state INIT
OSPF: 2 Way Communication to 192.168.1.2 on Serial0/0/0.1, state 2WAY
OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xF4D opt 0x52 flag 0x7 len
32
OSPF: NBR Negotiation Done. We are the SLAVE
OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xCF0 opt 0x52 flag 0x2 len
132
OSPF: Rcv DBD from 192.168.1.2 on Serial0/0/0.1 seq 0xCF1 opt 0x52 flag 0x3 len
132 mtu 1500 state EXCHANGE
OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xCF1 opt 0x52 flag 0x0 len
32
OSPF: Database request to 192.168.1.2
OSPF: sent LS REQ packet to 192.168.1.2, length 12
OSPF: Rcv DBD from 192.168.1.2 on Serial0/0/0.1 seq 0xCF2 opt 0x52 flag 0x1 len
32 mtu 1500 state EXCHANGE
OSPF: Exchange Done with 192.168.1.2 on Serial0/0/0.1
OSPF: Send DBD to 192.168.1.2 on Serial0/0/0.1 seq 0xCF2 opt 0x52 flag 0x0 len
32
OSPF: Synchronized with 192.168.1.2 on Serial0/0/0.1, state FULL
%OSPF-5-ADJCHG: Process 100, Nbr 192.168.1.2 on Serial0/0/0.1 from LOADING to
FULL, Loading Done
OSPF: Build router LSA for area 0, router ID 192.168.1.1, seq 0x80000024

Add a note here The debug output in Example 3-20 demonstrates the DR/BDR election process on a Fast Ethernet interface. The OSPF default behavior on a Fast Ethernet link is broadcast mode. First, the DR and BDR are selected, and then the exchange process occurs.

Add a note here Example 3-20: debug ip ospf adj Command Output for a Fast Ethernet Link

Add a note hereRouterA#debug ip ospf adj
OSPF: Interface FastEthernet0/0 going Up
OSPF: Build router LSA for area 0, router ID 192.168.1.1,seq 0x80000008
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
OSPF: 2 Way Communication to 172.16.1.1 on FastEthernet0/0, state 2WAY
OSPF: end of Wait on interface FastEthernet0/0
OSPF: DR/BDR election on FastEthernet0/0
OSPF: Elect BDR 192.168.1.1
OSPF: Elect DR 192.168.1.1
OSPF: Elect BDR 172.16.1.1
OSPF: Elect DR 192.168.1.1
DR: 192.168.1.1 (Id) BDR: 172.16.1.1 (Id)
OSPF: Send DBD to 172.16.1.1 on FastEthernet0/0 seq 0xDCE opt 0x52 flag 0x7 len 32
OSPF: No full nbrs to build Net Lsa for interface FastEthernet0/0
OSPF: Neighbor change Event on interface FastEthernet0/0
OSPF: DR/BDR election on FastEthernet0/0
OSPF: Elect BDR 172.16.1.1
OSPF: Elect DR 192.168.1.1
DR: 192.168.1.1 (Id) BDR: 172.16.1.1 (Id)
OSPF: Neighbor change Event on interface FastEthernet0/0
OSPF: DR/BDR election on FastEthernet0/0
OSPF: Elect BDR 172.16.1.1
OSPF: Elect DR 192.168.1.1
DR: 192.168.1.1 (Id) BDR: 172.16.1.1 (Id)
OSPF: Rcv DBD from 172.16.1.1 on FastEthernet0/0 seq 0x14B 7 opt 0x52 flag 0x7
len 32 mtu 1500 state EXSTART
OSPF: First DBD and we are not SLAVE-if)#
OSPF: Send DBD to 172.16.1.1 on FastEthernet0/0 seq 0xDCE opt 0x52 flag 0x7 len 32
OSPF: Retransmitting DBD to 172.16.1.1 on FastEthernet0/0[1]
OSPF: Rcv DBD from 172.16.1.1 on FastEthernet0/0 seq 0xDCE opt 0x52 flag 0x2 len
152 mtu 1500 state EXSTART
OSPF: NBR Negotiation Done. We are the MASTER
OSPF: Send DBD to 172.16.1.1 on FastEthernet0/0 seq 0xDCF opt 0x52 flag 0x3 len 132
OSPF: Database request to 172.16.1.1
OSPF: sent LS REQ packet to 172.16.1.1, length 24
OSPF: Rcv DBD from 172.16.1.1 on FastEthernet0/0 seq 0xDCF opt 0x52 flag 0x0 len
32 mtu 1500 state EXCHANGE
OSPF: Send DBD to 172.16.1.1 on FastEthernet0/0 seq 0xDD0
opt 0x52 flag 0x1 len 32
OSPF: No full nbrs to build Net Lsa for interface FastEthernet0/0
OSPF: Build network LSA for FastEthernet0/0, router ID 192.168.1.1
OSPF: Build network LSA for FastEthernet0/0, router ID 192.168.1.1
OSPF: Rcv DBD from 172.16.1.1 on FastEthernet0/0 seq 0xDD0 opt 0x52 flag 0x0 len
32 mtu 1500 state EXCHANGE
OSPF: Exchange Done with 172.16.1.1 on FastEthernet0/0
OSPF: Synchronized with 172.16.1.1 on FastEthernet0/0, state FULL
%OSPF-5-ADJCHG: Process 100, Nbr 172.16.1.1 on FastEthernet0/0 from LOADING to
FULL, Loading Done
OSPF: Build router LSA for area 0, router ID 192.168.1.1, seq 0x80000009
OSPF: Build network LSA for FastEthernet0/0, router ID 192.168.1.1Router(config-
if)# ip virtual-reassembly
OSPF: Build network LSA for FastEthernet0/0, router ID 192.168.1.1


0 comments

Post a Comment