# Monitoring BGP Routes with Matching AS Paths and AS-Path Access Lists

#### Purpose

Display all routes whose AS-path matches the specified AS-path access list. Report whether the indirect next hop of a route is unreachable; if not, display the IGP cost to the indirect next hop.

The show ip bgp filter-list and show bgp ipv6 filter-list commands display similar information.

#### Action

To display all routes whose AS-path matches the specified AS-path access list:

    host1#show ip bgp filter-list 1
    Local router ID 192.168.1.153, local AS 100
      72080 paths, 72080 distinct prefixes (5189760 bytes used)
      72080 paths selected for route table installation
      21667 path attribute entries (2962828 bytes used)

      Prefix        Next-hop  MED CalPrf Weight AS-path
    > 6.0.0.0/8     10.5.0.48   100        100  11488 701 7018 7170
    > 12.0.0.0/8    10.5.0.48   100        100  11488 701 1740 7018
    > 12.1.248.0/24 10.5.0.48   100        100  11488 701 7018 13391
    > 12.2.6.0/24   10.5.0.48   100        100  11488 701 7018 11101
    > 12.2.7.0/24   10.5.0.48   100        100  11488 701 7018 11101
    > 12.2.76.0/24  10.5.0.48   100        100  11488 701 7018 11812
    > 12.2.99.0/24  10.5.0.48   100        100  11488 701 7018 10656
    > 12.2.109.0/24 10.5.0.48   100        100  11488 701 7018 10656
    > 12.2.169.0/24 10.5.0.48   100        100  11488 701 7018 11806
    > 12.4.114.0/24 10.5.0.48   100        100  11488 701 7018 14065
    > 12.4.119.0/24 10.5.0.48   100        100  11488 701 7018 14065
    > 12.4.175.0/24 10.5.0.48   100        100  11488 701 7018 11895
    > 12.4.196.0/22 10.5.0.48   100        100  11488 701 7018 12163
    > 12.5.48.0/21  10.5.0.48   100        100  11488 701 7018 12163
    > 12.5.164.0/24 10.5.0.48   100        100  11488 701 7018 11134
    > 12.6.42.0/23  10.5.0.48   100        100  11488 701 7018 11090

#### Meaning

Table 32 lists the show ip bgp filter-list command output fields.

Table 32: show ip bgp filter-list Output Fields

Field Name | Field Description
--- | ---
Local router ID | BGP router ID of the local router
local AS | Local autonomous system number
paths | Total number of routes stored in the BGP routing table. If several peers have advertised a route to the same prefix, all routes are included in this count.
distinct prefixes | Number of routes to unique prefixes stored in the BGP routing table. If several peers have advertised a route to the same prefix, only the best route is included in this count.
paths selected for route table installation | Number of routes in the BGP routing table that have been inserted into the IP routing table
path attribute entries | Number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
Prefix | Prefix for the routing table entry
Next hop IP address | IP address of the next router that is used when a packet is forwarded to the destination network
MED | Multiexit discriminator for the route
CalPrf | Calculated preference for the route
Weight | Weight of the route
AS path | Autonomous system path

#### Related Documentation

- show bgp ipv6 filter-list
- show ip bgp filter-list