大网数据广告活动
服务器运维问答

What does OPT PSEUDOSECTION mean in `dig` response?

· 52CE 我爱测

This is part of the response when I run dig in terminal: ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 What does OPT mean? What does PSEUDOSECTION mean?

问题原文

原帖链接 · David Kennell · CC BY-SA 4.0

This is part of the response when I run dig in terminal:

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512

What does OPT mean? What does PSEUDOSECTION mean?

社区高分解答

原帖链接 · David Kennell · CC BY-SA 4.0

So this has to do with something called Extended mechanisms for DNS (EDNS). A DNS message (by which I mean either a request or response) consists of the following five sections that may or may not have values:

- Header
- Question
- Answer
- Authority
- Additional

In the late 90s, people wanted to extend the functionality of DNS, but because of the way it was built, it was not possible to add more sections to the original list of five, nor to add new flags to the header. So EDNS was created, which among other things adds "pseudosections" to DNS. They're called that because they're actually just part of the ADDITIONAL section. They're not full sections in their own right, they're just "pseudosections."

EDNS also adds support for "pseudo- resource records." So far, only one pseudo- resource record type has been created: OPT, which stands for "options." OPT records don't actually carry any DNS information, just info "pertaining to the question-and-answer sequence of a specific transaction." In other words, they simply contain:

  • the version of EDNS that is being used
  • any EDNS flags
  • the size of the UDP packet that is carrying the request.

I recommend the wikipedia article on EDNS as well as the RFC that introduces it:

https://en.wikipedia.org/wiki/Extension_mechanisms_for_DNS

https://www.rfc-editor.org/rfc/rfc6891

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-05-24)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。