HP-UX Routing Services Administrator's Guide HP-UX 11i v2, HP-UX 11i v3 (B2355-91153, November 2011)
Figure 15 Cost Configuration Example
In Figure 15, there are two possible packet routes between nodes A and D: one route goes through
node B and the other route goes through node C. The cost of each route is calculated as follows:
Node A to node B and node B to node D: 5+5 = 10
Node A to node C and node C to node D: 5+10 = 15
The lowest cost OSPF path between nodes A and D is therefore through node B. However, packets
are rerouted through node C if there is a link failure between node B and LAN 2.
You can optionally define cost in the following places in the /etc/gated.conf file:
• In a defaults statement in the OSPF protocol configuration, which applies only to AS
boundary routers. This cost definition applies to routes to destinations outside the AS. These
routes may have been derived from other routing protocols, such as EGP. See “AS External
Routes (AS Boundary Routers Only)” (page 39) for more information.
• In the export statement in the Control class in the /etc/gated.conf file, which applies
only to AS boundary routers. This cost definition applies to routes that are exported from the
AS boundary router to routers in other autonomous systems.
• In the stub area definition of the OSPF protocol configuration. This cost definition specifies the
cost of the default summary link that is advertised in the area.
• In the stubhosts definition of the OSPF protocol configuration. This cost definition specifies
the cost of a point-to-point interface between the router and a non-OSPF host.
• In the subhosts definition of the OSPF protocol configuration. This cost definition specifies
the cost of a point-to-point interface between the backbone router and a non-OSPF host.
AS External Routes (AS Boundary Routers Only)
AS external (ASE) routes are paths to destinations that are outside the AS. Most ASE routes are
routes to specific destinations. AS boundary routers specify the ASE routes through another routing
protocol, such as EGP, or through configured routes.
gated supports the use of route information from other autonomous systems that use other routing
protocols, such as EGP. AS boundary routers send AS external link advertisements and flood the
AS with advertisements (with the exception of configured stub areas). A single AS external link
advertisement is sent for each external route that the AS boundary router has learned about.
Externally defined routing information and OSPF routing information are maintained separately.
In addition, you can tag the externally defined routing information, to identify and store the source
of the information along with the route information.
Statements in the Control class of the /etc/gated.conf file control the importing of routes from
routing protocols to a gated forwarding table and the exporting of routes from the gated
forwarding table. See “Importing and Exporting Routes” (page 47) for more information.
Configuring the OSPF Protocol 39