Browse Source

chore: add route filtering doc

main
Brett Bender 11 months ago
parent
commit
7e25e2cc3f
2 changed files with 44 additions and 0 deletions
  1. +24
    -0
      data/filter.txt
  2. +20
    -0
      data/filter6.txt

+ 24
- 0
data/filter.txt View File

@ -0,0 +1,24 @@
# For FRR Rules:
# cat filter.txt | \
# grep -e ^[0-9] | \
# awk '{ print "ip prefix-list nx3-in seq " $1 " " $2 " " $3 " ge " $4 " le " $5}' | \
# sed "s_/\([0-9]\+\) ge \1_/\1_g;s_/\([0-9]\+\) le \1_/\1_g"
#
# For BIRD Rules:
# cat filter.txt | \
# awk 'BEGIN {printf "function is_valid_network() {\n return net ~ [\n" } \
# /^[0-9]/ && $2 ~ /permit/ {printf " %s{%s,%s},\n", $3, $4, $5};' | \
# sed "$ s/,$/\n ];\n}/"
# The rules MUST be sorted by the number column first and then the first matching rule MUST be used.
# ROAs MUST be checked against these rules and max-length of the ROA NUST NOT be longer than allowed by the matching rule.
#Nr Action Prefix MinLen MaxLen # Comment
1001 permit 172.24.0.0/24 28 32 # dn42 anycast range
1002 permit 172.25.0.0/24 28 32 # dn42 anycast range
1003 permit 172.26.0.0/24 28 32 # dn42 anycast range
1004 permit 172.27.0.0/24 28 32 # dn42 anycast range
1100 permit 172.24.0.0/14 21 29 # dn42 main net
9999 deny 0.0.0.0/0 0 32 # block the rest

+ 20
- 0
data/filter6.txt View File

@ -0,0 +1,20 @@
# To FRR Rules:
# cat filter6.txt | \
# grep -e ^[0-9] | \
# awk '{ print "ipv prefix-list nx3v6-in seq " $1 " " $2 " " $3 " ge " $4 " le " $5}' | \
# sed "s_/\([0-9]\+\) ge \1_/\1_g;s_/\([0-9]\+\) le \1_/\1_g"
#
# For BIRD Rules:
# cat filter6.txt | \
# awk 'BEGIN {printf "function is_valid_network() {\n return net ~ [\n" } \
# /^[0-9]/ && $2 ~ /permit/ {printf " %s{%s,%s},\n", $3, $4, $5};' | \
# sed "$ s/,$/\n ];\n}/"
# The rules MUST be sorted by the number column first and then the first matching rule MUST be used.
# ROAs MUST be checked against these rules and max-length of the ROA NUST NOT be longer than allowed by the matching rule.
# Nr Action Prefix MinLen MaxLen # Comment
1001 permit fd00::/8 44 64 # ULA (defined)
9999 deny ::/0 0 128 # block the rest

Loading…
Cancel
Save