next up previous contents index
Next: Route Exportation Up: Configuration Guide Previous: Route filters and

Route Importation

 

  

Importation of routes from routing protocols and installation of the routes in GateD's routing database is controlled by import statements. The format of an import statement varies depending on the protocol.

Specifying preferences

 

When importing a route, a preference can be assigned to the route. This preference will be used for selecting the best next hop to a destination when more than one next hop exist. The preference may be specified with one of the two following keywords:

restrict
Specifies that the routes are not desired in the routing table. In some cases this means that the routes are not installed in the routing table. In others it means that they are installed with a negative preference; this prevents them from becoming active so they will not be installed in the forwarding table, or exported to other protocols.
preference preference
Specifies the preference value used when comparing this route to other routes from other protocols. The route with the lowest preference available at any given route becomes the active route, is installed in the forwarding table, and is eligible to be exported to other protocols. The default preferences are configured by the individual protocols.

Route Filters

The route filters are used to explicitly list the routes the protocol is importing. All the formats allow route filters as shown below. See section 4.25.1 on route filters for a detailed explanation of how they work. When no route filtering is specified (i.e. when restrict is specified on the first line of a statement), all routes from the specified source will match that statement. If any filters are specified, only routes that match the specified filters will be imported. Put differently, if any filters are specified, an ' all restrict;' is assumed at the end of the list.

network [ exact | refines ] network mask mask [ exact | refines ] network masklen number [ exact | refines ] default host host

Importing routes from BGP and EGP

  

import proto ( bgp | egp ) autonomoussystem autonomous_system restrict ; import proto bgp | egp autonomoussystem autonomous_system [ preference preference ] { route_filter [ restrict | ( preference preference ) ] ; } ;

import proto bgp aspath aspath_regexp origin any | ( [ igp ] [ egp ] [ incomplete ] ) restrict ; import proto bgp aspath aspath_regexp origin any | ( [ igp ] [ egp ] [ incomplete ] ) [ preference preference ] { route_filter [ restrict | ( preference preference ) ] ; } ;

The first form restrict all the route from being imported by EGP or BGP. The route are controlled by autonomous system. The second form uses a route_filter to explicitly list a set of routes to be accepted. preference can be used to set a default preference for all the routes in that set.

The two next forms are specific to BGP. They are the same as the two first ones except that the routes are controlled by by the use of an AS path, which are documented in the section 4.25.3 on Matching AS paths.

Note that EGP and BGP versions 2 and 3 only support the propagation of natural networks, so the host and default route filters are meaningless. BGP version 4 supports the propagation of any destination along with a contiguous network mask.

EGP and BGP both store any routes that were rejected implicitly by not being mentioned in a route filter, or explicitly with the restrict keyword in the routing table with a negative preference. A negative preference prevents a route from becoming active, which prevents it from being installed in the forwarding table, or exported to other protocols. This alleviates the need to break and re-establish a session upon reconfiguration if importation policy is changed.

Importing routes from an RIP, HELLO and Redirects

   

import proto ( rip | hello | redirect ) [ ( interface interface_list ) | ( gateway gateway_list ) ] restrict ; import proto ( rip | hello | redirect ) [ ( interface interface_list ) | ( gateway gateway_list ) ] [ preference preference ] { route_filter [ restrict | ( preference preference ) ] ; } ;

The importation of RIP, HELLO and Redirect routes may be controlled by any of protocol, source interface and source gateway. If more than one is specified, they are processed from most general (protocol) to most specific (gateway).

RIP and HELLO don't support the use of preference to choose between routes of the same protocol. That is left to the protocol metrics.

These protocols do not save routes that were rejected since they have short update intervals.

Importing routes from OSPF

 

import proto ospfase [ tag ospf_tag ] restrict ; import proto ospfase [ tag ospf_tag ] [ preference preference ] { route_filter [ restrict | ( preference preference ) ] ; } ;

Due to the nature of OSPF, only the importation of ASE routes may be controlled. OSPF intra- and inter-area routes are always imported into the gated routing table with a preference of 10. If a tag is specified, the import clause will only apply to routes with the specified tag.

It is only possible to restrict the importation of OSPF ASE routes when functioning as an AS border router. This is accomplished by specifying an export ospfase clause. Specification of an empty export clause may be used to restrict importation of ASEs when no ASEs are being exported.

Like the other interior protocols, preference can not be used to choose between OSPF ASE routes, that is done by the OSPF costs. Routes that are rejected by policy are stored in the table with a negative preference.



next up previous contents index
Next: Route Exportation Up: Configuration Guide Previous: Route filters and



Laurent Joncheray
Wed Jun 12 15:35:22 EDT 1996