The display dns statistics packet command displays statistics about DNS packets sent and received.
Usage Scenario
To check statistics about DNS packets sent and received during domain name queries when the device functions as a DNS client, run the display dns statistics packet command.
Before collecting statistics about DNS packets sent and received, run the reset dns statistics packet command to clear existing statistics. Then you can run the display dns statistics packet command to check the statistics in a specified period.The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display dns statistics packet
--------------------------------------------------------------------------
Received response:
Total packets : 1
Udp packets : 1 Tcp packets : 0
RR types:
A : 3 AAAA : 0
CNAME : 1 PTR : 0
Unsupport : 0
Discarded packets : 0
Udp packets : 0 Tcp packets : 0
Length err : 0 Id err : 0
Packet server err : 0 Response code err : 0
Truncated : 0 Question count err : 0
Answer count err : 0 Expand name fail : 0
Class err : 0 Others err : 0
Sent request:
Total packets : 1
Udp packets : 1 Tcp packets : 0
Standard : 1 Inverse : -
Question types:
A : 1 AAAA : 0
PTR : 0
--------------------------------------------------------------------------
Item | Description |
---|---|
Received response | Statistics about received DNS packets. |
Total packets | Total number of sent/received DNS packets. |
Udp packets | Total number of received, discarded, or sent UDP packets. |
Tcp packets | Total number of received, discarded, or sent TCP packets. |
RR types | Statistics about received DNS packets with specific resource record (RR) types.
|
A | Number of received or sent DNS packets carrying an A RR. An A RR records an IPv4 address obtained based on a domain name. |
AAAA | Number of received or sent DNS packets carrying an AAAA RR. An AAAA RR records an IPv6 address obtained based on a domain name. |
CNAME | Number of received DNS packets carrying a CNAME RR. A CNAME RR records an alias obtained based on a domain name. |
PTR | Number of received/sent DNS packets carrying a PTR RR. A PTR RR records a domain name obtained based on an IPv4/IPv6 address. |
Unsupport | Number of received DNS packets carrying a unidentifiable RR. |
Discarded packets | Number of discarded DNS packets, among the ones received. Packets that fail to generate dynamic entries are discarded. As long as the packets have options that can correctly generate entries, the packets are not counted in the number of discarded packets. |
Length err | Number of packets discarded due to length errors. |
Id err | Number of packets discarded due to ID errors. |
Packet server err | Number of packets discarded due to server errors. |
Response code err | Number of packets discarded due to code errors. |
Truncated | Number of discarded truncated packets. |
Question types | Statistics about sent DNS packets with specific query types. |
Question count err | Number of packets discarded due to query errors. |
Answer count err | Number of packets discarded due to response errors. |
Expand name fail | Number of packets discarded due to incorrect file name extensions. |
Class err | Count of discarded class error packets. |
Others err | Count of discarded other error packets. |
Sent request | Statistics about sent DNS packets. |
Standard | Number of sent DNS packets of the Standard type. |
Inverse | Number of sent DNS packets of the Inverse type. |