Router Prefix-List Generator
Turn a pasted prefix list into Cisco, Junos, FRR and BIRD routing policy — with ge/le semantics and match verdicts made explicit.
Prefixes & options
4 entries · 3 IPv4 · 1 IPv6Accepts CIDR, optional ge/le, `permit`/`deny`, `ip A.B.C.D mask M.M.M.M` and pasted Cisco prefix-list lines.
10.0.0.0/8 / v4
192.0.2.0/24 / v4
172.16.0.0/12 / v4
2001:db8::/32 / v6
Configuration & simulator
Cisco IOS · 4 entries! Cisco IOS prefix policy generated 2026-12-03 — 4 entries (3 IPv4, 1 IPv6) ! Review in a lab before applying to a production router. ip prefix-list PEER-IN seq 5 permit 10.0.0.0/8 ge 24 le 24 ip prefix-list PEER-IN seq 10 permit 192.0.2.0/24 ip prefix-list PEER-IN seq 15 deny 172.16.0.0/12 le 24 ipv6 prefix-list PEER-IN_v6 seq 5 permit 2001:db8::/32 ge 48 le 48 ! Prefix-lists end with an implicit deny — add explicit permits for everything you need. route-map PEER-IN permit 10 match ip address prefix-list PEER-IN exit route-map PEER-IN permit 20 match ipv6 address prefix-list PEER-IN_v6 exit
Simulating 10.1.2.0/24 against 4 entries.
permit
First match by sequence number: entry permit 10.0.0.0/8 ge 24 le 24 is the first match.
permit
First term, longest route-filter first: entry permit 10.0.0.0/8 ge 24 le 24 is the first match.
permit
First match by sequence number: entry permit 10.0.0.0/8 ge 24 le 24 is the first match.
permit
Deny set before permit set: entry permit 10.0.0.0/8 ge 24 le 24 is the first match.
| Entry | Match | Reason | Junos mapping |
|---|---|---|---|
| permit 10.0.0.0/8 ge 24 le 24 | match | match: 10.1.2.0/24 is inside 10.0.0.0/8 and /24 fits | route-filter 10.0.0.0/8 prefix-length-range /24-/24 |
| permit 192.0.2.0/24 | no match | no match: 10.1.2.0/24 is outside 192.0.2.0/24 | route-filter 192.0.2.0/24 exact |
| deny 172.16.0.0/12 le 24 | no match | no match: 10.1.2.0/24 is outside 172.16.0.0/12 | route-filter 172.16.0.0/12 upto /24 |
| permit 2001:db8::/32 ge 48 le 48 | no match | no match: ipv4 address cannot match a ipv6 entry | route-filter 2001:db8::/32 prefix-length-range /48-/48 |
Mapping notes: A single length /24; expressed as a range because it is more specific than 10.0.0.0/8.
Examples
Only the /24s
permit 10.0.0.0/8 ge 24 le 24
Test: 10.1.2.0/24ip prefix-list PEER-IN seq 5 permit 10.0.0.0/8 ge 24 le 24
route-filter 10.0.0.0/8 prefix-length-range /24-/24
Verdict: match — inside 10.0.0.0/8, /24 fitsge 24 le 24 is not the same as ge 24: the upper bound excludes /25s and longer.
Deny more specifics
deny 172.16.0.0/12 le 24
permit 172.16.0.0/12define PEER-IN_DENY4 = [ 172.16.0.0/12{12,24} ];
if net ~ PEER-IN_DENY4 then reject;BIRD has no per-entry action in a set, so denied routes become a separate set checked before the permit set.
Dual-stack policy
permit 10.0.0.0/8 ge 24
permit 2001:db8::/32 ge 48 le 48ip prefix-list PEER-IN seq 5 permit 10.0.0.0/8 ge 24
ipv6 prefix-list PEER-IN_v6 seq 5 permit 2001:db8::/32 ge 48 le 48
filter PEER-IN_IN4 { … }
filter PEER-IN_IN6 { … }One input list, two address-family outputs in every vendor dialect.
About this tool
A prefix list is a list of network ranges with a mask-length window attached. That small grammar is easy to mistype and hard to review: `ge 24`, `le 24` and `orlonger` look similar but accept different sets of routes. This tool turns one pasted list into the four most common router dialects and prints the semantics beside each generated entry, so a reviewer can see what the policy does without simulating a router.
The model keeps a permit or deny action on every entry, because real import and export filters are mixes of both. Cisco and FRR get sequence-numbered prefix-list lines plus a route-map wrapper; Junos gets a policy-statement with separate permit and reject terms; BIRD 2.x gets per-family prefix sets and filters that check the deny set first. IPv4 and IPv6 are always emitted as separate lists and filters, since the vendors do not allow one list to mix address families.
The match simulator applies the same length-window predicate the serializers use. Enter a test prefix and every entry reports match or no-match with a reason — outside the network, shorter than ge, longer than le — plus the whole-list verdict under each vendor's evaluation order. Host bits are normalized, invalid ge/le pairs are rejected, and overlapping entries that can never be reached in Cisco sequence order are flagged.
What this tool does not do
- Output targets classic IOS/IOS-XE, Junos, FRR and BIRD 2.x; IOS-XR and Nokia dialects are not emitted.
- Route-map generation is limited to permit/deny plus local-preference, MED and community — no full route-map DSL, as-path or community-list authoring.
- The simulator evaluates prefixes locally against this list; it does not contact a router, read a RIB or account for other policy attached to a neighbor.
- Vendor evaluation orders differ (Cisco first-match, Junos longest route-filter first inside a permit term, BIRD deny set first); the tool reports the difference but cannot make the dialects semantically identical.
- No device interaction of any kind: the generated text is inert configuration and must be reviewed and applied in a lab first.
How to use this tool
Paste the prefixes
One prefix per line: 10.0.0.0/8, 10.0.0.0/8 ge 24 le 24, deny 192.0.2.0/24, or a whole Cisco prefix-list config. Comments starting with # or ! are ignored.
Fix any validation issues
Host bits are normalized with a notice. ge or le outside the listed mask, ge greater than le, and malformed addresses are reported per line; those lines are skipped until corrected.
Set the policy name and numbering
Choose the list/policy name, the starting sequence and the step (5 by default). Imported Cisco lines keep their existing sequence numbers, and the next generated sequence continues from the last one.
Add a route-map wrapper or set actions
Optionally set local preference, MED and community. The tool emits a route-map stanza for IPv4 and a second one for IPv6 using match ipv6 address prefix-list.
Pick a vendor tab and test a prefix
Switch between Cisco IOS, Junos, FRR and BIRD without losing the model. Type a test prefix to see per-entry verdicts, mapping notes and the final decision each vendor would make.
Copy, download or export
Copy just the active vendor block, download it as a .cfg file, or export all four blocks and the mapping table as one Markdown document.
Use cases
Multi-vendor policy migration
Translate an existing Cisco import filter into Junos or FRR and compare the simulator verdicts before cutting over.
IX peering import filters
Generate a predictable permit/deny list for a peer, with sequence numbering and implicit-deny scaffolding ready for review.
Lab and CI policy fixtures
Produce deterministic config blocks and a mapping table for exercises or tests, with the ge/le reasoning written out.
Input and output forms
| Syntax | Meaning |
|---|---|
| 10.0.0.0/8 | Exact: only the /8 network itself matches |
| 10.0.0.0/8 ge 24 | Any /24 through /32 inside 10.0.0.0/8 |
| 10.0.0.0/8 le 24 | The /8 itself through /24 (ge defaults to the listed length) |
| 10.0.0.0/8 ge 24 le 28 | Only lengths /24–/28 inside the /8 |
| ip 10.0.0.0 mask 255.0.0.0 | Legacy mask form, converted to 10.0.0.0/8 |
| Junos: orlonger / upto /N / prefix-length-range /min-/max | orlonger = len..max; upto /N = len..N; prefix-length-range carries an explicit minimum |
Cisco, FRR and BIRD use ge/le windows; Junos uses four route-filter shapes. The mapping note under each entry explains the conversion.
Common mistakes
Mistake:Writing ge 24 when only /24s should be accepted.
Fix:Add le 24. ge alone allows everything up to /32 (or /128 for IPv6).
Mistake:Assuming Junos `upto` accepts a minimum length.
Fix:It does not: upto /N means len..N. If ge > len, the tool emits prefix-length-range /ge-/le instead.
Mistake:Forgetting that Cisco prefix-lists stop at the first match.
Fix:Put specific denies before broad permits, and check the shadow warning when a later entry can never be reached.
Mistake:Mixing IPv4 and IPv6 prefixes into one BIRD set.
Fix:The tool emits separate _IN4 and _IN6 filters and defines; apply each to the matching routing table.
Frequently asked questions
How do ge and le interact with the listed mask?
The listed prefix sets the network and the minimum length. `ge N` raises the minimum to N, and `le N` sets the maximum to N. With neither, only that exact prefix matches. With `le` alone, Cisco treats ge as the listed length, so `10.0.0.0/8 le 24` matches /8 through /24. `ge 24` alone matches /24 through /32 — add `le 24` if you only want /24s.
What is Juniper orlonger versus longer?
`orlonger` matches the listed prefix itself and every more-specific prefix (`len..max`). `longer` excludes the exact prefix (`len+1..max`). The generator emits `orlonger` when ge equals the listed length and le is the maximum; if ge is greater than the listed length it emits `prefix-length-range /ge-/max`, because Junos `upto` cannot express a minimum.
Can a prefix-list entry match more-specifics?
Yes, but only when you ask it to. `ge`, `le` or a Junos `orlonger`/`upto`/`prefix-length-range` form extends the match beyond the exact prefix. The simulator checks two things for every test prefix: that it is inside the listed network, and that its length falls in the window. A /24 from a different network never matches `10.0.0.0/8 ge 24` even though the lengths agree.
How are sequence numbers assigned?
The first entry gets the chosen starting value (5 by default) and each following entry adds the step (also 5 by default). Imported Cisco lines keep their existing `seq` values, and generated entries continue from the last imported sequence plus one step. You can change both numbers in the options panel, and the output is rebuilt immediately.
Does BIRD need exact sets?
BIRD 2.x prefix patterns accept a range in braces, for example `10.0.0.0/8{24,28}`. An exact prefix is written without braces. Because a BIRD set is pure membership and cannot attach a deny action to a member, the generated filter keeps denied prefixes in a separate set and checks it before the permit set, then rejects anything unmatched.
What happens to IPv4 and IPv6 in one list?
They are split. Cisco and FRR get `ip prefix-list NAME` and `ipv6 prefix-list NAME_v6` with two route-map stanzas (`match ip address prefix-list` and `match ipv6 address prefix-list`). BIRD gets separate defines and filters ending in `_IN4` and `_IN6` for the two routing tables. Junos gets one policy-statement with route-filters from both families; apply it to inet.0 and inet6.0 as appropriate.
Why do the vendor verdicts differ for overlapping entries?
Cisco and FRR stop at the first matching sequence number. Junos tries terms in order and picks the longest matching route-filter inside a term's `from` block; the generated policy places permit terms before deny terms. BIRD checks the explicit deny set before the permit set. The simulator shows all three final verdicts and warns when an earlier Cisco entry shadows a later one, so you can reorder deliberately rather than discovering the difference in production.
Is my prefix policy uploaded anywhere?
No. Parsing, mapping and simulation all run in this browser tab; nothing is sent over the network. Your input is saved to localStorage on this device only. The generated configuration is inert text — the tool never opens a session to a router, and you should review and lab-test it before applying it.
References & standards
Related tools
API Mock Server
Define mock REST routes and intercept fetch calls client-side
AsyncAPI Validator
Validate AsyncAPI 2.x and 3.x documents offline, browse channels and messages, and check protocol binding coverage.
Bandwidth Calculator
Estimate how long a file takes to transfer at a given connection speed — correctly handling bits vs bytes (Mbps vs MB/s) and SI vs binary size units
Bandwidth-Delay Product Calculator
Compute BDP from bandwidth and RTT: required TCP window, scaling factor, in-flight MSS and buffer notes. Auditable math, entirely in your browser.
Broken Link Checker
Extract http(s) links from pasted HTML and check them via proxy
Bulk Redirect Map Generator
Generate nginx map blocks, Apache RedirectMatch rules, Netlify _redirects and vercel.json from one old-to-new URL list, with status codes, wildcards and conflict detection.