DN42 is a wonderful project that enables you to develop your skills without scraping the BGP product environment, without you having to have expensive devices with which to make your lab to do simulations with GNS3. At the same time is not a pure laboratory environment where there is no real world problems. Participate with 1 node in the project for about a year. One of the problems in the project is 1:1 with the real world – When someone announced prefixes that do not need to declare. Because I'm lazy and don't feel like typing on hand time filters, I thought the problem with a simple bash script that generates a prefix-list with name dn42 and pour the valid prefixes.

#!/bin/bash</pre>
vtysh -c 'conf t' -c "no ip prefix-list dn42"; #drop old prefix list

while read pl
do
vtysh -c 'conf t' -c "$pl"; #insert prefix list row by row
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");
vtysh -c 'wr' #write new prefix list

The list of valid prediksi into https://ca.dn42.us/reg/filter.txt from the main conveyor + little mods on my part to be able to generate a prefix list. The commands are executed in vtysh.