tldr/pages/common/bgpgrep.md

30 lines
860 B
Markdown
Raw Normal View History

2023-06-23 08:49:29 +01:00
# bgpgrep
> Filter and print BGP data within MRT dumps.
> Can read files compressed with `gzip`, `bzip2` and `xz`.
> More information: <https://codeberg.org/1414codeforge/ubgpsuite>.
2023-06-23 08:49:29 +01:00
- List all routes:
2023-06-23 08:49:29 +01:00
`bgpgrep {{master6.mrt}}`
- List routes received from a specific peer, determined by the peer's AS number:
2023-06-23 08:49:29 +01:00
`bgpgrep {{master4.mrt}} -peer {{64498}}`
- List routes received from a specific peer, determined by the peer's IP address:
2023-06-23 08:49:29 +01:00
`bgpgrep {{master4.mrt.bz2}} -peer {{2001:db8:dead:cafe:acd::19e}}`
- List routes which have certain ASNs in their AS path:
2023-06-23 08:49:29 +01:00
`bgpgrep {{master6.mrt.bz2}} -aspath '{{64498 64510}}'`
- List routes that lead to a specific address:
2023-06-23 08:49:29 +01:00
`bgpgrep {{master6.mrt.bz2}} -supernet '{{2001:db8:dead:cafe:aef::5}}'`
- List routes that have communities from a specific AS:
2023-06-23 08:49:29 +01:00
`bgpgrep {{master4.mrt}} -communities \( '{{64497}}:*' \)`