bgp-origin-as-bird.sh 267 B

123456
  1. #!/bin/sh
  2. #
  3. # List all known BGP prefixes along with their origin AS. For Anycast
  4. # prefixes, there may be multiple AS announcing the same prefixes.
  5. ssh root@tower.polyno.me "birdc 'show route'" | grep "^[0-9]" | awk '{ print $1, substr($NF, 4, length($NF) - 5); }'