Difference between revisions of "OPS335 A2 Summer 2015 Tips"
(→How to test your secondary DNS ?) |
(→How to test your secondary DNS ?) |
||
Line 1: | Line 1: | ||
= How to test your secondary DNS ?= | = How to test your secondary DNS ?= | ||
<pre> | <pre> | ||
− | + | test_item=scs.senecac.on.ca | |
− | + | pri_dns_server=142.204.33.53 | |
− | PRI_ANS=$(nslookup -query=A | + | sec_dns_server=142.204.33.54 |
+ | |||
+ | PRI_ANS=$(nslookup -query=A $test_item $pri_dns | grep -v $pri_dns | grep Address | awk '{print $2}') | ||
+ | |||
#echo $PRI_ANS | #echo $PRI_ANS | ||
#142.204.140.179 | #142.204.140.179 | ||
− | SEC_ANS=$(nslookup -query=A | + | SEC_ANS=$(nslookup -query=A $test_item $sec_dns | grep -v $sec_dns | grep Address | awk '{print $2}') |
#echo $PRI_ANS | #echo $PRI_ANS | ||
#142.204.140.179 | #142.204.140.179 |
Revision as of 10:07, 31 July 2015
How to test your secondary DNS ?
test_item=scs.senecac.on.ca pri_dns_server=142.204.33.53 sec_dns_server=142.204.33.54 PRI_ANS=$(nslookup -query=A $test_item $pri_dns | grep -v $pri_dns | grep Address | awk '{print $2}') #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