SmartSwitch Router User Reference Manual 167Chapter 11: Routing Policy Configuration GuideThe routes to be exported can be identified by their associated attributes:• Their protocol type (RIP, OSPF, BGP, Static, Direct, Aggregate).• Interface or the gateway from which the route was received.• Autonomous system from which the route was learned.• AS path associated with a route. When BGP is configured, all routes are assigned an ASpath when they are added to the routing table. For interior routes, this AS pathspecifies IGP as the origin and no ASs in the AS path (the current AS is added whenthe route is exported). For BGP routes, the AS path is stored as learned from BGP.• Tag associated with a route. Both OSPF and RIP version 2 currently support tags. Allother protocols have a tag of zero.In some cases, a combination of the associated attributes can be specified to identify theroutes to be exported.Route-FilterThis component specifies the individual routes which are to exported or restricted. Themetric to be associated with these routes can also be explicitly specified using thiscomponent.The metric associated with the exported routes are inherited unless explicitly specified. Ifthere is no metric specified with a route-filter, then the metric is inherited from the onespecified with the export-source.If a metric was not explicitly specified with both the route-filter and the export-source,then it is inherited from the one specified with the export-destination.Every protocol (RIP, OSPF, and BGP) has a configurable parameter that specifies thedefault-metric associated with routes exported to that protocol. If a metric is not explicitlyspecified with the route-filter, export-source as well as export-destination, then it isinherited from the default-metric associated with the protocol to which the routes arebeing exported.Specifying a Route FilterRoutes are filtered by specifying a route-filter that will match a certain set of routes bydestination, or by destination and mask. Among other places, route filters are used withmartians and in import and export policies.The action taken when no match is found is dependent on the context. For instance, aroute that does match any of the route-filters associated with the specified import orexport policies is rejected.