[dns-operations] FAQ - Where is our pointer of all the root/TLD addresses to build prefix and dampening filters?

Joe Abley jabley at ca.afilias.info
Thu Feb 28 14:34:13 UTC 2008

On 27-Feb-2008, at 11:29, Matthew Pounsett wrote:

> I can think of at least one automated way to keep an up-to-date list  
> that's far more complete than the one linked to ... AXFR the root  
> zone, and build a list from its glue and your local up-to-date hints  
> file.

Assuming we're only talking about IPv4 right now (since the filtering  
practices of IPv6 are not identical):

[calamari:~]% dig @f.root-servers.net . axfr | \
pipe> awk '/IN[[:space:]]*A[[:space:]]/ { print $5; }' | \
pipe> pipe> sort | uniq | wc -l

If we break it down into a list of /24s the list is shorter:

[calamari:~]% dig @f.root-servers.net . axfr | \
pipe> awk '/IN[[:space:]]*A[[:space:]]/ { sub(/\.[0-9]*$/, ".0", $5);  
print $5; }' | \
pipe> pipe> sort | uniq | wc -l

That might be a reasonable approximation to a list of routes to match  
(since many prominent nameservers are numbered in discrete /24s), but  
it's not going to be entirely accurate.

Due to lack of coffee the only way I could think of to get a list of  
prefixes to filter without having to resort to actual programming was  
to abuse route-views using rancid's clogin tool. Since clogin won't  
accept a list of commands to execute from stdin (and since doing each  
command in a separate telnet session seems nasty) I had to use a  
temporary file. Boo.

[calamari:~]% dig @f.root-servers.net . axfr | \
pipe> awk '/IN[[:space:]]*A[[:space:]]/ { print "show ip route",  
$5; }' | \
pipe pipe> sort | uniq >/tmp/nameservers
[calamari:~]% clogin -x /tmp/nameservers route-views.oregon-ix.net | \
pipe> awk '/^Routing/ { sub(/,$/, "", $4); print $4; }' moo2 | sort -n  
| uniq


More information about the dns-operations mailing list