Riverstone Networks WICT1-12 User Manual

Page 268

Advertising
background image

16-10 Riverstone Networks RS Switch Router User Guide Release 8.0

Basic BGP Tasks

BGP Configuration Guide

route-map-in

(import) or

route-map-out

(export) option of the

bgp set peer-group

or

bgp set peer-host

commands. For example, the following commands apply the route map with the identifier ’1’ for routes that are
exported to the peer group ’pub1’:

For EBGP, route maps can be applied to either a peer group or a peer host. For IBGP, the

route-map-out

option

cannot be used to set a value for a peer host. If you need to control the export of routes to specific IBGP peers, create
a peer group for each peer and define a group-specific policy. This restriction does not apply to the

route-map-in

option.

Defining Match Criteria in Route Map Conditions

Match criteria in a route map condition describes the BGP route information that is to be filtered. The following match
criteria can be specified:

Route prefix, as specified by a previously-defined route filter or network specification

Source protocol of the route

Next hop for the route, as specified by a previously-defined route filter

BGP local preference value

BGP Multi Exit Descriminator (MED) value

BGP origin attribute

aspath regular expression

Communities in route are either part of or exactly the same as previously-defined community list

When you create a route map, you specify a route map identifier. You can create multiple conditions with the same
identifier. The sequence number in the route map definition specifies the order of a particular condition in relation to
other conditions with the same route map identifier. The condition with the lowest sequence number is applied first. If
the specified condition is not met, the condition with the next-lowest sequence number is applied. A route is checked
against conditions in this manner until a set of route map conditions is met or there are no more conditions. If a route
does not meet any configured route map conditions, the route is not imported, exported, or redistributed.

If a route matches a condition, it is imported, exported, or redistributed, or not, based on the

permit

or

deny

keyword.

All subsequent conditions are ignored. Consequently, conditions that are more specific should always have lower
sequence numbers than conditions that are less specific. In the following example, when the prefix of a route matches
the network address 15.4.0.0, the route is redistributed with a next hop of 12.10.4.13. But when the prefix of a route
matches the network address 13.0.0.0/16, the route is not imported, exported, or distributed.

bgp create peer-group pub1 type external autonomous-system 3937
bgp add peer-host 14.2.3.23 group pub1
bgp set peer-group pub1 route-map-out 1

route-map 1 permit 1 match-prefix network 15.4.0.0/16 set-next-hop 12.10.4.13
route-map 1 deny 2 match-prefix network 15.0.0.0/8

Advertising