This document describes the Open Shortest Path First (OSPF) protocol.
Routers that use a common routing protocol form an autonomous system (AS). This common routing protocol is called an Interior Gateway Protocol (IGP). OpenROUTE software supports two IGPs, OSPF and RIP (Routing Information Protocol). IGPs dynamically detect your router's ability to reach a network and routing information within an AS and use this information to build the IP routing table. IGPs can also import external routing information into the AS.
Routers running OpenROUTE software can run OSPF and RIP simultaneously. When you configure your router to do this, OSPF routes are preferred. OSPF provides services not available with RIP. In general, Nx Networks recommends using the OSPF protocol due to its robustness, responsiveness, and decreased bandwidth requirements.
OSPF is based on link-state technology or the shortest-path first (SPF) algorithm. RIP is based on the Bellman-Ford or the distance-vector algorithm.
This document contains the following sections:
Introducing OSPF
Configuring OSPF
OSPF Commands
Introducing OSPF
OpenROUTE software supports a complete implementation of the OSPF routing protocol as specified in RFC 1583 (Version 2) and also certain new capabilities specified in RFC 2178. Version 2 is incompatible with routers running OSPF version 1. OSPF information is not exchanged between routers running version 1 and version 2.
OSPF is a link state dynamic routing protocol that detects and learns the best routes to (reachable) destinations. It can quickly perceive changes in the topology of an AS and, after a short convergence period, calculate new routes. The OSPF protocol does not encapsulate IP packets but forwards them based on destination address only.
OSPF Features
OSPF features include the following:
Least Cost Routing. Allows you to configure path costs based on any combination of network parameters. For example, bandwidth, delay, and dollar cost.
No limitations to the routing metric. While RIP restricts the routing metric to 16 hops, OSPF has no restriction.
Multipath Routing. Allows you to use multiple paths of equal cost that connect the same points. You can then use these paths for load balancing, resulting in more efficient use of network bandwidth.
Area Routing. Decreases the resources (memory and network bandwidth) consumed by the protocol and provides an additional level of routing protection.
Variable Length Subnet Masks. Allow you to break an IP address into variable size subnets, conserving IP address space.
Routing Authentication. Supports MD5 authentication.
Point-to-Multipoint. Override the default OSPF interface type and then select point-to multipoint as the OSPF interface type override.
Point-to-Point. Networks that use a communication line to join a single pair of routers. For example, a 56 Kb serial line that connects two routers.
Point-to-Multipoint. Networks that support a communication line to join a single router with multiple routers. For example, a Frame Relay network.
Broadcast. Networks that support more than two attached routers and are capable of addressing a single physical message to all attached routers. For example, an Ethernet network.
Non-Broadcast. Networks that support more than two attached routers but have no broadcast capabilities, such as a Frame Relay network. For OSPF to function properly, this network requires extra configuration information about other OSPF routers attached to the non-broadcast network.
Area Border Routers. A router attached to multiple areas that runs multiple copies of the basic algorithm, one copy for each attached area and an additional copy for the backbone. Area border routers condense the topology information of attached areas for distribution to the backbone. The backbone then distributes this information to other areas.
AS Boundary Routers. A router that exchanges information with routers that belong to other ASs. These routers import this information to the OSPF routing domain in AS external link advertisements.
The router then attempts to form adjacencies with its neighbors to synchronize their topological databases. Adjacencies control the sending and receiving of the routing protocol packets, as well as the distribution of the topological database updates. On a multi-access network, the designated router determines which routers become adjacent.
A router periodically advertises its status or link state to its adjacencies. Link state advertisements flood throughout an area ensuring that all routers have exactly the same topological database. This database is a collection of the link state advertisements received from each router belonging to an area. From the information in this database, each router can calculate a shortest path tree with itself designated router as the root. Then the shortest path tree generates the routing table.
Designated Router
Every multi-access network has a designated router that performs two main functions for the routing protocol, it originates network link advertisements and it becomes adjacent to all other routers on the network.
When a designated router originates network link advertisements, it lists all the routers, including itself, currently attached to the network. The link ID for this advertisement is the IP interface address of the designated router. By using the subnet/network mask, the designated router obtains the IP network number.
The designated router becomes adjacent to all other routers and is charged with synchronizing the link state databases on the broadcast network.
The Hello Protocol elects the designated router after determining the router's priority from the Rtr Pri field of the hello packet. When a router's interface first becomes functional, it checks to see if the network currently has designated router. If it does, it accepts that designated router regardless of that router's priority, otherwise, it declares itself the designated router. If the router declares itself the designated router at the same time another router does, the router with highest router priority (Rtr Pri) becomes the designated router. In the case that both Rtr Pris are equal, the one with the higher router ID is elected.
Once the designated router is elected, it becomes the endpoint for many adjacencies. On a broadcast network this optimizes the flooding procedure by allowing the designated route to multicast its Link State Update packets to the address ALLSPFRouters rather than sending separate packets over each adjacency.
Configuring OSPF
The following steps present the tasks required to get the OSPF protocol up and running:
If you want to forward IP multicasts (IP Class D addresses), enable IP multicast routing capability. See Enabling Multicast Forwarding.
If you want the router to import routes learned from other routing protocols (RIP, EGP, or statically configured routes), enable AS boundary routing and define whether routes are imported as Type 2 or Type 1 externals. See Enabling AS Boundary Routing.
If the router connects to non-broadcast networks, set the non-broadcast network parameters. This consists of a list of the other OSPF routers that are connected to the non-broadcast network.
If you want to boot a neighboring router over an attached point-to-point interface, configure the neighbor's IP address. This is done by defining non-broadcast parameters for the point-to-point interface.
Enabling OSPF
Before you can enable OSPF, you must supply the total number of external routes and the total number of OSPF routers. These values estimate the final size of the OSPF routing domain and should be identical in all of your OSPF routers. Each router running OSPF has a database describing a map of the routing domain. This database is identical in all participating routers. From this database, the router builds the IP routing table through the construction of a shortest-path tree, with the router itself as root. The routing domain refers to an AS running the OSPF protocol.
To enable OSPF enter enable ospf and respond to the prompts:
OSPF Config>enable ospf
Estimated # external routes[0]? 200
Estimated # OSPF routers [0]? 60
Estimated # external routesTotal number of AS external routes that will be imported into the OSPF routing domain. A single destination may lead to multiple external routes when it is imported by separate AS boundary routers.
For example, if the OSPF routing domain has two AS boundary routers, both importing routes to the same 100 destinations, set the number of AS external routes to 200.
Estimated # OSPF routersTotal number of OSPF routers in the routing domain.
OSPF allows you to split the AS into regions called areas. OSPF areas are a collection of contiguous networks. The topology of any one area is hidden from that of the other areas. Hiding information significantly reduces routing traffic and protects routing within an area from outside influence.
A router has a separate database that contains the topology for each area to which it is connected. Two routers belonging to the same area have identical topologies for that area.
OSPF areas are defined as address ranges. External to the area, a single route is advertised for each address range. For example, if an OSPF area consists of all subnets of the class B network 128.185.0.0, the area consists of a single address range. The address range is specified as an address of 128.185.0.0 together with a mask of 255.255.0.0. Outside the area, the entire subnetted network is advertised as a single route to network 128.185.0.0.
Every OSPF routing domain must have a backbone. The backbone is a special OSPF area having an area ID equal to 0.0.0.0. The OSPF backbone must be contiguous; however, it is possible to define areas where the backbone is not physically contiguous. When this situation exists, you must configure a virtual link to maintain the backbone's connectivity. You can configure virtual links between any two backbone routers that have an interface to a common non-backbone area.
Figure 29 OSPF Areas
Networks belonging to Area 0.0.0.0
Routers attached to those networks
Routers belonging to multiple areas
Configured virtual links
OSPF Config>set area
Area number [0.0.0.0]? 0.0.0.1
Authentication Type (0:NONE, 1:SIMPLE, 2:CRYPTOGRAPHIC) [0]? 1
Is this a stub area? [No]:
Area number is the OSPF area address. An OSPF area is a contiguous group of networks that is defined by a list of address ranges, each indicated by a combination of the IP address and an address mask. A network belongs to an area if its address is in the list.
Authentication type (security scheme) to be used in the area:
| Type | Meaning |
|---|---|
| 0 | No authentication necessary |
| 1 | A simple password |
| 2 | Cryptographic (MD5 authentication) |
Stub area designation. If you enter Yes,
The area does not receive any AS external link advertisements, reducing the size of the area's OSPF database and decreasing memory usage for external routers in the stub area.
You cannot configure virtual links through a stub area.
You cannot configure a router within the stub area as an AS boundary router.
Note: You cannot configure the backbone as a stub area. External routing in stub areas is based on a default route. Each border area router attaching to a stub area originates a default route for this purpose. You can configure the cost of this default route using the OSPF set area command.
OSPF Config>set area
Area number [0.0.0.0]? 0.0.0.2
Authentication Type (0:NONE, 1:SIMPLE, 2:CRYPTOGRAPHIC) [0]? 1
Is this a stub area? [No]: yes
Stub default cost [0]?
Import summaries? [Yes]:
You can dynamically change the cost of an OSPF interface from the router's monitoring environment. This new cost is flooded quickly throughout the OSPF routing domain and modifies the routing immediately. When you restart/reload the router, the cost of the interface reverts to the value in the saved configuration.
When responding to the prompts, supply the interface's IP address for each interface in the router and answer the questions that follow. For the parameters listed below you must enter the same value for all routers attached to a common network segment.
The first prompt asks for the OSPF area to which the interface attaches. In the following example, suppose that the interface address mask is 255.255.255.0, indicating that the interface attaches to a subnet (128.185.138.0) of network 128.185.0.0. All other OSPF routers attached to subnet 128.185.138.0 must also have these parameters set to the same values.OSPF Config>set interface
Interface IP address [0.0.0.0]? 128.185.123.75
Attaches to area [0.0.0.0]? 0.0.0.1
Retransmission Interval (in seconds) [5]?
Transmission Delay (in seconds) [1]?
Router Priority [1]?
Hello Interval (in seconds) [10]?
Dead Router Interval (in seconds) [40]?
Type Of Service 0 cost [1]? 5
Authentication Key?
Retype Auth. Key?
Message Digest Key ID [0]?
MD5 Key?
Retype MD5 Key?
Override the default OSPF interface-type? [No]: y
OSPF interface-type override
(1=broadcast, 3=NBMA, 5=point-to-multipoint) [0]? 3
Poll Interval [120]?
Forward multicast datagrams? [Yes]:
Forward as data-link unicasts? [No]:
Multicasting is a LAN technique that allows copies of a single packet to pass to a selected subset of all possible destinations. Some hardware, for example Ethernet, supports multicast by allowing a network interface to belong to one or more multicast groups.
The IP protocol supports IP multicast routing through IP multicast extensions to OSPF (MOSPF). IP multicast is an extension of LAN multicasting to a TCP/IP Internet. This process lets an IP host send a single datagram (called an IP multicast datagram) that is delivered to multiple destinations. IP multicast datagrams are packets whose destinations are Class D IP addresses. Each Class D address defines a multicast group.
The Internet Group Management Protocol (IGMP) is the OSPF extension that lets an IP host participate in IP multicasting. IGMP lets routers keep track of IP group membership on its local LANs by sending IGMP Host Membership Queries and receiving IGMP Host Membership Reports.
An MOSPF router then distributes group location information throughout the routing domain by flooding a new type (type 6) of link state advertisement, the group-membership-LSA. This enables the MOSPF routers to efficiently forward a multicast datagram to its multiple destinations. This is done by each router calculating the path of the multicast datagram as a tree whose root is the datagram source and whose terminal branches are LANs containing group members.
While running MOSPF, multicast datagram forwarding works in the following ways:
While forwarding IP multicasts is not reliable, IP multicast datagrams are delivered with the same best effort as with the delivery of IP unicasts.
Multicast datagrams travel the shortest path between the datagram source and any particular destination (OSPF link state cost). This occurs because a separate tree is built for each datagram source and destination group pair.
A multicast datagram is forwarded as a data-link multicast at each hop. The Address Resolution Protocol (ARP) is not used. For some network technologies, mapping between Class D addresses and data-link multicast occurs while for others, Class D addresses are mapped to the data-link broadcast address.
When paths from the datagram source to two separate group members share an initial common segment, only a single datagram is forwarded until the paths go in separate directions. The path can split at either a router or at a network. If the path splits at a router, the router copies the packet before sending it. If the path splits at a network, the packet replicates through a data-link multicast.
You can use MOSPF routers with OSPF routers that do not support multicast extensions. In this configuration, all routers interoperate in the routing of unicasts. This lets you slowly introduce multicast capability into an internetwork.
Some configurations of MOSPF and non-MOSPF routers may produce unexpected failures in multicast routing.
You construct separate multicast paths in MOSPF for each TOS. However, routers do not support TOS-based routers. You can mix non-TOS routers with TOS-based routers, but this causes TOS to be ignored in the forwarding of multicasts.
You configure the router to send Simple Network Management Protocol (SNMP) traps to a multicast group address by adding a group address to a particular SNMP community name.
By default the router does not forward IP multicast (class D) datagrams. To display the multicast parameters, use the list interfaces command. If multicast is disabled, the multicast parameters are not displayed.OSPF Config>enable multicast
Inter-area multicasting enabled(Yes or No): yes
Inter-AS multicasting enabled(Yes or No): yes
Enabling AS Boundary Routing
To import routes learned from other protocols (RIP, EGP, and statically configured information) into the OSPF domain, enable AS boundary routing. You must do this even if the only route you want to import is the default route (destination 0.0.0.0).
When enabling AS boundary routing, you are asked which external routes you want to import. You can choose to import, or not to import, routes belonging to several categories. The categories are as follows:
For example, you can choose to import EGP and direct routes, but not RIP or static routes. When you choose to import EGP routes, only the routes that appear in the EGP input exchange tables are actually imported. All routes are imported with cost equal to their routing table cost. They are all imported as either type 1 or type 2 external routes, depending on the routing protocol comparison (See next section).Independently of the above external categories, you can also configure whether or not to import subnet routes into the OSPF domain. This configuration item defaults to OFF (subnets not imported).
The metric type used in importing routes determines how the imported cost is viewed by the OSPF domain. When comparing two type 2 metrics, only the external cost is considered in picking the best route. When comparing two type 1 metrics, the external and internal costs of the route are combined before making the comparison.
You are asked whether or not you want to originate an OSPF default route. You can answer always, never, or only if you have EGP routes. If originating a default route when EGP routes are available, you can also choose to originate the default only if EGP routes are received from a particular Autonomous System or if a particular route is received through the EGP.
Combinations of these options are possible. For example, you can set the router so that its default is originated only if a route to 10.0.0.0 is received from AS number 12. Setting the AS number to 0 means "from any AS." Setting the network number to 0.0.0.0 means "any routes received."
Use the enable as command as follows:
OSPF Config>enable as
Import EGP routes? [Yes]:
Import BGP routes? [Yes]:
Automatically generate tags? [Yes]:
Import RIP routes? [Yes]:
Import static routes? [No]:
Import direct routes? [Yes]:
Import subnet routes? [No]:
Always originate default route? [Yes]: no
Originate default if EGP/BGP routes available? [No]: yes
From AS number [0]? 12
To network number [0.0.0.0]? 10.0.0.0
Originate as type 1 or 2 [2]?
Default route cost [1]?
Default forwarding address [0.0.0.0]?
First configure the OSPF poll interval with the following command:
OSPF Config>set interface
Interface IP address [0.0.0.0]? 128.185.138.19
Attaches to area [0.0.0.0]?
.
.
.
Override the default OSPF interface-type? [No]: yes
OSPF interface-type override
Poll Interval [120]?
OSPF Config> add neighbor
Interface IP address [0.0.0.0]? 128.185.138.19
IP Address of Neighbor [0.0.0.0]? 128.185.138.21
Can that router become Designated Router [Yes]?
Setting OSPF Router IDs
Every router in an OSPF routing domain must have a 32-bit router ID. By default, the OSPF router ID is the address of the first OSPF interface appearing in the router's configuration.
You can also explicitly set the OSPF router ID using the IP config>set router id command. The router ID must still be one of the router's IP interface addresses.
Setting Virtual Links
To maintain backbone connectivity, you must have all of your backbone routers interconnected either by permanent or virtual links. You can configure virtual links between any two area border routers that share a common non-backbone and non-stub area. Virtual links are considered separate router interfaces connecting to the backbone area. Therefore, you are asked to also specify many of the interface parameters when configuring a virtual link.
You must configure virtual links in each of the link's two endpoints. Note that OSPF router IDs are entered in the same form as IP addresses.
OSPF Config>set virtual-link
Virtual endpoint (Router ID) [0.0.0.0]? 128.185.138.21
Link's transit area [0.0.0.1]?
Retransmission Interval (in seconds) [10]?
Transmission Delay (in seconds) [5]?
Hello Interval (in seconds) [30]?
Dead Router Interval (in seconds) [180]?
Authentication Key?
Message Digest Key ID [0]?
Message Digest Key?
Retype Message Digest Key?
OSPF routing in an AS occurs on the following three levels: intra-area, inter-area, and exterior.
Intra-area routing occurs when a packet's source and destination address reside in the same area. For example, N1 and N2 in Area 1 (Figure 1). Information that is about other areas does not affect this type of routing.
Inter-area routing occurs when the packet's source and destination addresses reside in different areas of an AS, for example, N1 of Area 1 and N7 of Area 2 (Figure 1). OSPF does inter-area routing by dividing the path into three contiguous pieces: an intra-area path from source to an area border router; a backbone path between the source and destination areas; and then another intra-area path to the destination. You can visualize this high-level of routing as a star topology with the backbone as hub and each of the areas as a spoke.
Exterior routes are paths to networks that lie outside the AS. These routes originate either from routing protocols, such as Exterior Gateway Protocol (EGP) or from static routes. The exterior routing information that EGP provides does not interfere with the internal routing information that OSPF provides.
OSPF imports external routes in separate levels. The first level, called type 1 routes, is used when the external metric is comparable to the OSPF metric (e.g., they might both use delay in milliseconds). The second level, called external type 2 routes, assumes that the external cost is greater than the cost of any internal OSPF (link-state) path.
Imported external routes are tagged with 32-bits of information. In a router, this 32-bit field indicates the AS number from where the route was received. This enables more intelligent EGP behavior when determining whether to re-advertise the external information to other ASs.
OSPF has a 4-level routing hierarchy as shown below. The set comparison command tells the router where the RIP/EGP/static routes fit in the OSPF hierarchy.
OSPF Config>set comparison
Compare to type 1 or 2 externals [2]?
Figure 30 OSPF Routing Hierarchy
For example, if the comparison is set to 2, when RIP routes are imported into the OSPF domain, they are imported as type 2 externals. All OSPF external type 1 routes override received RIP routes, regardless of metric. However, if the RIP routes have a smaller cost, the RIP routes override OSPF external type 2 routes. The comparison values for all of your OSPF routers must match. If the comparison values set for the routers are inconsistent, your routing will not function properly.
OSPF Commands
Table 38 lists the OSPF commands.
Press Space twice after you type a command to display the available options for each command. Enter help for information about using the command line interface.
[C] means the command is available at the OSPF config> prompt.
[M] means the command is available at the OSPF> prompt.
| Command | Function |
|---|---|
| Add [C] | Adds to already existent OSPF information. You can add ranges to areas, and neighbors to non-broadcast networks. |
| Advertisement [M] | Advertisement expansion. Displays a link state advertisement (LSA) belonging to the OSPF database. |
| Area [M] | Area summary. Displays OSPF area statistics and parameters. |
| AS-external [M] | AS-external advertisements. Lists the AS external advertisements belonging to the OSPF link state database. |
| Database [M] | Database summary. Displays the advertisements belonging to an OSPF area's link state database. |
| Delete [C] | Deletes OSPF information from the current OSPF configuration. |
| Disable [C] | Disables the entire OSPF protocol, AS boundary routing capability, or IP multicast routing. |
| Dump [M] | Dump routing tables. Displays the OSPF routes contained in the routing table. |
| Enable [C] | Enables the entire OSPF protocol, AS boundary routing capability, IP multicast routing, or the subnet advertisement option. |
| Exit [C] [M] | Returns to the previous prompt. |
| IGMP [C] [M] | Displays the Internet Group Management Protocol (IGMP) configuration or monitoring prompt. IGMP detects the presence of multicast host receivers. |
| Interface [M] | Interface summary. Displays OSPF interface statistics and parameters. |
| List [C] | Displays OSPF configuration. |
| Mcache [M] | Displays a list of currently active multicast forwarding cache entries. |
| Mstats [M] | Displays various multicast routing statistics. |
| Neighbor [M] | Neighbor summary. Displays OSPF neighbor statistics and parameters. |
| Ping [M] | Ping address. Used to test for network reachability and fault isolation. |
| Routers [M] | Displays the reachable OSPF area-border routers and AS-boundary routers. |
| Set [C] | Establishes or changes the configuration of OSPF areas, interfaces, or virtual links. Also allows you to set the way in which OSPF routes are compared to information gained from other routing protocols. |
| Size [M] | Displays the number of LSAs currently in the link state database, categorized by type. |
| Statistics [M] | Displays OSPF statistics detailing memory and network usage. |
| Traceroute [M] | Traceroute address. Displays the route taken to a host or network gateway |
| Weight [M] | Dynamically changes the cost of an OSPF interface. |
Add [C]
Adds ranges to OSPF areas as well as neighbors to non-broadcast networks.
Area number [0.0.0.0]? 0.0.0.2
IP Address [0.0.0.0]? 128.185.0.0
IP Address Mask [0.0.0.0]? 255.255.0.0
Inhibit advertisement? [No]:
Interface IP address [0.0.0.0]? 128.185.138.19
IP Address of Neighbor [0.0.0.0]? 128.185.138.21
Can that router become Designated Router [Yes]?
A link state advertisement is defined by its link state type, link state ID and its advertising router. There is a separate link state database for each OSPF area. Providing an area-id on the command line tells the software which database you want to search.
Note: Link State IDs, advertising routers (specified by their router IDs), and area IDs take the same format as IP addresses. For example, you can enter the backbone area as 0.0.0.0.
The different kinds of advertisements, which depend on the value given for link-state-type, areRouter linksContain descriptions of a single router's interface.
Network linksContain the list of routers attached to a particular interface.
Summary netsContain descriptions of a single inter-area route.
Summary AS boundary routersContain descriptions of the route to an AS boundary router in another area.
AS external netsContain descriptions of a single route.
Multicast group membershipsContain descriptions of a particular group's membership in the neighborhood of the advertising router.
When displaying router-LSAs and network-LSAs, the reverse cost of each router-to-router link and router-to-transit-network link is displayed, as well as the previously displayed forward cost. This is done because routing of multicast datagrams whose source lies in different areas/ASs is based on reverse cost instead of forward cost. In cases where there is no reverse link (which means that the Dijkstra will never use the link), the reverse cost is shown as "1-way."
The "LS destination" of each group-membership-LSA is a group address. A router originates a group-membership-LSA for each group with members on one or more of the router's attached networks. The group-membership-LSA for the group lists the attached transit networks having type "2" vertices and when there are members belonging to one or more attached stub networks, or if the router itself is a member of the multicast group, a type "1" vertex.
advertisement
Link state type [1]?
Link state ID (destination) [0.0.0.0]? 10.1.2.7
For which area [0.0.0.0]? 2.2.2.2LS age: 437
LS options: E,MC
LS type: 1
LS destination (ID): 10.1.2.7
LS originator: 10.1.2.7
LS sequence no: 0x80000025
LS checksum: 0xB13C
LS length: 72
Router type:
# router ifcs: 4
Link ID: 10.1.50.16
Link Data: 10.1.2.7
Interface type: 1
No. of metrics: 0
TOS 0 metric: 1 (1)
Link ID: 10.1.22.0
Link Data: 255.255.255.0
Interface type: 3
No. of metrics: 0
TOS 0 metric: 1
Link ID: 10.1.2.16
Link Data: 255.255.255.255
Interface type: 3
No. of metrics: 0
TOS 0 metric: 1
Link ID: 10.1.50.7
Link Data: 255.255.255.255
Interface type: 3
No. of metrics: 0
TOS 0 metric: 0
The LS age, LS options, LS type, LS destination, LS originator, LS sequence no, LS checksum and LS length fields are common to all advertisements. The Router type and # router ifcs are seen only in router links advertisements. Each link in the router advertisement is described by the Link ID, Link Data, and Interface type fields. Each link can also be assigned a separate cost for each IP Type of Service (TOS); this is described by the No. of metrics and TOS 0 metric fields (the router currently does not router based on TOS, and looks at the TOS 0 cost only).
The next example shows an expansion of a group-membership advertisement. A group-membership advertisement for a given group/advertising router combination lists those networks directly attached to the advertising router which have group members. It also lists whether the router itself is a member of the specified group. The example below shows that network 128.185.184.0 has members of group 224.0.1.1.
Example: adv 6 224.0.1.1 128.185.184.114
For which area [0.0.0.0]?
LS age: 168
LS options: E
LS type: 6
LS destination (ID): 224.0.1.1
LS originator: 128.185.184.114
LS sequence no: 0x80000001
LS checksum: 0x7A3
LS length: 28
Vertex type: 2
Vertex ID: 128.185.184.114
Area [M]
Displays the statistics and parameters for all OSPF areas attached to the router.
In the example below, the router attaches to a single area (the backbone area) and uses a simple password scheme for the area's authentication. The router has three interfaces attaching to the area, and has found 4 transit networks, 7 routers and no area border routers when calculating the SPF tree for the backbone.
Example:area summary
Area ID Authentication #ifcs #nets #rtrs #brdrs
2.2.2.2 None 1 2 5 3
0.0.0.0 None 1 0 2 2
5.5.5.5 None 1 1 3 1
AS-external [M]
Lists the AS external advertisements that belong to the OSPF link state database. Each advertisement is defined by the following parameters: its link state type (always 5 for AS external advertisements), its link state ID (called the LS destination), and the advertising router (called the LS originator).
as-external
Type LS destination LS originator Seqno Age Xsum
5 0.0.0.0 128.185.123.22 0x80000084 430 0x41C7
5 128.185.131.0 128.185.123.22 0x80000080 450 0x71DC
5 128.185.132.0 128.185.123.22 0x80000080 450 0x66E6
5 128.185.144.0 128.185.123.22 0x80000002 329 0xF2CA
5 128.185.178.0 128.185.123.22 0x80000081 450 0x72AA
5 128.185.178.0 128.185.129.40 0x80000080 382 0xDD28
5 129.9.0.0 128.185.123.22 0x80000082 451 0x4F30
5 129.9.0.0 128.185.126.24 0x80000080 676 0x324A
5 134.216.0.0 128.185.123.22 0x80000082 451 0x505A
5 134.216.0.0 128.185.126.24 0x80000080 676 0x3374
5 192.9.3.0 128.185.123.22 0x80000082 451 0xF745
5 192.9.3.0 128.185.126.24 0x80000080 677 0xDA5F
5 192.9.12.0 128.185.123.22 0x80000082 452 0x949F
5 192.9.12.0 128.185.128.41 0x80000080 679 0x31B2
5 192.26.100.0 128.185.123.22 0x80000081 452 0xFDCD
5 192.26.100.0 128.185.126.24 0x80000080 21 0xDEE8
etc.
# advertisements: 133
Checksum total: 0x43CC41
The end of the display shows the total number of AS external advertisements, along with a checksum total over all of their contents. The checksum total is simply the 32-bit sum (carries discarded) of the individual advertisement's LS checksum fields. You can use this information to quickly determine whether two OSPF routers have synchronized databases.
Database [M]
Displays the contents of a particular OSPF area's link state database. AS external advertisements are omitted from the display. Each advertisement is defined by the following parameters: link state type (called Type), link state ID (called the LS destination) and the advertising router (called the LS originator).
Syntax: database summary area-id
Example:database
For which area [0.0.0.0]? 0.0.0.0
Type LS destination LS originator Seqno Age Xsum
1* 10.1.2.7 10.1.2.7 0x80000025 390 0xB13C
1* 10.1.26.9 10.1.26.9 0x80000016 393 0x987D
1* 10.1.26.41 10.1.26.41 0x80000018 122 0x533D
1* 10.1.40.40 10.1.40.40 0x80000015 192 0x317C
1* 10.1.50.16 10.1.50.16 0x80000031 394 0x7A74
2* 10.1.25.40 10.1.40.40 0x80000006 193 0xCB35
2* 10.1.26.16 10.1.50.16 0x80000007 401 0x9669
3* 10.2.50.9 10.1.26.9 0x80000010 397 0xA430
3* 10.5.0.0 10.1.26.41 0x8000000F 133 0x4E9E
3* 10.5.50.41 10.1.26.9 0x80000006 394 0x5D5D
3* 128.185.214.0 10.1.40.40 0x8000000E 740 0x3CA2
6 224.185.0.0 10.1.50.16 0x8000000F 469 0x9B7A
6 225.0.1.36 10.1.2.7 0x80000006 405 0x5CC8
6 225.0.1.36 10.1.26.9 0x8000000F 404 0x8265
6 225.0.1.36 10.1.26.41 0x8000000F 133 0x3A4
6 225.0.1.36 10.1.40.40 0x8000000E 755 0x1D71
6 225.0.1.100 10.1.50.16 0x80000006 476 0x5E14
# advertisements: 17
Checksum total: 0x73121
The end of the display shows the total number of advertisements in the area databas, along with a checksum total over all of their contents. The checksum total is simply the 32-bit sum (carries discarded) of the individual advertisement's LS checksum fields. You can use this information to quickly determine whether two OSPF routers have synchronized databases.
Note: When comparing multicast-capable to non-multicast routers, the above database checksum (and also # advertisements) does not necessarily match because non-multicast routers do not handle or store group-membership-LSAs.
Area number [0.0.0.0]? 1.1.1.1
IP Address [0.0.0.0]? 128.185.0.0
IP Address Mask [0.0.0.0]? 255.255.0.0
interface interface-IP-address
Deletes an interface from the current OSPF configuration.
Example: delete interface 128.185.138.19
neighbor
Deletes neighbors on non-broadcast networks from the current OSPF configuration.
Interface IP address [0.0.0.0]? 128.185.138.19
IP Address of Neighbor [0.0.0.0]? 128.185.138.21
Virtual endpoint (Router ID) [0.0.0.0]?
Link's transit area [0.0.0.1]?
Example: disable as boundary routing
multicast
Disables IP multicast routing on all interfaces. When disabled, the router does not forward IP multicast (Class D) datagrams.
Example: disable multicast forwarding
ospf
Disables the entire OSPF protocol.
Example: disable OSPF routing protocol
subnet
Disables the subnet advertisement option on a selected interface.
Interface IP address [0.0.0.0]?
dump
Type Dest net Mask Cost Age Next hop(s)
Sbnt 10.0.0.0 FF000000 1 0 None
Rnge 10.1.0.0 FFFF0000 1 0 None
SPF 10.1.2.7 FFFFFFFF 2 2 10.1.26.16
SPF 10.1.2.16 FFFFFFFF 3 3 10.1.26.16
SPF 10.1.7.16 FFFFFFFF 3 3 10.1.26.16
SPF 10.1.7.40 FFFFFFFF 2 2 10.1.26.16
SPF 10.1.22.0 FFFFFF00 3 3 10.1.26.16
SPF 10.1.25.0 FFFFFF00 2 2 10.1.26.16
SPF* 10.1.26.0 FFFFFF00 1 1 FDDI/0
SPF 10.1.40.40 FFFFFFFF 2 2 10.1.26.16
SPF 10.1.50.7 FFFFFFFF 2 2 10.1.26.16
SPF 10.1.50.16 FFFFFFFF 1 1 10.1.26.16
SPF 10.2.50.9 FFFFFFFF 1 1 10.1.26.9
Rnge 10.5.0.0 FFFF0000 1 0 None
Dir* 10.5.9.0 FFFFFF00 1 0 SL/0
SPF 10.5.9.14 FFFFFFFF 1 1 10.5.9.14
SPF 10.5.9.41 FFFFFFFF 2 2 SL/0
SPF 10.5.22.0 FFFFFF00 8 8 10.5.9.14
SPF 10.5.33.0 FFFFFF00 2 2 10.5.9.14
SPF 10.5.50.14 FFFFFFFF 1 1 10.5.9.14
SPF 10.5.50.41 FFFFFFFF 0 0 SINK/0
Stat* 128.185.0.0 FFFF0000 1 0 10.1.26.16
Routing table size: 768 nets (49152 bytes), 22 nets known
Enable [C]
Enables either the entire OSPF protocol or just the AS boundary routing capability, IP multicast routing, or the subnet advertisement option.
Import EGP routes(Yes or No): yes
Import RIP routes(Yes or No): no
Import static routes(Yes or No): no
Import direct routes(Yes or No): yes
Import subnet routes(Yes or No): no
Originate default if EGP routes available []? yes
From AS number [0]? 12
To network number [0.0.0.0]? 10.0.0.0
Originate as type 1 or 2 [2]?
Default route cost [1]?
Inter-area multicasting enabled (Yes or No): yes
Inter-AS multicasting enabled (Yes or No): yes
On networks that lie on the edge of an Autonomous System, where multiple multicast routing protocols (or multiple instances of a single multicast routing protocol) may exist, you may need to configure forwarding as data-link unicasts to avoid unwanted datagram replication. In any case, for all routers attached to a common network, the interface parameters forward multicast datagrams and forward as data-link unicasts should be configured identically.
ospf
Enables the OSPF protocol. When enabling OSPF, you must supply the following values that are used to estimate the size of the OSPF link state database:
Total number of AS external routes that will be imported into the OSPF routing domain.
A single destination may lead to multiple external routes when separate AS boundary routers import the destination. For example, if the OSPF routing domain has two AS boundary routers, both importing routes to the same 100 destinations, set the number of AS external routes to 200.
Total number of OSPF routers in the routing domain.
enable ospf
Estimated # external routes[0]? 200
Estimated # OSPF routers [0]? 60
Interface IP address [0.0.0.0]?
igmp
Internet Group Management Protocol Configuration
IGMP Config>
Syntax: interface interface-ip-address
Example:interface
Ifc Address Phys assoc. Area Type State #nbrs #adjs
10.1.26.41 FDDI/0 2.2.2.2 Brdcst 32 2 2
10.5.9.41 SL/0 5.5.5.5 P-P 8 2 1
- Unnumbered - VL/0 0.0.0.0 VLink 8 1 1
Example: interface 128.185.125.22
Interface address: 10.1.26.41
Attached area: 2.2.2.2
Physical interface: FDDI/0
Interface mask: 255.255.255.0
Interface type: Brdcst
State: 32
Designated Router: 10.1.26.16
Backup DR: 10.1.26.41
DR Priority: 1 Hello interval: 10 Rxmt interval: 5
Dead interval: 40 TX delay: 1 Poll interval: 0
Max pkt size: 4352 TOS 0 cost: 1
# Neighbors: 2 # Adjacencies: 2 # Full adjs.: 2
# Mcast floods: 31 # Mcast acks: 98
MC forwarding: on DL unicast: off IGMP monitor: on
# MC data in: 0 # MC data acc: 0 # MC data out: 0
List [C]
Displays OSPF configuration information.
--Global configuration--
OSPF Protocol: Enabled
# AS ext. routes: 5000
Estimated # routers: 50
External comparison: Type 2
AS boundary capability: Disabled
Multicast forwarding: Enabled
Inter-area multicast: Enabled
Inter-AS multicast: Disabled
--Area configuration--
Area ID AuType Stub? Default-cost Import-summaries?
2.2.2.2 0=None No N/A N/A
0.0.0.0 0=None No N/A N/A
5.5.5.5 0=None Yes 0 Yes
--Area ranges--
Area ID Address Mask Advertise?
2.2.2.2 10.1.0.0 255.255.0.0 Yes
5.5.5.5 10.5.0.0 255.255.0.0 Yes
--Interface configuration--
IP address Area Cost Rtrns TrnsDly Pri Hello Dead
10.1.26.41 2.2.2.2 1 5 1 1 10 40
10.5.9.41 5.5.5.5 1 5 1 1 10 40
Multicast parameters
IP address MCForward DLUnicast
10.1.26.41 On Off
10.5.9.41 On Off
--Virtual link configuration--
Virtual endpoint Transit area Rtrns TrnsDly Hello Dead
10.1.26.9 2.2.2.2 10 5 30 180
--NBMA configuration--
Interface Addr Poll Interval
10.5.9.41 120
--Neighbor configuration--
Neighbor Addr Interface Address DR eligible?
10.5.9.14 10.5.9.41 yes
areas
Lists all information concerning configured OSPF areas.
--Area configuration--
Area ID Stub? Default-cost Import-summaries?
1.1.1.1 Yes 0 Yes
|
Area-ID
| Attached area ID (area summary information). |
|
Stub area
| Displays whether or not the area being summarized is a stub area. |
interfaces
For each interface its IP address is printed, together with configured parameters.
--Interface configuration--
IP address Area Cost Rtrns TrnsDly Pri Hello Dead162.6.0.34 1.1.1.1 1 5 1 1 10 40
128.185.5.2 0.0.0.0 1 5 1 1 10 40
128.185.5.9 0.0.0.0 1 5 1 1 10 40
IP address AuType MDId SbntOpt IfcType NBMAPoll
162.6.0.34 0=None 0 Off Deflt 120
128.185.5.2 2=Crypto 4 Off Deflt 120
128.185.5.9 2=Crypto 4 Off P-2-MP 120
Multicast parameters
IP address MCForward DLUnicast
162.6.0.34 On Off
128.185.5.2 On Off
128.185.5.9 On Off
neighbors
Lists all information related to interfaces connected to non-broadcast networks. For each non-broadcast interface, as long as the router is eligible to become designated router on the attached network, the polling interval is displayed together with a list of the router's neighbors on the non-broadcast network.
Interface Addr Poll Interval
128.185.235.34 120
--Virtual link configuration--
Virtual endpoint Transit area Rtrns TrnsDly Hello Dead
10.1.26.9 2.2.2.2 10 5 30 180
Cache entries are cleared on topology changes (e.g., a point-to-point line in the MOSPF system going up or down), and on group membership changes.
Example:mcache
0: FDDI/0 1: SL/0 2: SL/1
3: SL/2 4: SL/3 5: Eth/0
6: Eth/1 7: Eth/2 8: Eth/3
9: Eth/4 10: Eth/5 11: Eth/6
12: Eth/7 13: Internal
Source Destination Count Upst Downstream
10.5.50.41 225.0.1.100 3 Local 0
10.5.50.14 225.0.1.100 3 1 0
10.2.50.9 225.0.1.100 3 0 None
10.1.50.7 225.0.1.100 3 0 None
10.1.50.16 225.0.1.36 3 0 1,13
There is more information in a multicast forwarding cache entry. You can display a cache entry in detail by providing the source and destination of a matching datagram on the command line. If a matching cache entry is not found, one is built. A sample of this command follows:
Example: mcache 128.185.182.9 224.0.1.2
source Net: 128.185.182.0
Destination: 224.0.1.2
Use Count: 472
Upstream Type: Transit Net
Upstream ID: 128.185.184.114
Downstream: 128.185.177.11 (TTL = 2)
Mstats [M]
Displays various multicast routing statistics. The command indicates whether multicast routing is enabled and whether the router is an inter-area and/or inter-AS multicast forwarder.
mstats
MOSPF forwarding: Enabled
Inter-area forwarding: Enabled
DVMRP forwarding: Disabled
Datagrams received: 4301 Datagrams (ext source): 0
Datagrams fwd (multicast): 4122 Datagrams fwd (unicast): 0
Locally delivered: 2009 No matching rcv interface: 0
Unreachable source: 0 Unallocated cache entries: 0
Off multicast tree: 0 Unexpected DL multicast: 0
Buffer alloc failure: 0 TTL scoping: 0
# DVMRP routing entries: 0 # DVMRP entries freed: 0
# fwd cache alloc: 57 # fwd cache freed: 52
# fwd cache GC: 0 # local group DB alloc: 1
# local group DB free: 0
The number of cache hits can be calculated as the number of datagrams received (Datagrams received) minus the total of datagrams discarded due to No matching rcv interface, Unreachable source and Unallocated cache entries, and minus # local group DB alloc." The number of cache misses is simply # local group DB alloc.
Neighbor [M]
Displays statistics and parameters related to OSPF neighbors. If you include a neighbor's IP address, this command displays detailed statistics for that neighbor.
Syntax: neighbor summary neighbor-ip-address
Example:neighbor
Neighbor addr Neighbor ID State LSrxl DBsum LSreq Ifc
128.185.125.39 128.185.136.39 128 0 0 0 Pro/1
128.185.125.41 128.185.128.41 8 0 0 0 Pro/1
128.185.125.38 128.185.125.38 8 0 0 0 Pro/1
128.185.125.25 128.185.129.25 8 0 0 0 Pro/1
128.185.125.40 128.185.129.40 128 0 0 0 Pro/1
128.185.125.24 128.185.126.24 8 0 0 0 Pro/1
Example: neighbor 128.185.138.39
The meaning of most of the displayed fields is given in section 10 of the OSPF specification (RFC 1131).
Neighbor IP address: 128.185.184.34
OSPF Router ID: 128.185.207.34
Neighbor State: 128
Physical interface: Eth/1
DR choice: 128.185.184.34
Backup choice: 128.185.184.11
DR Priority: 1
Nbr options: E,MC
DB summ qlen: 0 LS rxmt qlen: 0 LS req qlen: 0
Last hello: 7
# LS rxmits: 108 # Direct acks: 13 # Dup LS rcvd: 572
# Old LS rcvd: 2 # Dup acks rcv: 111 # Nbr losses: 29
# Adj. resets: 30
Ping [M]
Ping uses the ICMP protocol's ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from the specified host or network gateway. Ping is generally used to test for reachability between network nodes.
ping 10.1.155.29
-----------10.1.151.29 PING Statistics-------------
7 packets transmitted, 7 packets received, 0% packet loss
Note: The routers command shows only border routers, used to calculate inter-area routes, and boundary routers, used to calculate external routes.
Syntax: routers Example:routers
DType RType Destination Mask Cost Next hop(s)
ASBR SPF 128.185.142.9 FFFFFFFF 1 128.185.142.9
Fadd SPF 128.185.142.98 FFFFFFFF 1 0.0.0.0
Fadd SPF 128.185.142.7 FFFFFFFF 1 0.0.0.0
Fadd SPF 128.185.142.48 FFFFFFFF 1 0.0.0.0
Fadd SPF 128.185.142.111 FFFFFFFF 1 0.0.0.0
Fadd SPF 128.185.142.38 FFFFFFFF 1 0.0.0.0
Fadd SPF 128.185.142.11 FFFFFFFF 1 0.0.0.0
BR SPF 128.185.142.9 FFFFFFFF 1 128.185.142.9
BR SPF 128.185.142.9 FFFFFFFF 2 128.185.184.114
Fadd SPF 128.185.142.47 FFFFFFFF 1 0.0.0.0
Set [C]
Establishes or changes the configuration information of OSPF areas, interfaces, or virtual links. This command also lets you set the way in which OSPF routes are compared to information obtained from other routing protocols.
Area number [0.0.0.0]? 0.0.0.1
Is this a stub area? [No]: yes
Stub default cost [0]?Import summaries? [Yes]:
comparison
Tells the router where the EGP/RIP/static routes fit in the OSPF hierarchy. The two lower levels consist of the OSPF internal routes. OSPF internal routes take precedence over information gained from any other sources, all of which are located on a single level.
Compare to type 1 or 2 externals [2]?
Interface IP address [0.0.0.0]? 128.185.123.99
Attaches to area [0.0.0.0]?
Retransmission Interval (in seconds) [5]?
Transmission Delay (in seconds) [1]?
Router Priority [1]?
Hello Interval (in seconds) [10]?
Dead Router Interval (in seconds) [40]?
Type Of Service 0 cost [1]?
Authentication Type (0:NONE, 1:SIMPLE, 2:CRYPTOGRAPHIC) [0]? 2
Message Digest Key ID [0]? 4
MD5 Key?
Retype MD5 Key?
Override the default OSPF interface-type? [No]: yes
OSPF interface-type override
(1=broadcast, 3=NBMA, 5=point-to-multipoint) [0]? 5
Forward multicast datagrams? [Yes]:
Forward as data-link unicasts? [No]:If you select interface type 3 (NBMA):
(1=broadcast, 3=NBMA, 5=point-to-multipoint) [0]? 3
Poll Interval [120]?
The default OSPF interface type depends on the physical medium the interface is running over. See the following table.
|
Authentication Type
| Security scheme used for the interface. The choices are: |
|
Message Digest Key ID
| |
|
Default OSPF interface type
|
virtual-link
Configures virtual links between any two area border routers. To maintain backbone connectivity you must have all of your backbone routers interconnected either by permanent or virtual links. Virtual links are considered to be separate router interfaces connecting to the backbone area. Therefore, you are asked to also specify many of the interface parameters when configuring a virtual link.
Virtual endpt. (Router ID) [0.0.0.0]? 128.185.138.21
Link's transit area [0.0.0.1]? 0.0.0.1
Retransmission Interval (in seconds) [10]?
Transmission Delay (in seconds) [5]?
Hello Interval (in seconds) [30]?
Dead Router Interval (in seconds) [180]?
Authentication Key []? 3-14159
size
# Router-LSAs: 7
# Network-LSAs: 6
# Summary-LSAs: 14
# Summary Router-LSAs: 2
# AS External-LSAs: 44
# Group-membership-LSAs: 21
statistics
S/W version: 2.1
OSPF Router ID: 10.1.26.41
External comparison: Type 2
AS boundary capability: No
Import external routes: None
Orig. default route: No (0,0.0.0.0)
Default route cost: (1, Type 2)
Default forward. addr: 0.0.0.0
Attached areas: 3 Estimated # external routes: 5000
Estimated # OSPF routers: 50 Estimated heap usage: 464800
OSPF packets rcvd: 3682 OSPF packets rcvd w/ errs: 0
Transit nodes allocated: 192 Transit nodes freed: 177
LS adv. allocated: 460 LS adv. freed: 431
Queue headers alloc: 32 Queue headers avail: 32
# Dijkstra runs: 86 Incremental summ. updates: 1
Incremental VL updates: 21 Buffer alloc failures: 0
Multicast pkts sent: 2465 Unicast pkts sent: 33
LS adv. aged out: 0 LS adv. flushed: 86
Incremental ext. updates: 84External LSA database:
Current state: Normal
Number of LSAs: 0
Number of overflows: 0
Traceroute [M]
Traceroute works similarly to ping, and is used to test for connectivity and isolate faults in the network. Unlike ping, traceroute records and displays the route taken to the host or