HP-UX Routing Services Administrator's Guide HP-UX 11i v2, HP-UX 11i v3 (B2355-91153, November 2011)

In a defaults statement in the OSPF protocol configuration. This preference definition
specifies the preference value of ASE routes that are imported into OSPF. See AS External
Routes (AS Boundary Routers Only)” (page 39) for more information. ASE routes are imported
into OSPF with a default preference of 150.
In an import statement in the Control class of the /etc/gated.conf file. This preference
definition overrides any preference defined in the defaults section of the OSPF protocol
configuration. See AS External Routes (AS Boundary Routers Only)” (page 39) and “Importing
and Exporting Routes” (page 47) for more information.
Importing and Exporting Routes
You can propagate routes from one routing protocol to another using the import and export
control statements. Routes are imported into a gated forwarding table and exported out to the
routing protocols.
For more information on import and export statements, type man 4 gated.conf at the HP-UX
prompt.
The import Statement
import statements restrict or control routes that are imported to the gated forwarding table.
When routes are imported to the gated forwarding table, you can export them to the routing
protocols. You can use import statements to perform the following tasks:
Prevent routes from being imported into the gated forwarding table by using a restrict
clause.
Assign a preference value to use when comparing a route with other routes from other protocols.
The route with the lowest preference is installed in the gated forwarding table. The individual
protocols configure the default preferences.
The format of the import statement varies depending on the protocol from which you are importing
routes.
With OSPF, you can apply import statements only to OSPF ASE routes. All OSPF intra-area and
inter-area routes are imported into the gated forwarding table with an assigned preference of
10.
The export Statement
export statements determine the routes that are exported from the gated forwarding table to
the routing protocols. You can also restrict the routes that are exported and assign metrics (values
used for route selection) to them. These metrics are applied only after the routes are exported.
The format of the export statement varies depending on the original protocol used to build the
routes that you are exporting, and the protocol to which you are exporting routes.
Examples of import and export Statements
The following import statement imports a BGP route for network 195.1.1 to the gated forwarding
table with a preference of 15:
import proto bgp as 1 {
195.1.1 mask 0xffffff00 preference 15;
};
The following export statement exports to OSPF the ASE route that was imported to the gated
forwarding table in the previous example. The route was originally built by BGP and the destination
of the route is network 195.1.1.
export proto ospfase type 1 /* Export an ASE route to OSPF */
proto bgp as 1 {/*route came from BGP and AS 1*/
195.1.1 ; /* the route is to network 195.1.1 */
Importing and Exporting Routes 47