Russian version


BGPQ - the program for access- and prefix-list generation (for Cisco routers and GateD network filters).
Compatibility:Tested without any problems under: FreeBSD, OpenBSD, Linux. Does not work under Solaris
Availablilty: ftp://ftp.lexa.ru/pub/domestic/snar
Documentation: when starting without any parametres, says:
Usage: bgpq [-l name] [-h host] [-p port] [-d] [-Piosge]|[-f number]|[-F format] [-aq] [-S src] [-H] [-c] [-R masklen] objects [EXCEPT objects]
	bgpq -r filename
	-A - try to aggregate routes
	-a - print all routes uncommented
	-c - include commandline in output
	-d - debugging
	-e - generate standard access-list
	-f - generate as-path access-list (number used as starting)
	-F - generate output in given format
	-g - generate GateD network filter
	-H - do not print headers
	-h - host with irrd (can be set with IRRD_HOST also)
	-i - generate input packet filter
	-l - name of generated access/prefixlist
	-o - generate output packet filter
	-P - generate prefixlist (access-list extended by default)
	-p - irrd port (43 by default)
	-q - print only aggreagated routes
	-R - allow more specific routes up to masklen
	-r - recreate file
	-s - print statistics about
	-S - use only specified source (can be set with IRRD_SOURCE)

"objects" means for networks (in prefix aka a.a.a.a/b format,
autonomous systems (in ASnnn format), as-macros (AS-xxxx format)
or rpsl filter (see RFC2622 or bgpq manpage for definition)
If that is not enough, you can see man-page, included in distribution.

Examples

Primitive access-list generation:
snar@kaya:~/compile/bgpq>./bgpq -h sivka AS3319
!generated with bgpq
no ip access-list extended UNKNOWN
ip access-list extended UNKNOWN
 permit ip host 194.44.31.0 host 255.255.255.0
 permit ip host 194.44.158.0 host 255.255.255.0
 permit ip host 194.44.162.0 host 255.255.255.0
 permit ip host 194.44.164.0 host 255.255.255.0
 permit ip host 194.44.170.0 host 255.255.255.0
 permit ip host 194.44.192.0 host 255.255.255.0
 permit ip host 194.44.193.0 host 255.255.255.0
 permit ip host 194.44.194.0 host 255.255.255.0
 permit ip host 194.44.195.0 host 255.255.255.0
 permit ip host 194.44.196.0 host 255.255.255.0
 permit ip host 194.44.197.0 host 255.255.255.0
 permit ip host 194.44.216.0 host 255.255.255.0
 permit ip host 195.178.128.0 host 255.255.224.0
! overlayed by 195.178.128.0/19 in the same AS3319
! -  permit ip host 195.178.136.0 host 255.255.254.0
! overlayed by 195.178.128.0/19 in the same AS3319
! -  permit ip host 195.178.150.0 host 255.255.255.0
! overlayed by 195.178.128.0/19 in the same AS3319
! -  permit ip host 195.178.128.0 host 255.255.255.0
! overlayed by 195.178.128.0/19 in the same AS3319
! -  permit ip host 195.178.130.0 host 255.255.254.0
! overlayed by 195.178.128.0/19 in the same AS3319
! -  permit ip host 195.178.132.0 host 255.255.255.0
 deny ip any any
Well, let's try to make this access list much more compact - - enabling aggregation and quiet-mode:
snar@kaya:~/compile/bgpq>./bgpq -h sivka -Aq AS3319
!generated with bgpq
no ip access-list extended UNKNOWN
ip access-list extended UNKNOWN
 permit ip host 194.44.31.0 host 255.255.255.0
 permit ip host 194.44.158.0 host 255.255.255.0
 permit ip host 194.44.162.0 host 255.255.255.0
 permit ip host 194.44.164.0 host 255.255.255.0
 permit ip host 194.44.170.0 host 255.255.255.0
 permit ip 194.44.192.0 0.0.3.0 host 255.255.255.0 
 permit ip 194.44.196.0 0.0.1.0 host 255.255.255.0 
 permit ip host 194.44.216.0 host 255.255.255.0
 permit ip host 195.178.128.0 host 255.255.224.0
 deny ip any any

Author: Alexandre Snarskii, <snar@paranoia.ru>