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