Local-preference
Local Priority Property
Only exchanged between IBGP peers and not advertised to other as
The greater the priority, the higher the priority, the default is 100
For multiple exits of the same as, go out of the way
belongs to any recognized attribute
Note: The source route delivery direction + specified peer+ the direction (Import/export) that you want to pass in order to correctly apply the routing policy.
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/84/89/wKioL1eTYB3DW2H_AABsRilu7Uo264.png-wh_500x0-wm_3 -wmp_4-s_3684372041.png "title=" 00.png "alt=" Wkiol1etyb3dw2h_aabsrilu7uo264.png-wh_50 "/>
The default R5 55.1.1.1 access R1 11.1.1.1 all go R2, by modifying the Local-preference property to make AS200 choose to go out to 11.1.1.1 Select R3
Route-policy LOCAL Permit Node 10
If-match ACL 2000
Apply Local-preference 2289
#
Route-policy LOCAL Permit Node 20
ACL number 2000
Rule 5 Permit Source 11.1.1.1 0
There are two ways of doing this:
First type: Peer 10.1.13.1 route-policy LOCAL import on R3
[R3]dis BGP routing-table
Network nexthop MED locprf prefval Path/ogn
*> 11.1.1.1/32 10.1.13.1 0 2289 0 100i
*>i 55.1.1.1/32 44.1.1.1 0 0 300i
*> 111.1.1.1/32 10.1.13.1 0 0 100i
Only the IBGP peers have a local-preference value, because Local-preference is passed only in IBGP
[R4]dis BGP routing-table
Network nexthop MED locprf prefval Path/ogn
*>i 11.1.1.1/32 33.1.1.1 0 2289 0 100i
* I 22.1.1.1 0 0 100i
*> 55.1.1.1/32 10.1.45.5 0 0 300i
*>i 111.1.1.1/32 22.1.1.1 0 0 100i
* I 33.1.1.1 0 0 100i
[R5]dis BGP routing-table
Network nexthop MED locprf prefval Path/ogn
*> 11.1.1.1/32 10.1.45.4 0 100i
*> 55.1.1.1/32 0.0.0.0 0 0 I
*> 111.1.1.1/32 10.1.45.4 0 100i
[R5]tracert-a 55.1.1.1 11.1.1.1
1 10.1.45.4 ms-MS
2 10.1.34.3 MS is affected by routing policy, select R3
3 10.1.13.1 ms all MS
1 10.1.12.2 ms-MS-MS is not affected by the routing policy and is still selected R2
2 10.1.24.4 ms
3 10.1.45.5 ms
-----------------------------------------------------------------
Second type: at R3 peer 44.1.1.1 route-policy LOCAL Export
[R3]display BGP routing-table
Network nexthop MED locprf prefval Path/ogn
*> 11.1.1.1/32 10.1.13.1 0 2289 0 100i
*>i 55.1.1.1/32 44.1.1.1 0 0 300i
*> 111.1.1.1/32 10.1.13.1 0 0 100i
[R4]dis BGP routing-table
Total number of Routes:5
Network nexthop MED locprf prefval Path/ogn
*>i 11.1.1.1/32 33.1.1.1 0 2289 0 100i
* I 22.1.1.1 0 0 100i
*> 55.1.1.1/32 10.1.45.5 0 0 300i
*>i 111.1.1.1/32 22.1.1.1 0 0 100i
* I 33.1.1.1 0 0 100i
[R5]dis BGP routing-table
Network nexthop MED locprf prefval Path/ogn
*> 11.1.1.1/32 10.1.45.4 0 100i
*> 55.1.1.1/32 0.0.0.0 0 0 I
*> 111.1.1.1/32 10.1.45.4 0 100i
For the first route, because Local-preference is passed between IBGP peers and is not passed to other as. Because R5 does not have IBGP, and there is no R4 passed to R5, the first route local-preference is empty?
[R5]tracert-a 55.1.1.1 11.1.1.1
1 10.1.45.4 ms
2 10.1.34.3 ms
3 10.1.13.1 ms
<r1>tracert-a 11.1.1.1 55.1.1.1
1 10.1.12.2 ms-MS
2 10.1.24.4 ms MS
3 10.1.45.5 ms-MS
This article is from the "Five Corners" blog, please be sure to keep this source http://hi289.blog.51cto.com/4513812/1829188
Local-preference of BGP Route selection