Установка приоритетных маршрутов на Cisco при использовании BGP

02.11.2002 15:23

В статье "Traffic Engineering: Local Routing Policy" описаны несколько методов манипуляции приоритетами отправки трафика через соседние автономные системы, т.е. описано как в BGP переопределять отправку трафик на определенные сети через определенный канал или управлять балансировкой трафика между каналами.

Примеры файлов конфигурации из статьи:

  

Setting the Local Preference for all routes received from a BGP neighbor

! router bgp 60055 neighbor 192.0.254.17 remote-as 40077 neighbor 192.0.254.17 route-map ispa-in in neighbor 219.2.19.1 remote-as 50066 neighbor 219.2.19.1 route-map ispb-in in ! route-map ispa-in permit 10 set local-preference 90 ! route-map ispb-in permit 10 set local-preference 110 !

Setting the Local Preference depending on AS path

! ip as-path access-list 4 permit _30088_ ip as-path access-list 4 deny .* ! route-map ispa-in permit 10 set local-preference 90 ! route-map ispb-in permit 10 match as-path 4 set local-preference 80 ! route-map ispb-in permit 20 set local-preference 110 !

Prepending the AS path

! ip as-path access-list 4 permit _30088_ ip as-path access-list 4 deny .* ! route-map ispa-in permit 10 set as-path prepend 60055 ! route-map ispb-in permit 10 match as-path 4 set as-path prepend 60055 60055 60055 ! route-map ispb-in permit 20 !

Using communities to help select the best route

! router bgp 60055 bgp always-compare-med ! ip bgp-community new-format ip community-list 1 permit 50066:3001 ip community-list 1 deny ip community-list 2 permit 50066:3002 ip community-list 2 deny ! route-map ispa-in permit 10 set metric 10 ! route-map ispb-in permit 10 match community 1 set metric 10 set local-preference 120 ! route-map ispb-in permit 20 match community 2 set metric 20 ! route-map ispb-in permit 30 set metric 10 !

BGP Load Balancing

! router bgp 60055 maximum-paths 4 !