[Contents] [Prev] [Next] [Index] [Report an Error]


Monitoring BGP

Use the show commands in this section to monitor BGP activity. Use the baseline ip bgp command to set the baseline on all BGP statistics.

You can use the output filtering feature of the show command to include or exclude lines of output based on a text string you specify. Refer to ERX System Basics Configuration Guide, Chapter 2, Command Line Interface, for details.

Use the debug ip bgp command to get information on problems with BGP or the network.

    baseline ip bgp

host1#baseline ip bgp

    debug ip bgp

host1#debug ip bgp

    default-fields peer

host1:pe2(config-router)#default-fields peer remote-as state 
messages-received messages-sent up-down-time
host1:pe2#show ip bgp summary
                Messages    Messages 
Neighbor    AS    State    Up/down time    Sent    Received 
1.1.1.1    100    Established    00:07:55    94    92 

    default-fields route

host1:pe2(config-router)#default-fields route intro next-hop med loc-pref 
weight as-path
host1:pe2#show ip bgp vpnv4 all
Local BGP identifier 2.2.2.2, local AS 100
 6 routes (388 bytes) 
 7 destinations (560 bytes) of which 0 have a route
 0 routes selected for route table installation
 6 path attribute entries (936 bytes)
 Local-RIB version 74. FIB version 74. 

Prefix     Next-hop     MED     LocPrf    Weight    AS-path 
99.99.99.11/32     1.1.1.1     1     100    0    65011 
99.99.99.12/32     1.1.1.1     0     100    0    empty 
99.99.99.13/32     1.1.1.1     2     100    0    empty 
99.99.99.21/32     21.21.21.2     1     0        65021 
99.99.99.22/32     22.22.22.2     0     32768        empty 
99.99.99.23/32     23.23.23.2     2     32768        empty 

    show ip as-path-access-list

host1#show ip as-path-access-list
AS Path Access List 10:
  permit [200-220]
  permit ^114
  permit ^117.*225$
AS Path Access List 11:
  deny .*
AS Path Access List 20:
  deny [1100-1250]
  permit .*

    show ip bgp

host1:pe1#show ip bgp
Local BGP identifier 1.1.1.1, local AS 100
  2 routes (104 bytes), 3 distinct destinations (216 bytes)
  1 route selected for route table installation
  11 path attribute entries (1364 bytes)
  Local-RIB version 2. Processed 2 changes (0 pending)
                                                                                       
Status codes: > best, * invalid, s suppressed, d dampened, r rejected, a 
auto-summarized
                                                                                       
  Prefix             Peer            Next-hop     MED LocPrf   Weight Origin
> 10.88.88.1/32      0.0.0.0         0.0.0.0      1            32768 IGP
> 10.88.88.2/32      10.2.2.2       10.2.2.2      1    100     0     IGP

host1:pe1#show ip bgp 10.88.88.1                                                 
BGP route information for prefix 10.88.88.1/32                                         
  Network route (best route
    Advertised to both internal and external peers
    Address Family Identifier (AFI) is ip-v4
    Subsequent Address Family Identifier (SAFI) is unicast
    Next hop IP address is 0.0.0.0 (metric 2)
    Multi-exit discriminator is 1
    Local preference is not present
    Weight is 32768
    Origin is IGP
    AS path is empty
    Extended communities empty


host1:5#show ip bgp 10.66.66.66                        
BGP route information for prefix 10.66.66.66/32              
  Received route learned from peer 10.6.6.6                   
    Route placed in IP forwarding table                      
    Not advertised to any peers                              
    Address Family Identifier (AFI) is ip-v4                 
    Subsequent Address Family Identifier (SAFI) is unicast   
    Next hop IP address is 10.6.6.6 (not reachable)           
    Multi-exit discriminator is 1                            
    Local preference is 100                                  
    Weight is 0                                              
    Origin is IGP                                            
    AS path is empty 


host1#show ip bgp fields intro peer as-path
Local router ID 192.168.1.232, local AS 200
  4 paths, 4 distinct prefixes (272 bytes used)
  4 paths selected for route table installation
  1 path attribute entry (129 bytes used)
 
Prefix             Peer            AS-path
10.6.128.0/17      192.168.1.158   100
10.15.1.1/32       192.168.1.158   100
10.15.1.1/32       192.168.1.232   not present
172.25.2.2/32      192.168.1.158   100
172.25.2.2/32      192.168.1.232   not present
172.16.1.1/32      192.168.1.232   not present
172.16.2.2/32      192.168.1.232   not present
192.168.1.0/24     192.168.1.158   100
192.168.1.0/24   192.168.1.232   not present


host1:5#show ip bgp fields peer next-hop next-hop-cost

Prefix             Peer            Next-hop      Next-hop-cost
11.11.11.11/32     3.3.3.3         3.3.3.3       Unreachable
11.11.11.11/32     4.4.4.4         4.4.4.4       Unreachable
22.22.22.22/32     3.3.3.3         3.3.3.3       Unreachable
22.22.22.22/32     4.4.4.4         4.4.4.4       Unreachable
33.33.33.33/32     3.3.3.3         3.3.3.3       Unreachable
44.44.44.44/32     4.4.4.4         4.4.4.4       Unreachable
55.55.55.55/32     0.0.0.0         0.0.0.0       0
66.66.66.66/32     6.6.6.6         6.6.6.6       Unreachable
77.77.77.77/32     57.57.57.7      57.57.57.7    1
88.88.88.88/32     57.57.57.7      57.57.57.7    1


    show ip bgp advertised-routes

host1#show ip bgp neighbors 5.72.116.1 advertised-routes
Local BGP identifier 2.2.2.2, local AS 2222
  0 routes (0 bytes used), 0 distinct destinations (0 bytes used)
  0 routes selected for route table installation
  0 path attribute entries (0 bytes used)

Status codes: > best, * invalid, s suppressed, d dampened, r rejected

  Prefix             Peer            Next-hop     MED LocPrf Weight Origin
> 0.0.0.0/0         5.72.116.1     5.72.1.1               0       IGP
> 10.10.0.87/32     5.72.116.1     5.72.1.1               0       inc.
> 13.13.13.13/32    5.72.116.1     5.72.1.1               0       IGP
> 33.0.0.0/16       0.0.0.0        5.72.1.1         1     32768   inc.
> 33.0.0.0/24       0.0.0.0        5.72.1.1         1     32768   inc.
> 44.44.0.0/16      5.72.116.1     5.72.1.1               0       inc.

    show ip bgp aggregate-address

host1#show ip bgp aggregate-address
Prefix          AS set  Summary only  Attribute map Advertise 
map
12.0.0.0/8      No        Yes           None           None
158.101.0.0/16  No        No            None           None

    show ip bgp cidr-only

host1#show ip bgp cidr-only
Local BGP identifier 111.111.111.111, local AS 444
  0 routes (0 bytes used), 0 distinct destinations (0 bytes used)
  0 routes selected for route table installation
  0 path attribute entries (0 bytes used)

Status codes: > best, * invalid, s suppressed, d dampened, r rejected

  Prefix         Peer       Next-hop    MED LocPrf  Weight  Origin
  33.0.0.0/24   5.72.1.1   5.72.1.1     1           0       inc.
> 44.44.0.0/24  0.0.0.0    192.168.1.1  1           32768   inc.

    show ip bgp community

host1#show ip bgp community 999:999
Local router ID 192.168.1.153, local AS 100
  40845 paths, 40845 distinct prefixes (2940840 bytes used)
  40845 paths selected for route table installation
  13651 path attribute entries (1864908 bytes used)

  Prefix        Peer       Next-hop        MED CalPrf Weight Origin
> 24.0.0.0/12   10.5.0.48  10.5.0.48            100    100    IGP
> 24.4.252.0/22 10.5.0.48  10.5.0.48            100    100    IGP
> 24.6.0.0/23   10.5.0.48  10.5.0.48            100    100    IGP
> 24.6.11.0/24  10.5.0.48  10.5.0.48            100    100    IGP

    show ip bgp community-list

host1#show ip bgp community-list 1 fields peer communities
Local router ID 192.168.1.153, local AS 100
  72077 paths, 72077 distinct prefixes (5189544 bytes used)
  72077 paths selected for route table installation
  21627 path attribute entries (2957324 bytes used)

Prefix             Peer            Communities
3.0.0.0/8          10.5.0.48       777:777 888:888
4.0.0.0/8          10.5.0.48       777:777 888:888
4.17.106.0/24      10.5.0.48       777:777 888:888
4.17.115.0/24      10.5.0.48       777:777 888:888
6.0.0.0/8          10.5.0.48       777:777 888:888
9.2.0.0/16         10.5.0.48       777:777 888:888
9.20.0.0/17        10.5.0.48       777:777 888:888
12.0.0.0/8         10.5.0.48       777:777 888:888

    show ip bgp dampened-paths

host1#show ip bgp dampened-paths
Local router ID 192.168.1.218, local AS 100
  Route flap dampening is enabled
  Decay half-life is 10 minutes while reachable, 20 minutes while 
unreachable
  Cuttoff threshold is 2000, reuse threshold is 750
  Maximum hold-down time is 20 minutes
  60 paths have active route flap histories (4560 bytes used)
  11 paths are suppressed                                                                                                             
                                               Figure   Time until
Prefix          Peer      Status               of Merit Reuse/Remove
24.31.128.0/19   10.2.1.48 Suppressed/Reachable   2681    00:17:00
24.93.128.0/19   10.2.1.48 Suppressed/Reachable   2681    00:17:00
24.95.0.0/19     10.2.1.48 Suppressed/Reachable   2681    00:17:00
128.192.0.0/16   10.2.1.48 Available              1997    00:15:08
148.161.0.0/16   10.2.1.48 Available              1997    00:15:10
164.81.0.0/16    10.2.1.48 Available              1997    00:15:11
192.29.60.0/24   10.2.1.48 Available              1997    00:15:12
192.58.228.0/24  10.2.1.48 Available              1997    00:15:15
192.88.8.0/24    10.2.1.48 Available              1997    00:15:17
192.107.253.0/24 10.2.1.48 Suppressed/Unreachable 4331    00:19:42
192.195.44.0/24  10.2.1.48 Suppressed/Reachable   2923    00:19:15
192.195.49.0/24  10.2.1.48 Suppressed/Reachable   2923    00:19:15
192.195.50.0/24  10.2.1.48 Suppressed/Reachable   2923    00:19:15
192.197.150.0/24 10.2.1.48 Available              1997    00:15:25
192.222.89.0/24  10.2.1.48 Suppressed/Unreachable 2788    00:19:42
204.17.195.0/24  10.2.1.48 Suppressed/Reachable   2923    00:17:20
204.52.186.0/24  10.2.1.48 Available              1997    00:15:26
204.68.178.0/24  10.2.1.48 Available              1000    00:19:38
204.101.0.0/16   10.2.1.48 Available              1997    00:15:29
204.128.227.0/24 10.2.1.48 Suppressed/Reachable   2923    00:17:16
204.146.24.0/22  10.2.1.48 Available              1997    00:15:30
204.146.24.0/24  10.2.1.48 Available              1997    00:15:30

    show ip bgp filter-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

    show ip bgp flap-statistics

host1#show ip bgp flap-statistics
Local BGP identifier 192.168.1.232, local AS 100
  Route flap dampening is enabled
  Default decay half-life is 15 minutes
  Default cutoff threshold is 2000, default reuse threshold is 750
  Default maximum hold-down time is 60 minutes
  307 paths have active route flap histories (27016 bytes used)
  5 paths are suppressed
                                                  Figure      Time until
Prefix             Peer            Status         of Merit     Reuse/Remove
24.201.0.0/18      192.168.1.158   Available       925         00:58:23
24.201.64.0/18     192.168.1.158   Available       925         00:58:23
52.128.224.0/19    192.168.1.158   Available       750         00:54:12
61.8.0.0/19        192.168.1.158   Available       993         00:59:53
61.8.30.0/24       192.168.1.158   Available       993         00:59:53
62.229.73.0/24     192.168.1.158   Unreachable     925         00:58:23
63.69.150.0/24     192.168.1.158   Available       750         00:54:12

    show ip bgp inconsistent-as

host1#show ip bgp inconsistent-as
Local BGP identifier 192.168.1.10, local AS 123
  0 routes (0 bytes used), 0 distinct destinations (0 bytes used)
  0 routes selected for route table installation
  0 path attribute entries (0 bytes used)

Status codes: > best, * invalid, s suppressed, d dampened, r rejected

  Prefix             Next-hop         MED LocPrf Weight AS-path
> 4.0.0.0/8          0.0.0.0            1         32768 empty
  4.0.0.0/8          192.168.1.1        0 11488     701 1

    show ip bgp longer-prefixes

host1#show ip bgp 12.2.0.0 255.255.0.0 longer-prefixes
Local router ID 192.168.1.153, local AS 100
  72074 paths, 72074 distinct prefixes (5189328 bytes used)
  72074 paths selected for route table installation
  21685 path attribute entries (2965327 bytes used)

  Prefix         Peer       Next-hop   MED CalPrf  Weight  Origin
> 12.2.6.0/24    10.5.0.48  10.5.0.48    100         100     IGP
> 12.2.7.0/24    10.5.0.48  10.5.0.48    100         100     IGP
> 12.2.76.0/24   10.5.0.48  10.5.0.48    100         100     IGP
> 12.2.88.0/22   10.5.0.48  10.5.0.48    100         100     IGP
> 12.2.97.0/24   10.5.0.48  10.5.0.48    100         100     IGP
> 12.2.99.0/24   10.5.0.48  10.5.0.48    100         100     IGP
> 12.2.109.0/24  10.5.0.48  10.5.0.48    100         100     IGP
> 12.2.169.0/24  10.5.0.48  10.5.0.48    100         100     IGP

    show ip bgp neighbors

host1#show ip bgp neighbors
BGP neighbor ID 10.2.1.48, remote AS 11488 (external peer)
  Remote router ID is 172.31.1.48, negotiated BGP version is 4
  Administrative status is Start, connection state is Established
  Reason for last reset was tcp connection error 
  TCP error code 60 (Connection timed out) 
  Connection has been established 1 time, up for 0 17:42:31
  Options:
    Default originate is disabled
    EBGP multi-hop is enabled
    Next hop self is disabled
    seconds
Policy:
    Neighbor weight is 100
 Timers:
    Connect retry interval is 120 seconds
    Minimum route advertisement interval is 30 seconds
 Minimum AS origination interval is 10 seconds
    Configured keep-alive interval is 30 seconds, negotiated 30
       seconds
    Configured hold time is 90 seconds, negotiated 90
 TCP connection:
    Local IP address is 192.168.1.218, local port is 1024
    Remote IP address is 10.2.1.48, remote port is 179
 Statistics:
    Total of 4100 messages sent, 44913 messages received
    2053 update messages sent, 42785 update messages received
    0 00:00:17 since last update message was received

    show ip bgp neighbors dampened-routes

host1#show ip bgp neighbors 192.168.1.158 dampened-routes
Local BGP identifier 192.168.1.232, local AS 100
  120 routes (5760 bytes used), 94 distinct destinations (9024 bytes used)
  67 routes selected for route table installation
  23 path attribute entries (3450 bytes used)

Status codes: > best, * invalid, s suppressed, d dampened, r rejected
                                                                                  
  Prefix             Peer            Next-hop MED LocPrf Weight Origin
 d12.8.12.0/24       192.168.1.158   192.168.1.1              0 IGP
 d24.48.12.0/24      192.168.1.158   192.168.1.1              0 IGP
 d24.72.12.0/24      192.168.1.158   192.168.1.1              0 inc.
 d24.116.12.0/23     192.168.1.158   192.168.1.1              0 IGP
 d24.143.12.0/24     192.168.1.158   192.168.1.1              0 IGP
 d24.154.12.0/24     192.168.1.158   192.168.1.1              0 inc.
 d24.216.12.0/24     192.168.1.158   192.168.1.1              0 IGP
 d24.240.12.0/24     192.168.1.158   192.168.1.1              0 IGP
 d24.244.12.0/22     192.168.1.158   192.168.1.1              0 IGP
 d24.246.12.0/22     192.168.1.158   192.168.1.1              0 IGP
 d61.0.12.0/24       192.168.1.158   192.168.1.1              0 IGP
 d61.11.12.0/24      192.168.1.158   192.168.1.1              0 IGP
 d62.74.12.0/22      192.168.1.158   192.168.1.1              0 IGP
 d62.76.12.0/22      192.168.1.158   192.168.1.1              0 IGP
 d63.65.12.0/24      192.168.1.158   192.168.1.1              0 inc.
 d63.73.12.0/24      192.168.1.158   192.168.1.1              0 IGP

    show ip bgp neighbors paths

host1#show ip bgp neighbors 1.02.3.4 paths                                                                
Address     Refcount  Origin  Next-hop         AS-path                                       
0xC384BD0   1         IGP     192.168.1.1      11488 701 2853 5515 764 
0xC384C40   1         IGP     192.168.1.1      11488 701 4183 
0xC384CB0   1         IGP     192.168.1.1      11488 701 1239 1833 1833 1833 1299 8308 
0xC384D20   1         IGP     192.168.1.1      11488 701 6453 786 
0xC384D90   1         IGP     192.168.1.1      11488 701 6453 1103 1103 
0xC384E00   1         IGP     192.168.1.1      11488 701 6762 9116 9116 9116 6888 6888 
0xC384E70   1         IGP     192.168.1.1      11488 701 6453 8297 6758 
0xC384EE0   1         IGP     192.168.1.1      11488 701 5511 3215 
0xC384F50   1         IGP     192.168.1.1      11488 701 3561 5683 5551 
0xC384FC0   1         IGP     192.168.1.1      11488 701 1239 1755 1273 8793 8793 8793 
0xC385030   1         IGP     192.168.1.1      11488 701 5705 5693 

    show ip bgp neighbors received prefix-filter

host1#show ip bgp neighbors 192.168.1.158 received prefix-filter
ip prefix-list filter 192.168.1.158 for address family ipv4:unicast
   seq 5 permit 10.1.1.1/32
   seq 10 permit 10.1.1.2/32
   seq 15 permit 10.1.1.3/32

    show ip bgp neighbors received-routes

host1#show ip bgp neighbor 192.168.1.158 received-routes
Local BGP identifier 111.111.111.111, local AS 444
  0 routes (0 bytes used), 0 distinct destinations (0 bytes used)
  0 routes selected for route table installation
  0 path attribute entries (0 bytes used)

Status codes: > best, * invalid, s suppressed, d dampened, r rejected

Prefix          Peer           Next-hop      MED LocPrf Weight Origin
>0.0.0.0/0      192.168.1.158  192.168.1.158              0       IGP
>13.13.13.13/32 192.168.1.158  192.168.1.158       0      0       IGP

    show ip bgp neighbors routes

host1#show ip bgp neighbors 10.5.0.48 routes
Local router ID 192.168.1.153, local AS 100
  72082 paths, 72082 distinct prefixes (5189904 bytes used)
  72082 paths selected for route table installation
  21695 path attribute entries (2966686 bytes used)


  Prefix         Peer        Next-hop    MED CalPrf Weight Origin
> 3.0.0.0/8      10.5.0.48   10.5.0.48      100      100      IGP
> 4.0.0.0/8      10.5.0.48   10.5.0.48      100      100      IGP
> 4.17.106.0/24  10.5.0.48   10.5.0.48      100      100      IGP
> 4.17.115.0/24  10.5.0.48   10.5.0.48      100      100      IGP
> 6.0.0.0/8      10.5.0.48   10.5.0.48      100      100      IGP
> 9.2.0.0/16     10.5.0.48   10.5.0.48      100      100      IGP
> 9.20.0.0/17    10.5.0.48   10.5.0.48      100      100      IGP
> 12.0.0.0/8     10.5.0.48   10.5.0.48      100      100      IGP
> 12.0.48.0/20   10.5.0.48   10.5.0.48      100      100      IGP
> 12.1.248.0/24  10.5.0.48   10.5.0.48      100      100      IGP
> 12.2.6.0/24    10.5.0.48   10.5.0.48      100      100      IGP
> 12.2.7.0/24    10.5.0.48   10.5.0.48      100      100      IGP
> 12.2.76.0/24   10.5.0.48   10.5.0.48      100      100      IGP

    show ip bgp network

host1#show ip bgp network
  192.168.1.0/24
  192.168.2.0/24
  192.168.10.0/24

    show ip bgp next-hops

host1:3#show ip bgp next-hops
Indirect next-hop 4.4.4.4
  Reachable (metric 2)
  Direct next-hop atm2/0.34 (34.34.34.4)
  Reference count is 3

Indirect next-hop 5.5.5.5
  Reachable (metric 2)
  Direct next-hop atm2/0.35 (35.35.35.5)
  Reference count is 3

Indirect next-hop 6.6.6.6
  Reachable (metric 3)
  Direct next-hop atm2/0.34 (34.34.34.4)
                  atm2/0.35 (35.35.35.5)
  Reference count is 3

Indirect next-hop 13.13.13.1
  Not reachable
  Reference count is 2

    show ip bgp paths

host1#show ip bgp paths                                                                
Address     Refcount  Origin  Next-hop         AS-path                                       
0xC384BD0   1         IGP     192.168.1.1      11488 701 2853 5515 764                       
0xC384C40   1         IGP     192.168.1.1      11488 701 4183                                
0xC384CB0   1         IGP     192.168.1.1      11488 701 1239 1833 1833 1833 1299 8308 
0xC384D20   1         IGP     192.168.1.1      11488 701 6453 786                            
0xC384D90   1         IGP     192.168.1.1      11488 701 6453 1103 1103                      
0xC384E00   1         IGP     192.168.1.1      11488 701 6762 9116 9116 9116 6888 6888 
0xC384E70   1         IGP     192.168.1.1      11488 701 6453 8297 6758                      
0xC384EE0   1         IGP     192.168.1.1      11488 701 5511 3215                           
0xC384F50   1         IGP     192.168.1.1      11488 701 3561 5683 5551                      
0xC384FC0   1         IGP     192.168.1.1      11488 701 1239 1755 1273 8793 8793 8793 
0xC385030   1         IGP     192.168.1.1      11488 701 5705 5693 

    show ip bgp peer-group

host1#show ip bgp peer-group
BGP peer group leftcoast
  Members: 10.1.1.2 10.2.2.2 10.3.3.2
  Options:
    Default originate is disabled
    EBGP multi-hop is disabled
    Next hop self is disabled
    Send community is disabled
    Private AS number stripping is disabled
    Maximum update message size is 1024 octets
  Policy:
    Neighbor weight is 500
  Timers:
    Minimum route advertisement interval is 30 seconds 

    show ip bgp quote-regexp

    show ip bgp regexp

Examples for regexp and quote-regexp

In many cases, you can use either show ip bgp regexp or show ip bgp quote-regexp with the same results. For example, to show all routes whose AS-path starts with 200 you can use either command as follows:

host1#show ip bgp reg ^200
Local router ID 192.168.1.232, local AS 100
  6 paths, 3 distinct prefixes (324 bytes used)
  3 paths selected for route table installation
  7 path attribute entries (872 bytes used)

Prefix    Next-hop    MED    CalPrf    Weight    AS-path
10.99.1.2/32    10.1.1.2        100    100    200
10.99.1.3/32    10.1.1.2        100    100    200 10
10.99.1.4/32    10.1.1.2        100    100    200 10 20
host1#show ip bgp quote-regexp ^200
Local router ID 192.168.1.232, local AS 100
  6 paths, 3 distinct prefixes (324 bytes used)
  3 paths selected for route table installation
  7 path attribute entries (872 bytes used)

Prefix    Next-hop    MED    CalPrf    Weight    AS-path
10.99.1.2/32    10.1.1.2        100    100    200
10.99.1.3/32    10.1.1.2        100    100    200 10
10.99.1.4/32    10.1.1.2        100    100    200 10 20

If the regular expression contains one or more spaces, you must place quotation marks around the expression in the show ip bgp quote-regexp command but not in the show ip bgp regexp command. For example, to show all routes whose AS-path contains AS number 10 followed immediately by AS number 20:

host1#show ip bgp regexp 10 20
Local router ID 192.168.1.232, local AS 100
  6 paths, 3 distinct prefixes (324 bytes used)
  3 paths selected for route table installation
  7 path attribute entries (872 bytes used)

Prefix    Next-hop    MED    CalPrf     Weight    AS-path
10.99.1.4/32    10.1.1.2        100    100    200 10 20
host1#show ip bgp quote-regexp 10 20
                                      ^
% Invalid input detected at '^' marker.

host1#show ip bgp quote-regexp "10 20"
Local router ID 192.168.1.232, local AS 100
  6 paths, 3 distinct prefixes (324 bytes used)
  3 paths selected for route table installation
  7 path attribute entries (872 bytes used)

Prefix    Next-hop    MED    CalPrf     Weight    AS-path
10.99.1.4/32    10.1.1.2        100    100    200 10 20

The show ip bgp regexp command accepts multiple strings as arguments. If you try to apply output filtering, the command interprets the filter information as a regular expression and fails:

host1#show ip bgp regexp ^200 | begin Prefix
% invalid regular expression                                                   

Because the show ip bgp quote-regexp command accepts only one string as an argument to the regular expression, output filtering is possible:

host1#show ip bgp quote-regexp ^200 | begin Prefix
Prefix    Next-hop    MED    CalPrf    Weight    AS-path
10.99.1.2/32    10.1.1.2        100    100    200
10.99.1.3/32    10.1.1.2        100    100    200 10
10.99.1.4/32    10.1.1.2        100    100    200 10 20

    show ip bgp summary

host1#show ip bgp summary
Local router ID 192.168.1.218, local AS 100
  Default local preference is 100
  IGP synchronization is enabled
  Default originate is disabled
  Always compare MED is disabled
  Route dampening is disabled


                                                 Messages Messages
Neighbor     AS  Ver.  State       Up/down time     Sent  Received
10.2.1.48  11488  4   Established    0 17:42:57     4102  44926
192.168.1.106  200 4  Established    0 17:42:03     2364  2127

    show ip community-list

host1#show ip community-list
Community List 1:
  permit 752877569 (11488:1)
  permit 752877570 (11488:2)
  permit 752877571 (11488:3)
  permit 752877572 (11488:4)
Community List 2:
  permit 4294967043 (local-as)

    undebug ip bgp

host1#undebug ip bgp


[Contents] [Prev] [Next] [Index] [Report an Error]