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.
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.
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.
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.
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:
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.
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.
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.