hello
what would be the command line equivalent to showing routes that have BGP Communities 'contains' XXXX:XX ?
i.e. in /ip route print where bgp-communities 'contain' XXXX:XX
what is the symbol for 'contains' ?
Thanks.
[felix@rb750g] > ip route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADo 0.0.0.0/0 10.255.255.253 110
1 S 0.0.0.0/0 10.255.255.253 200
2 ADC 10.255.255.232/30 10.255.255.233 AP-management 0
3 ADC 10.255.255.236/30 10.255.255.237 management 0
4 ADC 10.255.255.240/30 10.255.255.241 433 0
5 ADC 10.255.255.244/30 10.255.255.245 AP-printer 0
6 ADC 10.255.255.248/29 10.255.255.254 ASA 0
7 ADo 172.16.0.0/24 10.255.255.253 110
8 ADC 172.17.0.0/24 172.17.0.1 AP-hotspot 0
9 ADC 172.31.255.255/32 172.31.255.255 loopback0 0
10 ADC 192.168.1.0/24 192.168.1.1 LAN 0
[felix@rb750g] > ip route print where gateway~"^A"
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
2 ADC 10.255.255.232/30 10.255.255.233 AP-management 0
5 ADC 10.255.255.244/30 10.255.255.245 AP-printer 0
6 ADC 10.255.255.248/29 10.255.255.254 ASA 0
8 ADC 172.17.0.0/24 172.17.0.1 AP-hotspot 0
The ~ operator takes regular expressions.
Here a quick example from my home router - can't show communities here, so instead a filter to print all routes that have a gateway that starts with a capital A:Code: Select all[felix@rb750g] > ip route print Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADo 0.0.0.0/0 10.255.255.253 110 1 S 0.0.0.0/0 10.255.255.253 200 2 ADC 10.255.255.232/30 10.255.255.233 AP-management 0 3 ADC 10.255.255.236/30 10.255.255.237 management 0 4 ADC 10.255.255.240/30 10.255.255.241 433 0 5 ADC 10.255.255.244/30 10.255.255.245 AP-printer 0 6 ADC 10.255.255.248/29 10.255.255.254 ASA 0 7 ADo 172.16.0.0/24 10.255.255.253 110 8 ADC 172.17.0.0/24 172.17.0.1 AP-hotspot 0 9 ADC 172.31.255.255/32 172.31.255.255 loopback0 0 10 ADC 192.168.1.0/24 192.168.1.1 LAN 0 [felix@rb750g] > ip route print where gateway~"^A" Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 2 ADC 10.255.255.232/30 10.255.255.233 AP-management 0 5 ADC 10.255.255.244/30 10.255.255.245 AP-printer 0 6 ADC 10.255.255.248/29 10.255.255.254 ASA 0 8 ADC 172.17.0.0/24 172.17.0.1 AP-hotspot 0