[ncdnhc-discuss] # IPv8 Floating Root DLD/TLD Locator

Jim Fleming jfleming at anet.com
Mon Dec 17 12:00:26 CET 2001


#!/usr/local/bin/ksh
#
# IPv8 Floating Root DLD/TLD Locator
#
# Usage: locate.sh DLD
#

DLD=${1}

#
# Conditionally make a new directory
#

function Mkdir {
if [ ! -d ${1} ]
then
mkdir ${1}
fi
}

#
# Get the raw nameserver information
#

function getns {
if [ -f ${DLD}/SURVEY/${1} ]
then
return
fi
dig ${1} any | tr "[:lower:]" "[:upper:]" >${DLD}/SURVEY/${1}
grep ' NS ' <${DLD}/SURVEY/${1} >${DLD}/NS/${1}
}

#
# Create directories to store everything
#

Mkdir ${DLD}
Mkdir ${DLD}/SURVEY
Mkdir ${DLD}/NS
Mkdir ${DLD}/TMP
Mkdir ${DLD}/FIND

#
# Query the common places for clues
#

getns ${DLD}-REGISTRY.com
getns WWW-${DLD}.com
getns REGISTER-${DLD}.com
getns DOT-${DLD}.com
getns NIC-${DLD}.com
getns ${DLD}-NIC.com
getns ADDR-${DLD}.com
getns IN-ADDR-${DLD}.com
getns ${DLD}.com

#
# Query the top DLDs
#

getns ${DLD}-ONLINE.com
getns ${DLD}-INC.com
getns ${DLD}-NET.com
getns ${DLD}-USA.com
getns ${DLD}-E.com
getns ${DLD}-UK.com
getns ${DLD}-WEB.com
getns ${DLD}-GROUP.com
getns ${DLD}-IT.com
getns ${DLD}-DESIGN.com
getns ${DLD}-SHOP.com
getns ${DLD}-TECH.com
getns ${DLD}-WORLD.com
getns ${DLD}-SOLUTIONS.com
getns ${DLD}-US.com
getns ${DLD}-SERVICES.com
getns ${DLD}-LINE.com
getns ${DLD}-TV.com
getns ${DLD}-CONSULTING.com
getns ${DLD}-1.com
getns ${DLD}-INTERNATIONAL.com

#
# Build unique list of nameservers
#

cat ${DLD}/NS/* >${DLD}/TMP/ns.all
sed -e 's/^.* NS //' <${DLD}/TMP/ns.all >${DLD}/TMP/ns.only
sort -f <${DLD}/TMP/ns.only | uniq -i >${DLD}/TMP/ns.uniq

#
# Check the clues for TLD servers
#

echo $(wc -l <${DLD}/TMP/ns.uniq) name servers to check
# cat ${DLD}/TMP/ns.uniq

while read nameserver
do
echo Checking ${nameserver}
if [ -f ${DLD}/FIND/${nameserver} ]
then
continue
fi
dig @${nameserver} ${DLD}. any | tr "[:lower:]" "[:upper:]"
${DLD}/FIND/${nameserver}
done <${DLD}/TMP/ns.uniq

#
# Collect the potential TLD servers
#

cat ${DLD}/FIND/* | grep "^${DLD}.* NS " >${DLD}/NS.all
sed -e 's/^.* NS //' <${DLD}/NS.all >${DLD}/NS.only
sort -f <${DLD}/NS.only | uniq -i >${DLD}/NS.uniq

if [ -s ${DLD}/NS.uniq ]
then
echo $(wc -l <${DLD}/NS.uniq) potential TLD servers found for ${DLD}
cat ${DLD}/NS.uniq
else
echo No TLD servers found for ${DLD}
exit
fi
----


Do you use a 2002:<IPv4>:0000 prefix ?

http://www.dot-arizona.com/IPv8/IPv4/
http://www.ietf.org/mail-archive/ietf/Current/msg12213.html

JimFleming at Unir.com
http://www.unir.com
http://www.unir.com/images/architech.gif
http://www.unir.com/images/headers.gif
http://www.unir.com/images/address.gif
http://www.ntia.doc.gov/ntiahome/domainname/130dftmail/unir.txt
http://msdn.microsoft.com/downloads/sdks/platform/tpipv6/start.asp
http://www.ietf.org/mail-archive/ietf/Current/msg12213.html
http://www.ietf.org/mail-archive/ietf/Current/msg12223.html





More information about the Ncuc-discuss mailing list