Chapter 16 BGP Configuration
Confidential and Proprietary Information of ZTE CORPORATION 241
FIGURE 99 LOCAL PREFERENCE ATTRIBUTE
AS100
AS256
AS300
1.1.1.2/30
3.3.3.2/30
R3 R4
1.1.1.1/30
R1 R2
R5
170.10.0.0/24
128.213.11.1/30
128.213.11.2/30
3.3.3.1/30
IBGP
R6
AS34
LOC=150 LOC=200
In the following, two methods are used to configure the
LOCAL_PREF attribute.
Use the command bgp default local-preference to
configure the LOCAL_PREF attribute.
E
ND OF STEPS
Configuration of R3:
ZXR10_R3(config)#router bgp 256
ZXR10_R3(config-router)#neighbor 1.1.1.1 remote-as 100
ZXR10_R3(config-router)#neighbor 128.213.11.2 remote-as 256
ZXR10_R3(config-router)#bgp default local-preference 150
Configuration of R4:
ZXR10_R4(config)#router bgp 256
ZXR10_R4(config-router)#neighbor 3.3.3.2 remote-as 300
ZXR10_R4(config-router)#neighbor 128.213.11.1 remote-as 256
ZXR10_R4(config-router)#bgp default local-preference 200
Use the route-map command to configure the LOCAL_PREF
attribute
Configuration of R4:
ZXR10_R4(config)#router bgp 256
ZXR10_R4(config-router)#neighbor 3.3.3.2 remote-as 300
ZXR10_R4(config-router)#neighbor 3.3.3.2 route-map setlocalin in
ZXR10_R4(config-router)#neighbor 128.213.11.1 remote-as 256
...
ZXR10_R4(config)#ip as-path access-list 7 permit ^300$
...
ZXR10_R4(config)#route-map setlocalin permit 10
ZXR10_R4(config-route-map)#match as-path 7