Open main menu

CDOT Wiki β

Changes

OPS335 A2 Summer 2015 Tips

71 bytes added, 10:14, 31 July 2015
How to test your secondary DNS ?
= How to test your secondary DNS ?=
<pre>
test_itemtest_items="scs.senecac.on.cawww.senecac.on.ca matrix.senecac.on.ca zenit.senecac.on.ca"pri_dns_serverpri_dns_ip=142.204.33.53sec_dns_serversec_dns_ip=142.204.33.54
for test_item in $test_itemsdo PRI_ANS=$(nslookup -query=A $test_item $pri_dns_ip | grep -v $pri_dns_ip | grep Address | awk '{print $2}')  #cho $PRI_ANS  SEC_ANS=$(nslookup -query=A $test_item $pri_dns sec_dns_ip | grep -v $pri_dns sec_dns_ip | grep Address | awk '{print $2}') echo $PRI_ANS $SEC_ANS  [ "$SEC_ANS" = "$PRI_ANS" ] && echo matchdone
#echo $PRI_ANS
#142.204.140.179
SEC_ANS=$(nslookup -query=A $test_item $sec_dns | grep -v $sec_dns | grep Address | awk '{print $2}')
#echo $PRI_ANS
#142.204.140.179
#echo $SEC_ANS
#142.204.140.179
[ "$SEC_ANS" = "$PRI_ANS" ] && echo match
</pre>
1,760
edits