BGP Regular Expressions are special characters used to get useful information from BGP tables.In this post i will give some examples of Regular Expressions
1) To find the networks in BGP Table originating in AS 56203 (AS Path Ends with 56203)
# show ip bgp regexp _56203$
Network Next Hop Metric LocPrf Weight Path
* 1.0.4.0/24 192.241.164.4 0 62567 6939 4637 1221 38803 56203 i
* 212.66.96.126 0 20912 174 4637 1221 38803 56203 i
* 66.59.190.221 0 6539 577 4637 1221 38803 56203 i
* 217.192.89.50 0 3303 4637 1221 38803 56203 i
* 195.208.112.161 0 3277 39710 9002 6939 4637 1221 38803
56203 i
* 4.69.184.193 0 0 3356 4637 1221 38803 56203 i
* 154.11.98.225 0 0 852 6939 4637 1221 38803 56203 i
* 114.31.199.1 0 4826 1221 38803 56203 i
2) To find Local AS networks ( Own Networks)
# show ip bgp regexp ^$
3) To match all the networks in BGP table
# show ip bgp regexp .*
1) To find the networks in BGP Table originating in AS 56203 (AS Path Ends with 56203)
# show ip bgp regexp _56203$
Network Next Hop Metric LocPrf Weight Path
* 1.0.4.0/24 192.241.164.4 0 62567 6939 4637 1221 38803 56203 i
* 212.66.96.126 0 20912 174 4637 1221 38803 56203 i
* 66.59.190.221 0 6539 577 4637 1221 38803 56203 i
* 217.192.89.50 0 3303 4637 1221 38803 56203 i
* 195.208.112.161 0 3277 39710 9002 6939 4637 1221 38803
56203 i
* 4.69.184.193 0 0 3356 4637 1221 38803 56203 i
* 154.11.98.225 0 0 852 6939 4637 1221 38803 56203 i
* 114.31.199.1 0 4826 1221 38803 56203 i
2) To find Local AS networks ( Own Networks)
# show ip bgp regexp ^$
3) To match all the networks in BGP table
# show ip bgp regexp .*
0 comments:
Post a Comment