0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

vol2. DNS のやりとりをwiresharkで覗いてみる

Last updated at Posted at 2024-01-09

DNSのながれ

とてもシンプル。

DNSクライアントは、DNSサーバーにQueryを投げる。
Queryは"www.yahoo.co.jp"といったURL。

DNSサーバーは、DNSクライアントにAnswerと返す。
Answerは"182.22.31.252"といったIPアドレス。

Ipv4とIpv6version がある。(Type field で識別)

Wireshark Screen Shot

image.png

image.png

image.png

image.png

DNSサーバーへの問い合わせコマンド

@を指定することで、DNSサーバーを指定することができる。

$dig www.yahoo.co.jp @8.8.8.8

; <<>> DiG 9.16.1-Ubuntu <<>> www.yahoo.co.jp @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43848
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;www.yahoo.co.jp.               IN      A

;; ANSWER SECTION:
www.yahoo.co.jp.        900     IN      CNAME   edge12.g.yimg.jp.
edge12.g.yimg.jp.       24      IN      A       183.79.249.252

;; Query time: 173 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Jan 09 14:31:56 EST 2024
;; MSG SIZE  rcvd: 88
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?