New Tool - BGP Prefix-List and Policy Generator (with a Policy Tester)
New on the Network Tools page: a BGP Prefix-List and Policy Generator. You describe a BGP import or export policy once, get the configuration for Junos, Cisco IOS / IOS-XE or Cisco IOS-XR, and then test it against a list of routes before it goes anywhere near a router.
What it builds
- Prefix sets with ranges:
exact,orlonger,longer,le,ge,ge N le M,prefix-length-range. Length checks are just ranges: “too specific” is0.0.0.0/0 ge 25, “too short” is0.0.0.0/0 le 7(which also catches the default route). IPv6 works the same way. - Ordered terms. Each term matches on a prefix set, an AS-path condition (originated by, learned from neighbor AS, passes through, locally originated, contains a private ASN) and communities. Then it can set local-preference and MED, add, replace, delete or clear communities, prepend your AS, and accept, reject or continue to the next term.
- Real platform output. Junos gets
route-filter-listandpolicy-statementterms. IOS gets prefix-lists, AS-path ACLs, community lists and a route-map with one sequence per term. IOS-XR gets prefix-sets, as-path-sets, community-sets and a route-policy that ends in an explicitdoneordrop. - Starting points for the common jobs: a strict customer import, IPv4 and IPv6 transit and peer sanity filters (bogons, too short, too long, your own prefixes, private ASNs), and an export that advertises only your prefixes and your customers.
The tester
Paste routes, one per line:



