BGP选路原则(1)-Aa-path

 

3AS-PATH

默认情况下R4bgp表中:

R4#sh ip bgp

BGP table version is 2, local router ID is 44.44.44.44

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*  1.1.1 .0/24       34.1.1.3                               0 23 1 i

*>                24.1.1.2                               0 23 1 i

修改as-path改变选路

R4

R4(config)#ip prefix-list 1 per 1.1.1 .0/24

R4(config)#route-map as-path per 10

R4(config-route-map)#mat ip add prefix-list 1

R4(config-route-map)#set as-path prepend 100 200

R4(config)#router bgp 4

R4(config-router)#nei 24.1.1.2 route-map as-path in

 

在看BGP表:

R4#sh ip bgp

BGP table version is 3, local router ID is 44.44.44.44

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*> 1.1.1 .0/24       34.1.1.3                               0 23 1 i

*                   24.1.1.2                               0 100 200 23 1 i

这里也可以在R2上做route-map来实现

 

你可能感兴趣的:(职场,休闲,BGP,AS-PATH,选路原则)