This document shows two Open Shortest Path First (OSPF) routers connected in a multi-access network.
There are no specific requirements for this document.
This document is not restricted to specific software and hardware versions.
For more information on document conventions, see the Cisco Technical Tips Conventions.
In this section, you are presented with the information to configure the features described in this document.
Note: To find additional information on the commands used in this document, use the Command Lookup Tool (registered customers only) .
This document uses the network setup shown in this diagram.
This document uses the configurations shown here.
Router 1.1.1.1 |
---|
Current configuration: hostname r1.1.1.1 interface Loopback0 ip address 1.1.1.1 255.0.0.0 interface Ethernet2/0/0 ip address 4.0.0.1 255.0.0.0 interface Ethernet2/0/2 ip address 5.0.0.1 255.0.0.0 router ospf 1 network 4.0.0.0 0.255.255.255 area 0 network 5.0.0.0 0.255.255.255 area 0 end |
Router 2.2.2.2 |
---|
Current configuration: hostname r2.2.2.2 interface Loopback0 ip address 2.2.2.2 255.0.0.0 interface Ethernet0/0/4 ip address 6.0.0.2 255.0.0.0 interface Ethernet0/0/2 ip address 5.0.0.2 255.0.0.0 router ospf 2 network 6.0.0.0 0.255.255.255 area 0 network 5.0.0.0 0.255.255.255 area 0 end |
This section provides information you can use to confirm your configuration is working properly.
Certain show commands are supported by the Output Interpreter Tool (registered customers only) , which allows you to view an analysis of show command output.
show ip ospf database —Displays a list of the Link State Advertisements (LSAs) and types them into a link state database. This list shows only the information in the LSA header.
show ip ospf database [router] [link-state-id]—Displays a list of all of a router's LSAs in the database. LSAs are produced by every router, and these fundamental LSAs list all of the routers' links, or interfaces, along with the states and outgoing costs of the links. They are flooded only within the area in which they originate.
To see how the OSPF database looks given this network environment, look at the output of the show ip ospf database command.
r2.2.2.2#show ip ospf database OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 107 0x80000018 0x7966 2 2.2.2.2 2.2.2.2 106 0x80000015 0x6770 2 Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 5.0.0.2 2.2.2.2 102 0x80000004 0x7E9D r2.2.2.2#show ip ospf database router 1.1.1.1 OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) LS age: 147 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 1.1.1.1 !--- For router links, the Link State Id is always the !--- same as the Advertising Router. Advertising Router: 1.1.1.1 !--- This is the router ID of the router that created !--- this LSA. LS Seq Number: 80000018 Checksum: 0x7966 Length: 48 Number of Links: 2 Link connected to: a Transit Network !--- This router (1.1.1.1) has a link connected to !--- a transit network that has a designated router (DR) !--- and backup designated router (BDR) listed here. (Link ID) Designated Router address: 5.0.0.2 !--- The DR's interface IP address is 5.0.0.2. (Link Data) Router Interface address: 5.0.0.1 !--- This router's (1.1.1.1) interface address !--- connected to the DR is 5.0.0.1. Number of TOS metrics: 0 TOS 0 Metrics: 10 !--- The OSPF cost of the link is 10. Link connected to: a Stub Network !--- This represents the subnet of the Ethernet segment !--- 4.0.0.0/8. (Link ID) Network/subnet number: 4.0.0.0 (Link Data) Network Mask: 255.0.0.0 Number of TOS metrics: 0 TOS 0 Metrics: 10 !--- The cost of the link is 10. r2.2.2.2#show ip ospf database router 2.2.2.2 OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) LS age: 162 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 2.2.2.2 Advertising Router: 2.2.2.2 LS Seq Number: 80000015 Checksum: 0x6770 Length: 48 Number of Links: 2 Link connected to: a Transit Network (Link ID) Designated Router address: 5.0.0.2 !--- The DR's interface IP address is 5.0.0.2. (Link Data) Router Interface address: 5.0.0.2 !--- Since these values are equal, router !--- (2.2.2.2) is the DR. Number of TOS metrics: 0 TOS 0 Metrics: 10 Link connected to: a Stub Network (Link ID) Network/subnet number: 6.0.0.0 (Link Data) Network Mask: 255.0.0.0 Number of TOS metrics: 0 TOS 0 Metrics: 10 r2.2.2.2#show ip ospf database network 5.0.0.2 OSPF Router with ID (2.2.2.2) (Process ID 2) Net Link States (Area 0) Routing Bit Set on this LSA LS age: 182 Options: (No TOS-capability, DC) LS Type: Network Links Link State ID: 5.0.0.2 (address of Designated Router) !--- This is the IP address of the DR !--- (not the router ID). Advertising Router: 2.2.2.2 !--- This is the router ID of the router that !--- created this LSA. LS Seq Number: 80000004 Checksum: 0x7E9D Length: 32 Network Mask: /8 !--- Binary and the DR's interface address with the !--- mask to get to network 5.0.0.0/8. Attached Router: 2.2.2.2 !--- The DR's router ID, along with a list of routers !--- adjacent on the transit network. Attached Router: 1.1.1.1
This section calculates the shortest path tree from the perspective of Router 1.1.1.1.
Router 1.1.1.1 looks in its own LSA and sees that it has a link to a transit network for which 5.0.0.2 is the DR's interface address. It then looks for the network LSA with a link state ID of 5.0.0.2. It finds a list of attached routers (Routers 1.1.1.1 and 2.2.2.2) in the network LSA. This implies that all these routers are reachable through this transit network. Router 1.1.1.1 can verify that its own ID is in the list. It then can calculate routes through any of these attached routers.
Router 1.1.1.1 looks for Router 2.2.2.2's LSA to verify that it contains a link connected to the same transit network, 5.0.0.2. Router 1.1.1.1 can now install routes for any stub networks in Router 2.2.2.2's LSA.
Router 1.1.1.1 installs a route for network 6.0.0.0/8 in its routing table because 6.0.0.0/8 was listed as a stub network in its LSA.
r1.1.1.1#show ip route ospf O 6.0.0.0/8 [110/20] via 5.0.0.2, 00:03:35, Ethernet2/0/2 r2.2.2.2#show ip route ospf O 4.0.0.0/8 [110/20] via 5.0.0.1, 00:03:18, Ethernet0/0/2
The OSPF link-state database looks identical if it is a broadcast network or a non-broadcast network. The main difference is the neighbor discovery mechanism. In a broadcast network, neighbors are discovered through multicast hello packets. In a non-broadcast network, neighbors are statically configured and unicast hello packets are sent to form adjacency between neighbors.
To explore the issue of the next hop in a nonbroadcast multiaccess (NBMA) network, look at this example. There are three routers on a transit network (Routers non_DR_a, non_DR_b, and DR). It is a hub and spoke topology on an NBMA media such as Frame Relay, Asynchronous Transfer Mode (ATM), or X.25.
When Router non_DR_a calculates routes through Router non_DR_b, it makes Router non_DR_b the next hop. However, Router non_DR_a does not have a virtual circuit (VC) to Router non_DR_b, which means these routers cannot ping each other. OSPF installs routes into the routing table with a next-hop that cannot be reached.
The solution to this problem is to add a second frame-relay map statement to make all the neighbors reachable through the VC going to Router DR. For example:
interface Serial0 frame-relay map ip 1.1.1.1 700 broadcast !--- This is a map for the DR. frame-relay map ip 1.1.1.2 700 broadcast !--- This is a map on the same VC data-link connection !--- identifier (DLCI) for a non-DR router.
When you compare this behavior with that of the Intermediate System-to-Intermediate System (ISIS) protocol, a router does not install an ISIS route through a next hop, unless the next hop is a neighbor. This means ISIS does not work on a multi-point interface unless the routers are fully meshed.
OSPF installs routes even though the next hop is not a neighbor, and is not reachable through Layer 2. However, you can fix this problem by configuring multiple map statements.
There is currently no specific troubleshooting information available for this configuration.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
10-Aug-2005 |
Initial Release |