8-12 neighbor ip-address peer-group-name filter-list as-path-list-number weight weight

 < Free Open Study > 

8-12 neighbor { ip-address peer- group - name } filter-list as- path -list-number weight weight

Syntax Description:

  • ip-address Neighbor's IP address.

  • peer-group-name Name of the peer group. See section 8-19.

  • as-path-list-number IP AS path list number.

  • weight 1 to 65535. This value is applied to the weight attribute of incoming routes matching the conditions in the AS path filter list.

Purpose: Routes learned from BGP neighbors have the weight attribute set to 0. This form of the filter-list command allows you to set the weight attribute of selected routes received from a particular neighbor. This command applies only to incoming route updates. The operation of the filter list is identical for both IBGP and EBGP neighbors.

Cisco IOS Software Release: 10.0. Peer group support was added in Release 11.0, and the weight keyword was removed in Release 12.1.

Configuration Example: Set the Weight of Routes Originating from a Particular AS

In Figure 8-13, Routers B and C are advertising four network prefixes. Router A inspects the route update coming from Router B and sets the weight of networks originating from AS 3 to 850. The last AS listed in the AS path list is the originating AS. Loopbacks are used on Routers B and C to simulate the advertised networks, as shown in the configuration.

Figure 8-13. Scenario for the Use of the neighbor filter-list weight Command

graphics/08fig13.gif

 Router A  interface Serial0   ip address 10.1.1.1 255.255.255.252   !   router bgp 1   neighbor 10.1.1.2 remote-as 2   ___________________________________________________________________________  Router B  ip subnet-zero   !   interface Loopback0   ip address 172.16.0.1 255.255.255.0   !   interface Loopback1   ip address 172.16.1.1 255.255.255.0   !   interface Loopback2   ip address 172.16.2.1 255.255.255.0   !   interface Loopback3   ip address 172.16.3.1 255.255.255.0   !   interface Serial0   ip address 10.1.1.2 255.255.255.252   clockrate 64000   !   router bgp 2   network 172.16.0.0 mask 255.255.255.0   network 172.16.1.0 mask 255.255.255.0   network 172.16.2.0 mask 255.255.255.0   network 172.16.3.0 mask 255.255.255.0   neighbor 10.1.1.1 remote-as 1   neighbor 10.1.2.2 remote-as 3   ___________________________________________________________________________  Router C  ip subnet-zero   !   interface Loopback0   ip address 198.16.0.1 255.255.255.0   !   interface Loopback1   ip address 198.16.1.1 255.255.255.0   !   interface Loopback2   ip address 198.16.2.1 255.255.255.0   !   interface Loopback3   ip address 198.16.3.1 255.255.255.0   !   interface Serial0   ip address 10.1.2.2 255.255.255.252   !   router bgp 3   network 198.16.0.0   network 198.16.1.0   network 198.16.2.0   network 198.16.3.0   neighbor 10.1.2.1 remote-as 2  

Before proceeding to the filter list weight example, verify that BGP is propagating the routes:

 rtrA#  show ip bgp  BGP table version is 22, local router ID is 172.17.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete    Network          Next Hop            Metric LocPrf Weight Path *> 172.16.0.0/24    10.1.1.2                 0             0 2 i *> 172.16.1.0/24    10.1.1.2                 0             0 2 i *> 172.16.2.0/24    10.1.1.2                 0             0 2 i *> 172.16.3.0/24    10.1.1.2                 0             0 2 i *> 198.16.0.0       10.1.1.2                               0 2 3 i *> 198.16.1.0       10.1.1.2                               0 2 3 i *> 198.16.2.0       10.1.1.2                               0 2 3 i *> 198.16.3.0       10.1.1.2                               0 2 3 i  ___________________________________________________________________________  rtrB#  show ip bgp  BGP table version is 9, local router ID is 172.16.3.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete    Network          Next Hop            Metric LocPrf Weight Path *> 172.16.0.0/24    0.0.0.0                  0         32768 i *> 172.16.1.0/24    0.0.0.0                  0         32768 i *> 172.16.2.0/24    0.0.0.0                  0         32768 i *> 172.16.3.0/24    0.0.0.0                  0         32768 i *> 198.16.0.0       10.1.2.2                 0             0 3 i *> 198.16.1.0       10.1.2.2                 0             0 3 i *> 198.16.2.0       10.1.2.2                 0             0 3 i *> 198.16.3.0       10.1.2.2                 0             0 3 i  ___________________________________________________________________________  rtrC#  show ip bgp  BGP table version is 18, local router ID is 198.16.3.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete    Network          Next Hop            Metric LocPrf Weight Path *> 172.16.0.0/24    10.1.2.1                 0             0 2 i *> 172.16.1.0/24    10.1.2.1                 0             0 2 i *> 172.16.2.0/24    10.1.2.1                 0             0 2 i *> 172.16.3.0/24    10.1.2.1                 0             0 2 i *> 198.16.0.0       0.0.0.0                  0         32768 i *> 198.16.1.0       0.0.0.0                  0         32768 i *> 198.16.2.0       0.0.0.0                  0         32768 i *> 198.16.3.0       0.0.0.0                  0         32768 i 

Notice the AS path information contained in the BGP tables of the three routers. Before a router sends an update to another router in a different AS, the advertising router prepends its AS number to the update. This information is used to inspect the updates. For this example, we want to inspect the route update that Router B is sending to Router A and set the weight of routes that originate in AS 3 to 850. We can identify the routes originating in AS 3 by looking at the last AS number in the AS path information. If the last AS number is 3, these routes originated in AS 3. We don't care how many AS numbers are listed in the path, as long as the last AS number is 3. In order to set the weight of routes based on AS path information, we need to use an AS path filter in conjunction with the BGP filter-list command. An AS path filter utilizes regular expressions to match patterns in the AS path list. Refer to Appendix B for a discussion of regular expressions. The regular expression used to match any prefix originating from AS 3 is _ 3$. Two of the characters an underscore matches are a space and the beginning-of-string character. There is always a space between the AS numbers listed in an AS path. The 3$ must match a 3 and then the end-of-string character. So, the regular expression _ 3$ matches any path originating from AS 3, regardless of the length of the AS path. Now modify the BGP configuration on Router A to set the weight of routes originating in AS 3 to 850:

 Router A  router bgp 1   neighbor 10.1.1.2 remote-as 2   neighbor 10.1.1.2 filter-list 1 weight 850   !   ip as-path access-list 1 permit _3$  

The filter list always references an IP AS path access list. For this example, the AS path access list number is 1. The first statement in access list 1 matches any routes originating in AS 3 and allows their weights to be set to 850.

Verification

Verify that the routes originating in AS 3 have a weight of 850 on Router A:

 rtrA#  show ip bgp  BGP table version is 9, local router ID is 172.17.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete    Network          Next Hop            Metric LocPrf Weight Path *> 172.16.0.0/24    10.1.1.2                 0             0 2 i *> 172.16.1.0/24    10.1.1.2                 0             0 2 i *> 172.16.2.0/24    10.1.1.2                 0             0 2 i *> 172.16.3.0/24    10.1.1.2                 0             0 2 i  *> 198.16.0.0       10.1.1.2                              850 2 3 i   *> 198.16.1.0       10.1.1.2                              850 2 3 i   *> 198.16.2.0       10.1.1.2                              850 2 3 i   *> 198.16.3.0       10.1.1.2                              850 2 3 I  
Troubleshooting
  1. Verify that the BGP neighbors are in the Established state using the show ip bgp neighbors command.

    If the neighbor relationship is not in the Established state, see section 8-23.

  2. Verify that the routes to be adjusted are being advertised using the show ip bgp command.

  3. In some cases, there might not be routes to adjust. Your filter might be used to adjust future advertisements from a particular AS. In this case, the routes will not be in the BGP table.

    If routes that you think should be adjusted are showing up in the BGP table with a weight of 0, check the syntax of your AS path filter and your regular expressions.

 < Free Open Study > 


Cisco[r] BGP-4 Command and Configuration Handbook
Cisco BGP-4 Command and Configuration Handbook
ISBN: 1587055732
EAN: 2147483647
Year: 2001
Pages: 300

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net