howto/Quagga.md
... ...
@@ -97,6 +97,20 @@ Apply a prefix list for incoming prefixes to your peer group:
97 97
ipv6 prefix-list vpn-in seq 10 permit fd00::/8 ge 9
98 98
ipv6 prefix-list vpn-in seq 15 deny any
99 99
100
+#### Example filter list script
101
+```
102
+#!/bin/bash
103
+
104
+vtysh -c 'conf t' -c "no ip prefix-list dn42"; #drop old prefix list
105
+
106
+while read pl
107
+do
108
+ vtysh -c 'conf t' -c "$pl"; #insert prefix list row by row
109
+done < <(curl -s https://ca.dn42.us/reg/filter.txt | grep -e ^[0-9] | awk '{ print "ip prefix-list dn42 seq " $1 " " $2 " " $3 " ge " $4 " le " $5}' | sed "s_/\([0-9]\+\) ge \1_/\1_g;s_/\([0-9]\+\) le \1_/\1_g");
110
+vtysh -c "wr" #write new prefix list
111
+
112
+```
113
+
100 114
## show bpg session status
101 115
102 116
in this example: