NLPID: 0xcc
IP Address: 192.168.1.105
Metric: 10 IS 0000.0000.6666.01
Metric: 10 IS 0000.0000.3333.00
Metric: 10 IS 0000.0000.7777.00
Metric: 30 IP 20.20.20.0 255.255.255.0
Metric: 30 IP 20.20.21.0 255.255.255.0
Configuration Example 3
The following example demonstrates how to use an access list to filter routes advertised
to a BGP device. Consider the network structure in Figure 2 on page 22.
Figure 2: Filtering with Access Lists
The following commands configure router Boston to apply access list reject1 to routes
inbound from router SanJose. Access list reject1 rejects routes matching 172.24.160.0/19.
host1(config)#
router bgp 17
host1(config-router)#
neighbor 10.5.5.4 remote-as 873
host1(config-router)#
neighbor 10.5.5.4 distribute-list reject1 in
host1(config-router)#
exit
host1(config)#
access-list reject1 permit 172.24.48.0 0.0.255
host1(config)#
access-list reject1 deny 172.24.160.0 0.0.0.255
host1(config)#
access-list reject1 permit 172.24.24.0 0.0.0.255
Filtering AS Paths
You can use a filter list to filter incoming and outgoing routes based on the value of the
AS-path attribute. Whenever a BGP route passes through an AS, BGP prepends its AS
number to the AS-path attribute. The AS-path attribute is the list of ASs that a route has
passed through to reach a destination.
To filter routes based on the AS path, define the access list with the
ip as-path access-list
command, and apply the list to routes received from or passed to a neighbor with the
neighbor filter-list
command. AS-path access lists use regular expressions to describe
the AS path to be matched. A regular expression uses special characters—often referred
to as metacharacters—to define a pattern that is compared with an input string. For a
full discussion of regular expressions, with examples of how to use them, see “Using
Regular Expressions” on page 42.
Copyright © 2010, Juniper Networks, Inc.
22
JunosE 11.2.x IP Services Configuration Guide
Содержание JUNOSE 11.2.X IP SERVICES
Страница 6: ...Copyright 2010 Juniper Networks Inc vi...
Страница 8: ...Copyright 2010 Juniper Networks Inc viii JunosE 11 2 x IP Services Configuration Guide...
Страница 18: ...Copyright 2010 Juniper Networks Inc xviii JunosE 11 2 x IP Services Configuration Guide...
Страница 22: ...Copyright 2010 Juniper Networks Inc xxii JunosE 11 2 x IP Services Configuration Guide...
Страница 28: ...Copyright 2010 Juniper Networks Inc 2 JunosE 11 2 x IP Services Configuration Guide...
Страница 116: ...Copyright 2010 Juniper Networks Inc 90 JunosE 11 2 x IP Services Configuration Guide...
Страница 144: ...Copyright 2010 Juniper Networks Inc 118 JunosE 11 2 x IP Services Configuration Guide...
Страница 230: ...Copyright 2010 Juniper Networks Inc 204 JunosE 11 2 x IP Services Configuration Guide...
Страница 262: ...Copyright 2010 Juniper Networks Inc 236 JunosE 11 2 x IP Services Configuration Guide...
Страница 294: ...Copyright 2010 Juniper Networks Inc 268 JunosE 11 2 x IP Services Configuration Guide...
Страница 328: ...Copyright 2010 Juniper Networks Inc 302 JunosE 11 2 x IP Services Configuration Guide...
Страница 345: ...PART 2 Index Index on page 321 319 Copyright 2010 Juniper Networks Inc...
Страница 346: ...Copyright 2010 Juniper Networks Inc 320 JunosE 11 2 x IP Services Configuration Guide...
Страница 356: ...Copyright 2010 Juniper Networks Inc 330 JunosE 11 2 x IP Services Configuration Guide...