[ Pobierz całość w formacie PDF ]
.2.2.2 route-map SETWEIGHTIN in!ip as-path access-list 5 permit ^100$!route-map SETWEIGHTIN permit 10match as-path 5set weight 2000route-map SETWEIGHTIN permit 20set weight 1000This first instance of the setweightin route map assigns 2000 to any route update from AS 100, and the second instanceof the setweightin route map assigns 1000 to route updates from any other AS.Using the neighbor weight Command to Set the Weight AttributeThe following configuration for Router C uses the neighbor weight router configuration command:!Router Crouter bgp 300neighbor 1.1.1.1 remote-as 100neighbor 1.1.1.1 weight 2000neighbor 2.2.2.2 remote-as 200neighbor 2.2.2.2 weight 1000This configuration sets the weight of all route updates from AS 100 to 2000, and the weight of all route updates comingfrom AS 200 to 1000.The higher weight assigned to route updates from AS 100 causes Router C to send trafficthrough Router A.Local Preference AttributeWhen there are multiple paths to the same destination, the local preference attribute indicates the preferred path.Thepath with the higher preference is preferred (the default value of the local preference attribute is 100).Unlike theweight attribute, which is relevant only to the local router, the local preference attribute is part of the routing update andis exchanged among routers in the same AS.The network shown in Figure 3-30 demonstrates the local preferenceattribute.Figure 3-30: Local preference.http://www.cisco.com/cpress/cc/td/cpress/ccie/ndcs798/nd2003.htm (43 of 60) [9/16/2000 5:04:31 PM] Designing Large-Scale IP InternetworksIn Figure 3-30, AS 256 receives route updates for network 170.10.0 from AS 100 and AS 300.There are two ways toset local preference:Using the bgp default local-preference CommandUsing a Route Map to Set Local PreferenceUsing the bgp default local-preference CommandThe following configurations use the bgp default local-preference router configuration command to set the localpreference attribute on Routers C and D:!Router Crouter bgp 256neighbor 1.1.1.1 remote-as 100neighbor 128.213.11.2 remote-as 256bgp default local-preference 150!Router Drouter bgp 256neighbor 3.3.3.4 remote-as 300neighbor 128.213.11.1 remote-as 256bgp default local-preference 200The configuration for Router C causes it to set the local preference of all updates from AS 300 to 150, and theconfiguration for Router D causes it to set the local preference for all updates from AS 100 to 200.Because localpreference is exchanged within the AS, both Routers C and D determine that updates regarding network 170.10.0have a higher local preference when they come from AS 300 than when they come from AS 100.As a result, all trafficin AS 256 destined for network 170.10.0 is sent to Router D as the exit point.Using a Route Map to Set Local PreferenceRoute maps provide more flexibility than the bgp default local-preference router configuration command.When thebgp default local-preference command is used on Router D in Figure 3-30, the local preference attribute of all updatesreceived by Router D will be set to 200, including updates from AS 34.The following configuration uses a route map to set the local preference attribute on Router D specifically for updateshttp://www.cisco.com/cpress/cc/td/cpress/ccie/ndcs798/nd2003.htm (44 of 60) [9/16/2000 5:04:31 PM] Designing Large-Scale IP Internetworksregarding AS 300:!Router Drouter bgp 256neighbor 3.3.3.4 remote-as 300route-map SETLOCALIN inneighbor 128.213.11.1 remote-as 256!ip as-path 7 permit ^300$route-map SETLOCALIN permit 10match as-path 7set local-preference 200!route-map SETLOCALIN permit 20With this configuration, the local preference attribute of any update coming from AS 300 is set to 200.Instance 20 ofthe SETLOCALIN route map accepts all other routes.Multi-Exit Discriminator AttributeThe multi-exit discriminator (MED) attribute is a hint to external neighbors about the preferred path into an AS whenthere are multiple entry points into the AS.A lower MED value is preferred over a higher MED value.The defaultvalue of the MED attribute is 0.Note In BGP Version 3, MED is known as Inter-AS_Metric.Unlike local preference, the MED attribute is exchanged between ASs, but a MED attribute that comes into an AS doesnot leave the AS.When an update enters the AS with a certain MED value, that value is used for decision makingwithin the AS.When BGP sends that update to another AS, the MED is reset to 0.Unless otherwise specified, the router compares MED attributes for paths from external neighbors that are in the sameAS.If you want MED attributes from neighbors in other ASs to be compared, you must configure the bgpalways-compare-med command.The network shown in Figure 3-31 demonstrates the use of the MED attribute.Figure 3-31: MED example.http://www.cisco.com/cpress/cc/td/cpress/ccie/ndcs798/nd2003.htm (45 of 60) [9/16/2000 5:04:31 PM] Designing Large-Scale IP InternetworksIn Figure 3-31, AS 100 receives updates regarding network 180.10.0 from Routers B, C, and D.Routers C and D arein AS 300, and Router B is in AS 400.The following commands configure Routers A, B, C, and D:!Router Arouter bgp 100neighbor 2.2.2.1 remote-as 300neighbor 3.3.3.3 remote-as 300neighbor 4.4.4.3 remote-as 400!Router Brouter bgp 400neighbor 4.4.4.4 remote-as 100neighbor 4.4.4.4 route-map SETMEDOUT outneighbor 5.5.5.4 remote-as 300!route-map SETMEDOUT permit 10set metric 50!Router Crouter bgp 300neighbor 2.2.2.2 remote-as 100neighbor 2.2.2.2 route-map SETMEDOUT outneighbor 5.5.5.5 remote-as 400neighbor 1.1.1.2 remote-as 300!route-map SETMEDOUT permit 10set metric 120!Router Drouter bgp 300neighbor 3.3.3.2 remote-as 100neighbor 3.3.3.2 route map SETMEDOUT outneighbor 1.1.1 [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • higrostat.htw.pl
  •