Networking Guide
Chapter 5, Configuring Internet Protocol (IP) routing

Specifying the source (export_list)

Specifying the source (export_list)

The export_list specifies export based on the origin of a route, and the syntax varies depending on the source.

All the formats below with the variable route_filter allow route filters. See ``gated route filtering'' for a detailed explanation of how they work. When no route filtering is specified (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 exported. Put differently, if any filters are specified, an ``all restrict ;'' is assumed at the end of the list.

Exporting BGP and EGP routes
   proto bgp | egp autonomoussystem autonomous_system
       restrict ;
   proto bgp | egp autonomoussystem autonomous_system
       [ metric metric ] {
       route_filter [ restrict | ( metric metric ) ] ;
   } ;
BGP and EGP routes may be specified by source autonomous_system. All routes may be exported by AS path; see below for more information.

Exporting RIP routes
proto rip
    [ ( interface interface_list ) | (gateway gateway_list ) ]
    restrict ;
proto rip
    [ ( interface interface_list ) | (gateway gateway_list ) ]
    [ metric metric ] {
    route_filter [ restrict | ( metric metric ) ] ;
} ;
RIP routes may be exported by protocol, source interface, and/or source gateway.

Exporting OSPF routes
proto ospf | ospfase restrict ;
proto ospf | ospfase [ metric metric ] {
    route_filter [ restrict | ( metric metric ) ] ;
} ;
Both OSPF and OSPF ASE routes may be exported into other protocols. See below for information on exporting by tag.

Exporting routes from nonrouting protocols with interface
proto direct | static
    [ (interface interface_list ) ]
    restrict ;
proto direct | static
    [ (interface interface_list ) ]
    [ metric metric ] {
    route_filter [ restrict | ( metric metric ) ] ;
} ;
These protocols may be exported by protocol or by the interface of the next hop. These protocols are:

direct
routes to directly attached interfaces

static
static routes specified in a static clause

Exporting routes from nonrouting by protocol
proto default
    restrict ;
proto default
    [ metric metric ] {
    route_filter [ restrict | ( metric metric ) ] ;
} ;
These protocols may only be referenced by protocol. The keyword default refers to routes created by the gendefault option.

Exporting by AS path
proto proto aspath aspath_regexp
    origin [ any | igp | egp | incomplete ]
    restrict ;
proto proto aspath aspath_regexp
    origin [ any | igp | egp | incomplete ]
    [ metric metric ] {
    route_filter [ restrict | ( metric metric ) ] ;
} ;
When BGP is configured, all routes are assigned an AS path when they are added to the routing table. For all interior routes, this AS path specifies igp as the origin and no ASEs in the AS path (the current AS is added when the route is exported). For EGP routes, this AS path specifies EGP as the origin and the source AS as the AS path. For BGP routes, the AS path is stored as learned from BGP.

Exporting by route tag
proto proto tag tag restrict ;
proto proto tag tag
    [ metric metric ] {
    route_filter [ restrict | ( metric metric ) ] ;
} ;
Both OSPF and RIP Version 2 currently support tags; all other protocols always have a tag of zero. The source of exported routes may be selected based on this tag. This is useful when routes are classified by tag when they are exported into a given routing protocol.