host1(config)#
ip as-path access-list 2 permit ^300_
Access list 1 permits any route whose AS-path attribute begins with 100 (specified by
^). This permits routes that pass through router Boston, whether they originate in AS 100
(AS path = 100) or AS 200 (AS path = 100 200) or AS 300 (AS path = 100 200 300).
Access list 2 permits any route whose AS-path attribute begins with 300. This permits
routes that pass through router NY, whether they originate in AS 300 (AS path = 300)
or AS 200 (AS path = 300 200) or AS 100 (AS path = 300 200 100).
The
neighbor filter-list
commands assign a weight attribute of 1000 to routes passing
through router Boston and a weight attribute of 500 to routes passing through router
NY. Regardless of the origin of the route, routes learned through router Boston are
preferred.
ip as-path access-list
•
Use to define a BGP access list; use the
neighbor filter-list
command to apply a specific
access list.
•
You can apply access list filters on inbound or outbound BGP routes, or both.
•
You can
permit
or
deny
access for a route matching the condition(s) specified by the
regular expression.
•
If the regular expression matches the representation of the AS path of the route as an
ASCII string, then the
permit
or
deny
condition applies.
•
The AS path allows substring matching. For example, the regular expression
20
matches
AS path =
20
and AS path =
100 200 300
, because
20
is a substring of each path. To
disable substring matching and constrain matching to only the specified attribute
string, place the underscore (
_
) metacharacter on both sides of the string, for example
_20_
.
•
The AS path does not contain the local AS number.
•
Use the
no
version to remove a single access list entry if permit or deny and a
path-expression are specified. Otherwise, the entire access list is removed.
•
See ip as-path access-list.
neighbor filter-list
•
Use to apply an AS-path access list to advertisements inbound from or outbound to
the specified neighbor, or to assign a weight to incoming routes that match the AS-path
access list.
•
You can specify an optional weight value with the
weight
keyword to assign a relative
importance to incoming routes matching the AS-path access list.
•
The name of the access list is a string of up to 32 characters.
•
You can apply the filter to incoming or outgoing advertisements with the
in
or
out
keywords.
•
If you specify a BGP peer group by using the
peerGroupName
argument, all the members
of the peer group inherit the characteristic configured with this command unless it is
111
Copyright © 2010, Juniper Networks, Inc.
Chapter 1: Configuring BGP Routing
Summary of Contents for JUNOSE 11.2.X BGP AND MPLS
Page 6: ...Copyright 2010 Juniper Networks Inc vi...
Page 8: ...Copyright 2010 Juniper Networks Inc viii JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 38: ...Copyright 2010 Juniper Networks Inc 2 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 192: ...Copyright 2010 Juniper Networks Inc 156 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 242: ...Copyright 2010 Juniper Networks Inc 206 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 244: ...Copyright 2010 Juniper Networks Inc 208 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 310: ...Copyright 2010 Juniper Networks Inc 274 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 356: ...Copyright 2010 Juniper Networks Inc 320 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 418: ...Copyright 2010 Juniper Networks Inc 382 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 524: ...Copyright 2010 Juniper Networks Inc 488 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 544: ...Copyright 2010 Juniper Networks Inc 508 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 608: ...Copyright 2010 Juniper Networks Inc 572 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 672: ...Copyright 2010 Juniper Networks Inc 636 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 674: ...Copyright 2010 Juniper Networks Inc 638 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 716: ...Copyright 2010 Juniper Networks Inc 680 JunosE 11 2 x BGP and MPLS Configuration Guide...
Page 717: ...PART 6 Index Index on page 683 681 Copyright 2010 Juniper Networks Inc...
Page 718: ...Copyright 2010 Juniper Networks Inc 682 JunosE 11 2 x BGP and MPLS Configuration Guide...