[Linux] dig 예제 정리
- IT
- 2020. 7. 6.
반응형
반응형
# dig google.com # 기본 도메인 조회 |
[root@linux-1 ~]# dig google.com
; <<>> DiG 9.11.4-P2-RedHat-9.11.4-16.P2.el7_8.6 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57853
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 128 IN A 216.58.199.110
;; Query time: 4 msec
;; SERVER: 1.214.68.2#53(1.214.68.2)
;; WHEN: 일 7월 05 22:40:27 KST 2020
;; MSG SIZE rcvd: 55
# dig +short google.com # 심플하게 ip만 조회 |
[root@linux-1 ~]# dig +short google.com
172.217.31.238
# dig -t cname api.google.com +short # cname 레코드 조회 |
[root@linux-1 ~]# dig -t cname api.google.com +short
api.l.google.com.
# dig -t txt google.com +short # txt 레코드 조회 |
[root@linux-1 ~]# dig -t txt google.com +short
"facebook-domain-verification=22rm551cu4k0ab0bxsw536tlds4h95"
"globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8="
"docusign=1b0a6754-49b1-4db5-8540-d2c12664b289"
"v=spf1 include:_spf.google.com ~all"
"docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd0e"
# dig -t ns google.com +short # ns 레코드 조회 |
[root@linux-1 ~]# dig -t ns google.com +short
ns1.google.com.
ns4.google.com.
ns3.google.com.
ns2.google.com.
# dig google.com @8.8.8.8 +short # 다른 DNS 서버를 지정하여 조회 |
[root@linux-1 ~]# dig google.com +short @8.8.8.8
172.217.27.78
# dig google.com +trace # 조회 과정 추적 |
[root@linux-1 ~]# dig google.com +trace
; <<>> DiG 9.11.4-P2-RedHat-9.11.4-16.P2.el7_8.6 <<>> google.com +trace
;; global options: +cmd
. 107792 IN NS m.root-servers.net.
. 107792 IN NS j.root-servers.net.
. 107792 IN NS l.root-servers.net.
. 107792 IN NS e.root-servers.net.
. 107792 IN NS b.root-servers.net.
. 107792 IN NS g.root-servers.net.
. 107792 IN NS a.root-servers.net.
. 107792 IN NS k.root-servers.net.
. 107792 IN NS i.root-servers.net.
. 107792 IN NS h.root-servers.net.
. 107792 IN NS c.root-servers.net.
. 107792 IN NS d.root-servers.net.
. 107792 IN NS f.root-servers.net.
. 506384 IN RRSIG NS 8 0 518400 20200719050000 20200706040000 46594 . E9nr2XxPJOMrVqEimrYV4kExDjWjt1gO/Zh9Nv089m9+jVL6CoewWgTG bt/Kk1jdccT980fcfLFHVqXx46yxeV5X39gg39Ntbu9aJ/e3kKw9VwSv /Ufumm1CQ28mWtsrdbK6Ubr05EYu2Q9twDlGclCG0y6oePaj7Wbq4lwW HEoU02mLo/l3rEImbLkDJ+kKk26TfLt+Erh8afBLprJmYetyBX7dgc4/ 8ZhSJuMY2ssbeyvOaMSzkOCAVaedUNCVofPA79NQnryUraqRJt3IMqM9 bKFWIqrmb75rfD8clsFUX28rupoxr4ZSdzAi01AI7zIZqDS7KoK+xuW9 9o6Z3w==
;; Received 525 bytes from 1.214.68.2#53(1.214.68.2) in 4 ms
com. 172800 IN NS h.gtld-servers.net.
com. 172800 IN NS j.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
com. 172800 IN NS e.gtld-servers.net.
com. 172800 IN NS d.gtld-servers.net.
com. 172800 IN NS i.gtld-servers.net.
com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS c.gtld-servers.net.
com. 172800 IN NS k.gtld-servers.net.
com. 172800 IN NS m.gtld-servers.net.
com. 172800 IN NS f.gtld-servers.net.
com. 172800 IN NS g.gtld-servers.net.
com. 172800 IN NS l.gtld-servers.net.
com. 86400 IN DS 30909 8 2 E2D3C916F6DEEAC73294E8268FB5885044A833FC5459588F4A9184CF C41A5766
com. 86400 IN RRSIG DS 8 1 86400 20200719050000 20200706040000 46594 . i6wKyBRlK+OvzyLFJ+/uNp5KVqLNS7JUdPNPF53dFIJBlCK8IcMNTYxF 6/g4mFyIeHS832sjiAsdiRKExvktb2mNDcuN3ggtwMvjafukk7Iz9qvi Dggl1voa5yEZvEXwpHUnLH0E3peu+mpazaYFZeDU/H4FOI6BG9/KZsj3 8RwQ6Fa7j9jW0T68630m3joAZucGmsg4zn5Sbai4B7WmlXSpMhidSjbG yC/mBYnwfvtyhHTz2TGPoN1g3QgqaP82hV+xuxEdcEwm/bVSBDfQLJWN KHi1KL5TdW0wNDoDhSmoSpvgqKjF3Pk7du3bEKeEgq1A/8utpJgjvRQw 121plw==
;; Received 1170 bytes from 192.33.4.12#53(c.root-servers.net) in 141 ms
google.com. 172800 IN NS ns2.google.com.
google.com. 172800 IN NS ns1.google.com.
google.com. 172800 IN NS ns3.google.com.
google.com. 172800 IN NS ns4.google.com.
CK0POJMG874LJREF7EFN8430QVIT8BSM.com. 86400 IN NSEC3 1 1 0 - CK0Q1GIN43N1ARRC9OSM6QPQR81H5M9A NS SOA RRSIG DNSKEY NSEC3PARAM
CK0POJMG874LJREF7EFN8430QVIT8BSM.com. 86400 IN RRSIG NSEC3 8 2 86400 20200712044139 20200705033139 39844 com. LtqHetDO37s3Feh8fpUFXVRF+NvjhM6KEeraWoT5NGJsOXIMNIbq87TA HdkPuC+VK8fT3XxkFaaptVp1b3ut+hgP1yQwzy8zuF5YksaiKvwu0uaN b7souT7UyOy3YbnzIOWPdA8Iq9rzFxvDBIiP9ZnRDvPqbXDgfuqhW4xl jc4Jr7lOk5uNo4raYDvI1XgJZyDfe2kVXJInTLrnEchL8A==
S84BDVKNH5AGDSI7F5J0O3NPRHU0G7JQ.com. 86400 IN NSEC3 1 1 0 - S84CDVS9VPREADFD6KK7PDADH0M6IO8H NS DS RRSIG
S84BDVKNH5AGDSI7F5J0O3NPRHU0G7JQ.com. 86400 IN RRSIG NSEC3 8 2 86400 20200713043842 20200706032842 39844 com. buY9HE0rlV4Xeu86mFDMMt3+ZB4BLC0wVLpNRYnaqHkLgB2uJ1oo4sUk IxcGaNlWleFqjnFJ3gq+grBNfUWVCftTeKvjPOZKG6iWqu2PWqFA5yT6 BeNiwdVeuK8kLfV5kPK/wyAnTYw8J3aV7qhYFxLcZjIE7A06XnpFhzQ5 7brY2YMQUSZTW9CCdCXPccLdDwNkwsLtb1zN6oUEgG65yQ==
;; Received 836 bytes from 192.41.162.30#53(l.gtld-servers.net) in 135 ms
google.com. 300 IN A 172.217.25.78
;; Received 55 bytes from 216.239.34.10#53(ns2.google.com) in 58 ms
반응형
'IT' 카테고리의 다른 글
[Linux] 패스워드 없이 ssh 접속하기 (0) | 2020.07.08 |
---|---|
[Linux] sort uniq로 중복 라인 제거하기 (0) | 2020.07.07 |
[Linux] 리눅스 CD 명령어 예제 (0) | 2020.07.05 |
[Linux] hpssacli 명령어 정리 (0) | 2020.07.03 |
[linux] nslookup 예제 정리 (0) | 2020.07.01 |