# dig trace 怎麼跑? ###### tags: `IT` 以下測試版本跟 dns server ``` DiG 9.10.6 ``` ## dig 怎麼跑 ? 首先是一般的 dig ``` $ dig github.com @8.8.8.8 ``` 透過 tcpdump 可以看到 8.8.8.8 直接回傳 github.com 的 IP, dig 也只花了一次的 request ``` $ sudo tcpdump -n 'port 53' 17:30:06.662274 IP 192.168.1.100.57143 > 8.8.8.8.53: 19618+ [1au] A? github.com. (39) 17:30:06.675395 IP 8.8.8.8.53 > 192.168.1.100.57143: 19618 1/0/1 A 13.237.44.5 (55) ``` ## dig +trace 再來在跑 +trace ``` $ dig github.com +trace @8.8.8.8 ``` 一樣透過 tcpdump 去看結果,卻會發現多了幾次的 request ``` 17:34:08.759406 IP 192.168.1.100.51809 > 192.dns1.53: 48970 [1au] A? github.com. (39) 17:34:09.006045 IP 192.dns1.53 > 192.168.1.100.51809: 48970- 0/15/27 (1170) 17:34:09.016137 IP 192.168.1.100.61524 > 192.dns2.53: 19544 [1au] A? github.com. (39) 17:34:09.140044 IP 192.dns2.53 > 192.168.1.100.61524: 19544- 0/12/2 (827) 17:34:09.147448 IP 192.168.1.100.50541 > 198.51.44.8.53: 13475 [1au] A? github.com. (39) 17:34:09.259498 IP 198.51.44.8.53 > 192.168.1.100.50541: 13475*- 1/0/1 A 13.237.44.5 (55) ```
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.