Скачать презентацию
Идет загрузка презентации. Пожалуйста, подождите
Презентация была опубликована 10 лет назад пользователемДемид Бестужев
1 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v Implementing BGP Using Route Maps to Manipulate Basic BGP Paths
2 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v BGP is designed for manipulating routing paths. BGP Is Designed to Implement Policy Routing
3 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v Changing BGP Local Preference For All Routes bgp default local-preference value Router(config-router)# This command changes the default local preference value. All routes advertised to an IBGP neighbor have the local preference set to the value specified. Local preference is used in these ways: Within an AS between IBGP speakers To determine the best path to exit the AS to reach an outside network Set to 100 by default; higher values preferred
4 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v What is the best path for router C to 65003, 65004, and 65005? Local Preference Case Study
5 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v Router C BGP Table with Default Settings RouterC# show ip bgp BGP table version is 7, local router ID is 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 * i i *>i i *>i i * i i *>i i * i i By default, BGP selects the shortest AS path as the best (>) path. In AS 65001, the percentage of traffic going to is 30%, is 20%, and is 10%. 50% of all traffic will go to the next hop of (AS 65005), and 10% of all traffic will go to the next hop of (AS 65002). Make traffic to select the next hop of to achieve load sharing where both external links get approximately 30% of the load.
6 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v Route Map for Router A router bgp neighbor remote-as neighbor remote-as neighbor remote-as update-source loopback0 neighbor remote-as update-source loopback0 neighbor remote-as neighbor route-map local_pref in ! access-list 65 permit ! route-map local_pref permit 10 match ip address 65 set local-preference 400 ! route-map local_pref permit 20 Router A configuration
7 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v Router C BGP Table with Local Preference Learned RouterC# show ip bgp BGP table version is 7, local router ID is 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 * i i *>i i *>i i * i i * i i *>i i Best (>) paths for networks /16 and /16 have not changed. Best (>) path for network has changed to a new next hop of because the next hop of has a higher local preference, 400. In AS 65001, the percentage of traffic going to is 30%, is 20%, and is 10%. 30% of all traffic will go to the next hop of (AS 65005), and 30% of all traffic will go to the next hop of (AS 65002).
8 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v Changing BGP MED for All Routes default-metric number Router(config-router)# MED is considered the metric of BGP. All routes that are advertised to an EBGP neighbor are set to the value specified using this command. MED is used when multiple paths exist between two autonomous systems. A lower MED value is preferred. The default setting for Cisco is MED = 0. The metric is an optional, nontransitive attribute. Usually, MED is shared only between two autonomous systems that have multiple EBGP connections with each other.
9 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v BGP Using Route Maps and the MED
10 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v Route Map for Router A Router As Configuration: router bgp neighbor remote-as neighbor remote-as neighbor update-source loopback0 neighbor update-source loopback0 neighbor remote-as neighbor route-map med_65004 out ! access-list 66 permit access-list 66 permit ! route-map med_65004 permit 10 match ip address 66 set metric 100 ! route-map med_65004 permit 100 set metric 200
11 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v Route Map for Router B Router Bs Configuration: router bgp neighbor remote-as neighbor remote-as neighbor update-source loopback0 neighbor update-source loopback0 neighbor remote-as neighbor route-map med_65004 out ! access-list 66 permit ! route-map med_65004 permit 10 match ip address 66 set metric 100 ! route-map med_65004 permit 100 set metric 200
12 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v MED Learned by Router Z RouterZ# show ip bgp BGP table version is 7, local router ID is 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 *>i i * i i * i i *>i i * i i *>i i Examine the networks that have been learned from AS on Router Z in AS For all networks: Weight is equal (0); local preference is equal (100); routes are not originated in this AS; AS path is equal (65001); origin code is equal (i) has a lower metric (MED) through (100) than (200) has a lower metric (MED) through (100) than (200) has a lower metric (MED) through (100) than (200).
13 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v BGP in an Enterprise
14 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v Summary The BGP local preference attribute can be changed to manipulate the best-path decision process, either for all routes or for selected routes using route maps. –Higher local preference values are preferred. –Local preference is used only between IBGP speakers within the same AS. The MED values can be changed to manipulate packets returning to an AS, either for all routes or for selected routes, using route maps. –Lower MED values are preferred. –The MED is sent to EBGP neighbors; those routers propagate the MED within their AS. The routers within the AS use the MED but do not pass it on to the next AS. Routers in a typical enterprise BGP implementation multihome to two ISPs and pass default routes to other routers within the enterprise.
15 © 2006 Cisco Systems, Inc. All rights reserved. BSCI v
Еще похожие презентации в нашем архиве:
© 2024 MyShared Inc.
All rights reserved.