See “Access Lists” on page 82 for more information about using access lists.
Configuring the Local-Pref Attribute
The local-pref attribute specifies the preferred path among multiple paths to the same
destination. The preferred path is the one with the higher preference value. Local
preference is used only within an AS, to select an exit point.
To configure the local preference of a BGP path, you can do one of the following:
•
Use the
bgp default local-preference
command to set the local-preference attribute.
•
Use a route map to set the local-pref attribute.
Using the bgp default local-preference Command
In Figure 32 on page 113, AS 873 receives updates for network 192.168.5.0/24 from AS 32
and AS 17.
Figure 32: Configuring the Local-Preference Attribute
The following commands configure router LA:
host1(config-router)#
router bgp 873
host1(config-router)#
neighbor 10.72.4.2 remote-as 32
host1(config-router)#
neighbor 10.2.2.4 remote-as 873
host1(config-router)#
bgp default local-preference 125
The following commands configure router SanJose:
host2(config-router)#
router bgp 873
host2(config-router)#
neighbor 10.5.5.1 remote-as 17
host2(config-router)#
neighbor 10.2.2.3 remote-as 873
host2(config-router)#
bgp default local-preference 200
Router LA sets the local preference for all updates from AS 32 to 125. Router SanJose
sets the local preference for all updates from AS 17 to 200. Because router LA and router
SanJose exchange local preference information within AS 873, they both recognize that
routes to network 192.168.5.0/24 in AS 293 have a higher local preference when they
113
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...