Skip to content
Smarter by Design.Simpler for Business

sys-cmd nslookup ​

sys-cmd nslookup resolves a name to an IP address or an IP address to a name from the route table selected in WEB-CLI and shows the result in a short form. It is used to answer the question "Is this name resolved, and to which address?" quickly; when details such as the TTL and the authority are needed, dig is preferred.

Command Summary ​

TR7 WEB-CLI · sys-cmd nslookup
# type nslookup and press Tab: a free parameter
admin@TR7LBWAF01> sys-cmd nslookup
<nslookup-parameter-1>
 
admin@TR7LBWAF01> sys-cmd nslookup <options> <name-or-ip> <server>
admin@TR7LBWAF01>  

Everything written after the word nslookup is passed to the tool as it is. There is no mandatory field; the options are written before the name, and the optional query server at the very end.

How It Works ​

SubjectBehavior
ContextThe query is sent from within the selected v-device and route table.
The query serverIf a server is not written at the very end, the default resolver on the device is used.
DurationIt closes by itself when the response arrives or when the waiting time expires. The name or the address to be queried is always written together with the command.
PipeThe output can be filtered with | or written to a file with to-file.
RecordingEvery run is written to the user logs.

Frequently Used Parameters ​

ParameterWhat it doesWhat is written after it
<name-or-ip>Specifies the name to be queried or the IP address to be resolved in reverseA domain name or an IP address
<server>Selects the DNS server to which the query will be sentThe IP address or the name of the server; it is written after the name
-type=Determines which record will be requestedA · AAAA · MX · NS · TXT · SOA · CNAME
-port=Selects a port of the server other than the defaultA port number
-timeout=Determines the response waiting timeSeconds

The table summarizes frequently used parameters; the full list and behavior depend on the version of the tool on the device.

Examples ​

TR7 WEB-CLI · A) With the default resolver
admin@TR7LBWAF01> sys-cmd nslookup app.example.com
admin@TR7LBWAF01>  
TR7 WEB-CLI · B) Directly to the DNS address of GTM
admin@TR7LBWAF01> sys-cmd nslookup app.example.com <gtm-dns-address>
admin@TR7LBWAF01>  
TR7 WEB-CLI · C) The mail server records
admin@TR7LBWAF01> sys-cmd nslookup -type=MX example.com
admin@TR7LBWAF01>  
TR7 WEB-CLI · D) Reverse resolution
admin@TR7LBWAF01> sys-cmd nslookup 10.0.7.20
admin@TR7LBWAF01>  

Things to Know ​

  • Non-authoritative answer. It shows that the response came not from the authoritative server but from the cache of a resolver. In order to see the most up-to-date record, the query is directed to the authoritative server.
  • For a detailed diagnosis (the TTL, the resolution chain, the authority information) dig is used.