This configuration guide describes the configuration options available for OSPF running on Compatible Systems routers.
OSPF (Open Shortest Path First) is classified as an Interior Gateway Protocol (IGP). This means that it distributes routing information between routers belonging to a single Autonomous System. The OSPF protocol is based on link-state or SPF technology.
In a link-state routing protocol, each router maintains a database describing the Autonomous System's topology. This database is referred to as the link-state database. Each participating router has an identical database. Each individual piece of this database is a particular router's local state (e.g., the router's usable interfaces and reachable neighbors). The router distributes its local state throughout the Autonomous System by flooding.
There are no specific requirements for this document.
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Refer to the Cisco Technical Tips Conventions for more information on document conventions.
OSPF can be enabled on Compatible routers with at least 2 Megabytes of memory, except the following models: RR3000, RR3400, RR3800, and the 900i. A router will not start up OSPF if it detects insufficient memory; if you have a console screen running, you will see a message during the startup procedure:
"Could not allocate OSPF memory, OSPF not enabled"
If OSPF does not come up as expected, issuing the console command "show ospf config" will display an error message indicating a configuration error which prevented OSPF from being enabled.
If OSPF is enabled but the router is not establishing adjacencies with other OSPF routers on the network, check the "show ospf stats" packet statistics for errors such as mismatched Hello Intervals or mismatched Area ID's.
Running OSPF with all the defaults is very simple: just go to the IP Ethernet or IP Wan configuration section for the interface on which you wish to enable OSPF and set:
OSPFenabled = on
Do this for each IP interface on which you want to run OSPF, and you are done. The router will automatically be in the Backbone Area, Area 0, on each interface. It is necessary to add configuration information for an interface to be assigned to a non-backbone area.
In this section, you are presented with the information to configure the features described in this document.
[ IP Ethernet or IP Wan ] OSPFenabled = Off "options are Off, On, or Passive" OSPFAreaID = 0 "OSPF Area this interface is assigned to" OSPFcost = 10 "OSPF cost for this interface" OSPFRtrPri = 1 "OSPF Router Priority, 0 is no DR" AuthKey = "" "OSPF Authentication Password, max 8 characters" RetransInterval = 5 "OSPF Retransmit interval in seconds for LSA's" Transdelay = 1 "OSPF Transmit delay interval in seconds" HelloInterval = 10 "OSPF Hello interval in seconds" RtrDeadInterval = 40 "OSPF Router declared down interval in seconds"
The values given in the above example are the defaults for a LAN network. Some defaults are different for WAN interfaces; for example, the default HelloInterval is 30 seconds.
The configuration to run OSPF with the backbone area (Area 0) is very simple: just enable OSPF on the desired interface:
OSPFenabled = on
The options for OSPFenabled are Off, On, or Passive. The difference between On and Passive is that OSPF will not send out Hello packets on a Passive interface, and thus will not establish any adjacencies with other routers on that network, even if they are running OSPF. It will, however, advertise that network's IP address on its other interfaces.
It is important to note that if OSPF is Off on an interface, that interface's network is not advertised into OSPF. Use
OSPFenabled = passive
in order to get a non-OSPF interface advertised into OSPF.
For instance, if you are running RIP on Ethernet 3, but you want OSPF to advertise the network 220.127.116.11 into OSPF, you would configure Ethernet 3 as follows:
[ IP Ethernet 3 ] Mode = Routed IPAddress= 18.104.22.168 SubnetMask = 255.0.0.0 OSPFenabled = Passive OSPFAreaID = 1 RIPOut = On RIPIn= On RIPVersion = V2
Note that all passive interfaces must also be associated with an OSPF area. If the router is on the backbone, no area id need be supplied for the passive interface, since Area 0 is assumed for each interface for which an AreaID has not been supplied. However, if the router is not on the backbone, an AreaID must be supplied to make sure the network is advertised properly. The AreaID can be the same as any one of the interfaces on which OSPF is active.
The default OSPFAreaID is 0, which is referred to as the Backbone Area in OSPF-speak. The OSPF protocol calls for Area ID's to be numbers, not character strings, so you must enter either a decimal number, or a number in IP Address format.
To run OSPF with a non-backbone (nonzero) area, the parameter OSPFAreaID must be set.
Some examples of valid and non-valid Area ID's:
Some good area id's: ======================== OSPFAreaID = 1 OSPFAreaID = 0.0.0.1 OSPFAreaID = 22.214.171.124 OSPFAreaID = 126.96.36.199 ======================== Some invalid area id's: ======================== OSPFAreaID = "MY_ID" OSPFAreaID = "xyz_router" ========================
Note: All routers which share a network must have the same area id. If your router has a different area id than the other ones on the network, it will not be able to establish adjacencies with the other routers.
In the example, Router 1's Ethernet 0 (E0) interface is assigned OSPFAreaID = 0, and its Ethernet 1 (E1) interface is assigned OSPFAreaID = 1. All routers which share LAN 0 with Router 1 must also be assigned OSPFAreaID = 0 on whichever interface is connected to that LAN.
LAN 0 ________________________________________________________ | | | | | | | Area 0 Area 0 | Area 0 | +-----------+ +-----------+ +-----------+ | E0 | | E1 | Area 2 | E0 | | Router 1 | | Router 2 |--------------------| E1 | | E1 | | E0 | | Area 2 | Router 3 | +-----------+ +-----------+ | +-----------+ | Area 1 | Area 1 | | | | | LAN 1 | | LAN 2 |_____________________| | | | | | | | | Area 1 | Area 1 | Area 2 +-----------+ +-----------+ +-----------+ | E1 | | E0 | | E2 | | Router 4 | | Router 5 | | Router 6 | | | | | | | +-----------+ +-----------+ +-----------+
Also note that each non-backbone (non-zero) Area must be adjacent to the backbone. The following configuration is NOT valid unless you configure a virtual link for Area 2 (see OSPF Virtual Link Configuration section).
_______________________ | LAN 0 | | | | Area 0 Area 0 | +-----------+ +-----------+ | | | | | Router 1 | | Router 2 | | | | | +-----------+ +-----------+ | Area 1 | LAN 1 +-----------+ | | | Router 4 | | | +-----------+ | Area 2 | LAN 2 +-----------+ | | | Router 4 | | | +-----------+
The OSPFcost is the way to establish priority for one particular path over another path. An OSPF router will choose the gateway with the lowest cost to enter into its routing table. To give preference to a path, set a lower cost on that interface.
The OSPF router priority is only used on multi-access networks such as LAN's. This establishes whether the router is eligible to become the Designated Router (DR) for the LAN. A priority of 0 means that the router is not eligible to become DR. The router with the highest priority becomes the DR. (Note, however, that if the router with the highest priority comes up after a DR has already been established on a network, the DR will not change.) The default priority is 1; if all routers have the same priority, they will negotiate with each other for the DR election. At least one router on a LAN must have a priority greater than 0 in order for OSPF to work, since there must be a DR. It is best to assigned DR duties to the least busy router on a LAN to reduce processing overhead on busier routers.
The authentication key is a password (up to 8 characters) which can be assigned on an interface basis. In order to use authentication, the OSPFAuthType for this interface's area should be set to Simple (the default is None). The authentication key must match for each router on the interface.
The default HelloInterval and RtrDeadInterval are shown for Ethernet; for WAN interfaces these defaults are 30 and 120 seconds. The HelloInterval is the interval at which the routers send out "keep-alive" packets which let other routers know the router is up. If the router's neighbors do not receive a Hello packet from the router within RtrDeadInterval seconds, they will assume the router is down; this interval is normally about 4 times the HelloInterval.
The HelloInterval and RtrDeadInterval for each connected router must match or the routers will not be able to communicate. If you are having trouble establishing an adjacency, check that all the routers on the network are configured with the same HelloInterval and RtrDeadInterval. If you change the defaults on one router, you must change them on all attached routers.
The user will not usually want to change the Transdelay or RetransInterval, although you may want to choose larger numbers for WAN links if the defaults are causing a problem.
This is an optional section which you may add if you want to specify an authorization type, specify a stub area, or a net range for an area.
If there is no OSPF Area section for a specific area, the defaults which will be used by the router for that area are:
OSPFAuthtype = None, StubArea = Off, and NetRange = None.
If you specify OSPFAuthType = Simple, you need to put in an AuthKey in the interface section for each interface in the area.
Note that net ranges are optional, and are not required in order for an area's networks to be advertised. They are used to consolidate or hide network information at area boundaries, as described in further detail below.
[ OSPF Area "area id" ] "area id is an integer or IP address" OSPFAuthtype = "None" "None or Simple, default is None" StubArea = Off "ON if area is to be stub area, default is Off" StubDefaultCost = 10 NetRange = "" "Net ranges associated with this area Syntax: [On|Off] [IPAddr] [IP Subnet Mask] [Advertise|DoNotAdvertise]"
The area id in the OSPF Area section title corresponds to an area id assigned in the IP Interface section described above. For instance, if you are assigning IP Ethernet 0 to Area 188.8.131.52, there could be a section "OSPF Area 184.108.40.206" to configure that area.
[ IP Ethernet 0 ] OSPFenabled = On OSPFAreaID = 220.127.116.11 [ OSPF Area 18.104.22.168 ] OSPFAuthtype = None StubArea = On StubDefaultCost= 20
The OSPF protocol calls for Area ID's to be numbers, not strings, so you must enter either a decimal number or a number in IP Address format.
The default authentication type is "None". If you set the OSPFAuthtype to "Simple", then you need to set a password in any interface section which is associated with that area.
All of the router's interfaces can theoretically be in different areas, although it is better practice to limit each router to two or three areas.
A stub area is an area which cannot receive external advertisements, which means if you say "StubArea = On", you cannot redistribute RIP or static routes into this area. Also, a stub area may not be a transit area for a virtual link. OSPF Area 0, the Backbone, cannot be specified as a stub area.
The Not So Stubby Area (NSSA) option has not yet been implemented.
NetRanges are not required in order to advertise an area's networks. They can optionally be used to consolidate routing information at area boundaries, or to hide routing information from routers outside the area. Net Ranges only apply to inter-area networks; if all the routers are in one Area, any defined net ranges will not be used by the router.
For instance, if you have the following subnets in an area:
22.214.171.124 255.255.255.224 126.96.36.199 255.255.255.224 188.8.131.52 255.255.255.224 184.108.40.206 255.255.255.224
You can set a NetRange as follows:
The router will then advertise the consolidated route to routers in other OSPF Areas instead of all the subnets.
If you set the DoNotAdvertise flag, the network in that particular NetRange will not be advertised to other areas. Note that this only applies to OSPF internal routes (NOT routes learned from external protocols using IP Route Redistribution). External routes must be excluded by using route filtering.
[ OSPF Virtual Link name ] "name is Router ID of Virtual Neighbor" LinkActive = On "Use this to deactivate link without deleting" TransitArea = "" "Area ID of the transit area" VirtRetrans = 30 "Retransmit interval in seconds" VirtTransDelay = 4 "Transmit delay interval in seconds" VirtHelloInt = 30 "Hello interval in seconds" VirtRtrDeadInt = 120 "Router declared down interval in seconds" VirtAuthKey = "" "Authentication Password, max 8 characters"
Every OSPF area must be continguous to the Backbone Area 0. Non-backbone areas can be thought of "leaves" to the OSPF tree where the backbone is the trunk.
If it is not physically possible to have an area connected to the backbone, you must configure a Virtual Link in the two routers which are providing the tunnel to the backbone. These two routers do not need to be physically connected, but they must share a common area called the "transit area".
Each virtual link section is identified by the Router ID (NOT the interface IP address) of the virtual link neighbor (NOT the Router ID of THIS router). The Router ID of the neighbor is the largest IP interface address associated with that router. You can request the router ID of the virtual neighbor by issuing the command show ospf rtrid.
As with non-virtual interfaces, there are various intervals which can be set if desired. If these are not specified, the defaults shown above will be used.
The default is for all routing redistribution to be disabled. If route redistribution is enabled, the default is for subnet aggregation to be disabled.
[ IP Route Redistribution ] OSPFRouteAggregation Aggregate redistributed routes on class boundaries RIPtoOSPF Redistribute RIP routes into OSPF Syntax: [True|False] [1|2] [Metric] DefaultIntoOSPF Redistribute default route into OSPF Syntax: [True|False] [1|2] [Metric] OSPFtoRIP Redistribute OSPF routes to RIP Syntax: [True|False] [Metric] BGPtoOSPF Redistribute BGP routes to OSPF Syntax: [True|False] [Metric] OSPFtoBGP Redistribute OSPF routes to BGP
The routing redistribution policy allows the RIP and OSPF protocols to co-exist and exchange routing information. It also allows the user to inject static routing information into the OSPF routing domain. For BGP-capable routers, the BGPtoOSPF and OSPFtoBGP parameters may also be used.
Naturally, care must be taken not to have too many routers redistributing routes all over the place, especially if the Aggregation feature is being used. The best policy is to run RIP and OSPF on separate interfaces of a router, although they can be run concurrently if proper thought is given to the setup.
An example of where you could get into trouble with aggregation: split subnets coming to the router from different interfaces, since the aggregated route can only have one gateway. If you have split subnets, you are better off leaving aggregation turned off.
Check your subnets if you are redistributing routes between OSPF and RIP Version 1, since OSPF is a classless protocol and RIP Version 1 only understands Class A, Class B and Class C masks. If you have classless OSPF subnets, RIP 1 will do some perhaps unwanted aggregation for you.
==>OSPF Route Aggregation
The OSPFRouteAggregation parameter determines whether routes will be consolidated along class boundaries before they are advertised to other routers.
The RIPToOSPF parameter will redistribute RIP routes into the OSPF routing domain. To redistribute RIP routes into OSPF, you can just type:
RIPToOSPF = True
The defaults are: Type = 2, Metric = 10.
A typical scenario for using this would be a router which is running RIP on one of its interfaces and OSPF on a different interface.
The <1|2> parameter refers to OSPF type 1 or type 2 external routes. The cost of a type 2 route is always the external cost, regardless of the interior (to OSPF) cost to reach that route. A type 1 cost is the addition of the external cost and the internal cost used to reach that route. The Metric parameter is the external cost to be used; for a type 2 route, this is the cost; for a type 1 route, the internal costs along the routing path will be added to this cost to get the total cost of the route.
Redistributing a dynamic default route into OSPF is specified separately, due to the special nature of a default route. For instance, if you set "RIPToOSPF = True", you must also set "DefaultIntoOSPF = True" to get a RIP default route redistributed into OSPF.
OSPF routes can be redistributed into the RIP domain, with a default hop of 1. If OSPFToRIP is enabled, RIP will simply pick up the OSPF routes along with any other routes it is going to advertise.
The full BGP routing table of some 50,000+ routes cannot be redistributed into OSPF. Only up to 1000 BGP routes will be accepted. To redistribute a few routes from BGP, you can use IP route filters to filter out the majority of BGP routes.
BGP will provide its own hop count in its route advertisments. Use BGP Route Maps to configure routing preference parameters for internal routes imported into BGP.
Redistributing static routes into OSPF
Static routes can also be redistributed into OSPF using the redistribute flag associated with each configured static route. The flags for OSPF are: Redist=OSPF1, or Redist=OSPF2. OSPF1 refers to type 1 external routes, and OSPF2 refers to type 2 external route, as described above.
[ IP Static ] 220.127.116.11 255.255.255.0 18.104.22.168 10 Redist=OSPF1 22.214.171.124 255.255.255.0 126.96.36.199 20 Redist=OSPF2
OSPFDisable "Disable OSPF" OSPFEnable "Re-start OSPF, ONLY used after an OSPFdisable" ospf reset nbr "Reset adjacency with selected neighbor" show ospf RtrID "Display this router's OSPF Router ID" show ospf config "Display OSPF Runtime Configuration" show ospf stats "OSPF Packet Statistics" show ospf mem "OSPF Database Memory Allocation" show ospf if "OSPF IP Interface Database" show ospf nbr "OSPF Neighbor Database" show ospf rt "OSPF ABR and ASBR routes" show ospf all "Entire OSPF link state database" show ospf db all "Router, Net, Summary Databases" show ospf db rtr "Router Link State Database" show ospf db net "Net Link State Database" show ospf db sum "Summary Link State Database" show ospf db ext "External Link State Database"
OSPFdisable and OSPFenable
OSPFdisable and OSPFenable allow the user to temporarily disable and enable the OSPF protocol without restarting the router. You cannot dynamically change any configuration parameters with these commands; to do that you need to re-start the router the same way you do for any other configuration parameters.
The OSPFdisable command will cause the router notify its neighbors that it is "going down". The router will not resume any adjacencies until the OSPFenable command is issued. The OSPFenable command will re-establish the adjacencies with each neighbor from scratch, just as if the router was first coming up.
ospf reset nbr
This command allows the user to reset the adjacency with just one OSPF neighbor, or with all neighbors. The address provided can be either the IP address the neighbor has on its interface with this router, or the neighbor's Router ID. For example:
ospf reset nbr 188.8.131.52
ospf reset nbr all
The difference between this command and the OSPFdisable command is that the OSPF protocol continues running. The router will immediately set up new adjacencies with any neighbors.
OSPF show Commands
The various show commands provide extensive information about the OSPF database, configuration, and dynamic memory usage.
show ospf RtrID
The Router ID is used in OSPF database exchanges among neighbors. It is the highest IP address assigned to the router.
ospf 1250i>show ospf rtrid OSPF Router ID for this router is 184.108.40.206
show ospf config
The show ospf config command displays user-configured values that are currently being used by the protocol, not any edited items. Edited values can be displayed using the existing show config command.
OSPF 4000>show ospf config OSPF PER-INTERFACE CONFIGURATION IP Ethernet Interface 220.127.116.11 assigned to area 0.0.0.0 Interface is Active Interface Cost = 10, Router Priority = 1 Hello Interval = 10, Router Dead Interval = 40 Transit Delay = 1, Retransmit Interval = 5 IP Ethernet Interface 18.104.22.168 assigned to area 0.0.0.0 Interface is Active Interface Cost = 10, Router Priority = 1 Hello Interval = 10, Router Dead Interval = 40 Transit Delay = 1, Retransmit Interval = 5 IP Ethernet Interface 22.214.171.124 assigned to area 0.0.0.0 Interface is Active Interface Cost = 10, Router Priority = 1 Hello Interval = 10, Router Dead Interval = 40 Transit Delay = 1, Retransmit Interval = 5 IP Ethernet Interface 126.96.36.199 assigned to area 0.0.0.0 Interface is Active Interface Cost = 10, Router Priority = 1 Hello Interval = 10, Router Dead Interval = 40 Transit Delay = 1, Retransmit Interval = 5 OSPF VIRTUAL LINK CONFIGURATION None OSPF AREA CONFIGURATION Area ID: 0.0.0.0 Net Ranges defined for this area: None ROUTING PROTOCOL REDISTRIBUTION Redistribute RIP routes into OSPF is disabled Redistribute BGP routes into OSPF is disabled Redistribute OSPF routes into RIP is disabled
show ospf stats
The show ospf stats command shows OSPF packet statistics.
ospf 1250i>show ospf stats OSPF Packet Statistics Received Sent Hello Packets: 29371 5880 Database Description Packets: 13 16 Link State Request Packets: 0 9 Link State Update Packets: 327 34 LS Acknowledgement Packets: 275 279 Total Packets: 30811 6218 Packets discarded: 825 Packet errors: 0
This shows how many of each of the 5 types of OSPF packets have been received and sent: Hello, Database Description, Link State Request, Link State Update, and Link State Acknowledgement. Discarded packets are not errors; an example of a discarded packet would be a multicast for Designated Routers when this router is not DR or BDR.
A sample display with a packet error is shown below. If "Packet errors" is nonzero, a detailed breakdown of each type of packet error will be displayed.
OSPF 1250i>show ospf stats OSPF Packet Statistics Received Sent Hello Packets: 26 19 Database Description Packets: 11 11 Link State Request Packets: 1 4 Link State Update Packets: 17 4 LS Acknowledgement Packets: 6 10 Total Packets: 63 48 Packets discarded: 0 Packet errors: 2 Hello timer mismatch: 2
In this case, the router is reporting a Hello timer interval mismatch with one of the routers on the network, which will cause the two routers to be unable to establish an adjacency
show ospf if
The "show ospf if" command shows the status of the OSPF interfaces, with Designated Router, Backup Designated Router, and neighbor information.
OSPF 4000>show ospf if OSPF IP Interfaces Interface Ether0 is Active Cost: 5 State: NOT DR OR BDR Type: BROADCAST Priority: 1 Designated Router: 188.8.131.52 Backup Designated Router: 184.108.40.206 Timers: Hello: 10 Poll: 0 Dead: 40 Retrans: 5 Neighbors: Down 0 Att 0 Init 0 2Way 3 ExStart 0 Exch 0 Loading 0 Full 2 Interface Ether1 is Active Cost: 5 State: NOT DR OR BDR Type: BROADCAST Priority: 1 Designated Router: 220.127.116.11 Backup Designated Router: 18.104.22.168 Timers: Hello: 10 Poll: 0 Dead: 40 Retrans: 5 Neighbors: Down 0 Att 0 Init 0 2Way 0 ExStart 0 Exch 0 Loading 0 Full 2
Neighbors: Down 0 Att 0 Init 0 2Way 0 ExStart 0 Exch 0 Loading 0 Full 2
indicates the current state of each OSPF neighbor: Down, Attempt, Init, 2-Way, Exchange Start, Exchange, Loading, and Full. Most of the states are transient, except for 2-Way and Full. If a router is the Designated Router or Backup Designated Router, all established neighbors will be in the Full state. If a router is neither DR nor BDR, there will be neighbors in the 2-Way state.
A more complete listing can be displayed with the show ospf if verbose option:
OSPF 4000>show ospf if verbose OSPF IP Interfaces Interface Ether0 is Active Cost: 5 State: NOT DR OR BDR Type: BROADCAST Priority: 1 Designated Router: 22.214.171.124 Backup Designated Router: 126.96.36.199 Timers: Hello: 10 Poll: 0 Dead: 40 Retrans: 5 Neighbors: RtrID: 188.8.131.52 Addr: 184.108.40.206 State: 2WAY Priority: 0 DR: 220.127.116.11 BDR: 18.104.22.168 Last Hello: 5 secs Hold Timer: 0 RtrID: 22.214.171.124 Addr: 126.96.36.199 State: 2WAY Priority: 1 DR: 188.8.131.52 BDR: 184.108.40.206 Last Hello: 7 secs Hold Timer: 0 RtrID: 220.127.116.11 Addr: 18.104.22.168 State: 2WAY Priority: 1 DR: 22.214.171.124 BDR: 126.96.36.199 Last Hello: 0 secs Hold Timer: 0 RtrID: 188.8.131.52 Addr: 184.108.40.206 State: FULL Priority: 1 DR: 220.127.116.11 BDR: 18.104.22.168 Last Hello: 0 secs Hold Timer: 0 RtrID: 22.214.171.124 Addr: 126.96.36.199 State: FULL Priority: 1 DR: 188.8.131.52 BDR: 184.108.40.206 Last Hello: 4 secs Hold Timer: 0 Interface Ether1 is Active Cost: 5 State: NOT DR OR BDR Type: BROADCAST Priority: 1 Designated Router: 220.127.116.11 Backup Designated Router: 18.104.22.168 Timers: Hello: 10 Poll: 0 Dead: 40 Retrans: 5 Neighbors: RtrID: 22.214.171.124 Addr: 126.96.36.199 State: FULL Priority: 1 DR: 188.8.131.52 BDR: 184.108.40.206 Last Hello: 8 secs Hold Timer: 0 RtrID: 220.127.116.11 Addr: 18.104.22.168 State: FULL Priority: 1 DR: 22.214.171.124 BDR: 126.96.36.199 Last Hello: 9 secs Hold Timer: 0
show ospf mem
The show ospf mem displays OPSF dynamic memory usage, similar to the "show os memory" command.
show ospf nbr
The show ospf nbr command displays an abbreviated list of current neighbors and their state.
OSPF 4000>show ospf nbr ---------------------------------------------------------------------- OSPF Neighbors ====================================================================== Ether0 RtrID: 188.8.131.52 Addr: 184.108.40.206 State: 2WAY Ether0 RtrID: 220.127.116.11 Addr: 18.104.22.168 State: 2WAY Ether0 RtrID: 22.214.171.124 Addr: 126.96.36.199 State: 2WAY Ether0 RtrID: 188.8.131.52 Addr: 184.108.40.206 State: FULL Ether0 RtrID: 220.127.116.11 Addr: 18.104.22.168 State: FULL Ether1 RtrID: 22.214.171.124 Addr: 126.96.36.199 State: FULL Ether1 RtrID: 188.8.131.52 Addr: 184.108.40.206 State: FULL ----------------------------------------------------------------------
show ospf rt
The show ospf rt command displays OSPF AS and Area Border routers. An AS Border router is a router which is redistributing routes from another routing protocol, such as RIP. An Area Border router is a router which has interfaces in more than one OSPF Area. OSPF database information is summarized at area borders.
OSPF 2270R>show ospf rt AREA 0: AS Border Routes: None Area Border Routes: 220.127.116.11 Area 0 Cost 10 AdvRouter 18.104.22.168 Nexthop: 22.214.171.124 Interface: 126.96.36.199 188.8.131.52 Area 0 Cost 10 AdvRouter 184.108.40.206 Nexthop: 220.127.116.11 Interface: 18.104.22.168 22.214.171.124 Area 0 Cost 0 AdvRouter 126.96.36.199 AREA 2: AS Border Routes: None Area Border Routes: 188.8.131.52 Area 2 Cost 0 AdvRouter 184.108.40.206 SUMMARY AS Border Routes: None
show ospf all and show ospf db
The show ospf all and show ospf db commands display various entries from the OSPF link state database. In particular, the display for show ospf all can be lengthy, but this information is very useful for debugging problems with OSPF networks. The entire network as the router sees it can be constructed from the link state database information.
show ip routing
The show ip routing command displays different information for RIP routes and OSPF routes, as shown in the following sample display:
Dynamic Routes: Destination Mask Gateway Metric Uses Type Src/TTL Interface 10.9.2.0 FFFFFF00 220.127.116.11 20 0 OSPF ASE Ether1 18.104.22.168 FFFFFF00 22.214.171.124 20 0 OSPF NET Ether1 126.96.36.199 FFFFFF00 188.8.131.52 15 0 OSPF SUM Ether0 184.108.40.206 FFFFFF00 220.127.116.11 20 0 OSPF STUB Ether0
The Metric refers to number of hops for RIP, and to the total route cost for OSPF. The Src/TTL column displays "time-to-live" for RIP, and type of OSPF route for OSPF (STUB, NET, SUM, or ASE). A STUB route is for a network which is in one of the router's own areas which has no other OSPF router running on that network. A NET route is for a network in one of the router's own areas where other OSPF routers are running. A SUM route was learned from another router and advertises a network which resides outside one of the router's own areas. An ASE route is a route which was learned from an external protocol such as RIP, and was redistributed into OSPF.
IP Route Filters may be used with OSPF in the same manner that they are used for RIP. See the IP Route Filter configuration section for details.
If the debugging feature is enabled in a router, it can be made to provide copious debug information via the console window.
[ Debug Flags ] sys debug flags OSPFAdj sys debug flags OSPFFld sys debug flags OSPFPkt sys debug flags OSPFSpf sys debug flags OSPFHello
The OSPFADJ flag provides print statements relating the the establishment of adjacencies on the router interfaces. Each OSPF router exchanges database information with its neighbors on each of its interfaces.
The OSPFFld flag provides updates on when the router is flooding updated database information to its neighbors.
The OSPFPkt flag causes the router to provide very copious output regarding the exchange of all types of packets except Hello packets.
The OSPFSpf flag provides notification when the router is running the Dijkstra (Shortest Path First) algorithm on its database information. The router uses its database to determine routes and make additions and deletions to the IP routing table.
The OSPFHello flag will print out a notification each time it sends and receives a Hello packet on each interface which is running OSPF.
rfc2329 -- OSPF Standardization Report. J. Moy. April 1998. (Status: INFORMATIONAL) rfc2328 -- OSPF Version 2. J. Moy. April 1998. (Status: STANDARD) rfc2178 -- OSPF Version 2. J. Moy. July 1997. (Status: DRAFT STANDARD) rfc1793 -- Extending OSPF to Support Demand Circuits. J. Moy. April 1995. (Status: PROPOSED STANDARD) rfc1745 -- BGP4/IDRP for IP---OSPF Interaction. K. Varadhan, S. Hares, Y. Rekhter. December 1994. (Status: PROPOSED STANDARD) rfc1587 -- The OSPF NSSA Option. R. Coltun & V. Fuller. March 1994. (Status: PROPOSED STANDARD) rfc1586 -- Guidelines for Running OSPF Over Frame Relay Networks. O. deSouza & M. Rodrigues. March 1994. (Status: INFORMATIONAL) rfc1246 -- Experience with the OSPF Protocol. J. Moy. Jul-01-1991. (Status: INFORMATIONAL) rfc1245 -- OSPF Protocol Analysis. J. Moy. Jul-01-1991. (Status: INFORMATIONAL)
See the OSFP Debug Options for debug commands.
There is currently no specific troubleshooting information available for this configuration.
The Cisco Support Community is a forum for you to ask and answer questions, share suggestions, and collaborate with your peers.
Refer to Cisco Technical Tips Conventions for information on conventions used in this document.