13.6.2 Checking the Community
- <Structure of this section>
(1) List of operation commands
The following table lists the operation commands related to communities.
Command name |
Description |
---|---|
show ip route |
Displays routing information stored in the routing table. |
show ip bgp |
Shows information related to the BGP4 protocol. |
(2) Displaying the community of learned routes
To display routes that have a specific community, use the show ip bgp command with the community parameter specified.
> show ip bgp community 1000:1002 Date 20XX/10/20 21:07:32 UTC Local AS: 65531, Local Router ID: 192.168.1.100 Status Codes: d dampened, * valid, > active, S Stale, r RIB failure Origin Codes: i - IGP, e - EGP, ? - incomplete Network Next Hop MED LocalPref Weight Path *> 10.10/16 172.16.2.2 0 - 0 65532 i *> 10.20/16 172.16.2.2 0 - 0 65532 i |
To display the communities that a route belongs to, use the show ip bgp command with the route parameter specified.
> show ip bgp route 10.10/16 Date 20XX/10/20 21:09:12 UTC BGP Peer: 172.16.2.2 , Remote AS: 65532 Local AS: 65531, Local Router ID: 192.168.1.100 Status Codes: d dampened, * valid, > active, S Stale, r RIB failure Route 10.10/16 *> Next Hop 172.16.2.2 MED: -, LocalPref: 100, Weight: 0, Type: External route Origin: IGP, IGP Metric: 0 Path: 65532 Communities: 1000:1002 |
(3) Displaying learned route filtering results
To display the result of learned route filtering based on the COMMUNITIES attribute, use the show ip bgp operation command.
> show ip bgp Date 20XX/10/20 21:10:09 UTC Local AS: 65531, Local Router ID: 192.168.1.100 Status Codes: d dampened, * valid, > active, S Stale, r RIB failure Origin Codes: i - IGP, e - EGP, ? - incomplete Network Next Hop MED LocalPref Weight Path *> 10.10/16 172.16.2.2 - 120 0 65532 i * 10.10/16 10.2.2.2 - 80 0 65533 i *> 10.20/16 172.16.2.2 - 120 0 65532 i * 10.20/16 10.2.2.2 - 80 0 65533 i *> 192.169.10/24 192.168.2.2 - 100 0 i *> 192.169.20/24 192.168.2.2 - 100 0 i |
(4) Displaying communities for advertised routes
To display the COMMUNITIES attribute of advertised BGP4 routes, use the show ip bgp operation command with the advertised-routes parameter specified.
> show ip bgp advertised-routes 192.169.10/24 Date 20XX/10/20 21:10:25 UTC BGP Peer: 172.16.2.2 , Remote AS: 65532 Local AS: 65531, Local Router ID: 192.168.1.100 Status Codes: d dampened, * valid, > active, S Stale, r RIB failure Route 192.169.10/24 *> Next Hop 192.168.2.2 MED: -, LocalPref: -, Type: Internal route Origin: IGP Path: 65531 Next Hop Attribute: 172.16.2.1 Communities: 1000:1001 BGP Peer: 10.2.2.2 , Remote AS: 65533 Local AS: 65531, Local Router ID: 192.168.1.100 Status Codes: d dampened, * valid, > active, S Stale, r RIB failure Route 192.169.10/24 *> Next Hop 192.168.2.2 MED: -, LocalPref: -, Type: Internal route Origin: IGP Path: 65531 Next Hop Attribute: 10.1.2.1 Communities: 1000:1001 |