BGP cost community configuration can be verified locally or for a specific neighbor. To verify the local configuration cost
community, use the
show
route-map or
show
running-config command. To verify that a specific neighbor carries the cost community, use the
show
ip
bgp
ip-address command.
The output of the
show
route-map command will display locally configured route-maps, match, set, continue clauses, and the status and configuration of the
cost community attribute. The following sample output is similar to the output that will be displayed:
Device# show route-map
route-map COST1, permit, sequence 10
Match clauses:
as-path (as-path filter): 1
Set clauses:
extended community Cost:igp:1:100
Policy routing matches: 0 packets, 0 bytes
route-map COST1, permit, sequence 20
Match clauses:
ip next-hop (access-lists): 2
Set clauses:
extended community Cost:igp:2:200
Policy routing matches: 0 packets, 0 bytes
route-map COST1, permit, sequence 30
Match clauses:
interface FastEthernet0/0
extcommunity (extcommunity-list filter):300
Set clauses:
extended community Cost:igp:3:300
Policy routing matches: 0 packets, 0 bytes
The following sample output shows locally configured routes with large cost community values:
Device# show route-map
route-map set-cost, permit, sequence 10
Match clauses:
Set clauses:
extended community RT:1:1 RT:2:2 RT:3:3 RT:4:4 RT:5:5 RT:6:6 RT:7:7
RT:100:100 RT:200:200 RT:300:300 RT:400:400 RT:500:500 RT:600:600
RT:700:700 additive
extended community Cost:igp:1:4294967295 (default+2147483648)
Cost:igp:2:200 Cost:igp:3:300 Cost:igp:4:400
Cost:igp:5:2147483648 (default+1) Cost:igp:6:2147484648 (default+1001)
Cost:igp:7:2147284648 (default-198999)
Policy routing matches: 0 packets, 0 bytes
The output of the
show
running
config command will display match, set, and continue clauses that are configured within a route-map. The following sample output
is filtered to show only the relevant part of the running configuration:
Device# show running-config | begin route-map
route-map COST1 permit 20
match ip next-hop 2
set extcommunity cost igp 2 200
!
route-map COST1 permit 30
match interface FastEthernet0/0
match extcommunity 300
set extcommunity cost igp 3 300
.
.
.
The output of the
show
ip
bgp
ip-address command can be used to verify if a specific neighbor carries a path that is configured with the cost community attribute.
The cost community attribute information is displayed in the “Extended Community” field. The POI, the cost community ID, and
the cost community number value are displayed. The following sample output shows that neighbor 172.16.1.2 carries a cost community
with an ID of 1 and a cost of 100:
Device# show ip bgp 10.0.0.0
BGP routing table entry for 10.0.0.0/8, version 2
Paths: (1 available, best #1)
Not advertised to any peer
2 2 2
172.16.1.2 from 172.16.1.2 (172.16.1.2)
Origin IGP, metric 0, localpref 100, valid, external, best
Extended Community: Cost:igp:1:100
If the specified neighbor is configured with the default cost community number value or if the default value is assigned
automatically for cost community evaluation, “default” with + and - values will be displayed after the cost community number
value in the output.