0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

個人的備忘録:ドメインに紐づくネームサーバーを調べるには? nslookup -type=ns の基本を整理してみた

Posted at

はじめに

本記事では、ドメイン名のDNS情報を確認するためのコマンド「nslookup -type=ns」について解説します。

個人の備忘録程度の走り書きとなっておりますが、温かい目で見守っていただければ幸いです。

DNSの名前解決において、ネームサーバー(NSレコード)の情報を取得する場面で役立ちます。

書こうと思ったきっかけ

インフラ学習の一環としてDNS構成や名前解決の仕組みを学んでいた際に、「どのネームサーバーがこのドメインを管理しているのか」を確認したくなったことがきっかけです。その際に使用したのが nslookup -type=ns でした。

nslookup とは

nslookup は、DNS(ドメインネームシステム)の名前解決情報を取得するためのCLIツールです。Windows、macOS、Linux いずれの環境でも使用できます。

参考文献

NSレコードとは?

NSレコード(Name Serverレコード)は、ドメインの名前解決を行うネームサーバーの情報を格納しているDNSレコードです。あるドメインにアクセスしようとする際、どのネームサーバーに問い合わせるかを示す情報です。

参考文献

コマンド構文

nslookup -type=ns <ドメイン名>

使用例

nslookup -type=ns example.com

このコマンドを実行すると、example.com を管理しているネームサーバーの一覧が表示されます。

出力例:

Server:  8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
example.com     nameserver = ns1.exampledns.com.
example.com     nameserver = ns2.exampledns.com.

補足:よく使うオプション

  • server <DNSサーバー> : 指定したDNSサーバーに問い合わせたいときに使用します。
    nslookup -type=ns example.com 8.8.8.8
    

まとめ

nslookup -type=ns コマンドは、ドメインに紐づくネームサーバーの情報を確認したいときに非常に便利です。

インフラ構築やドメイン設定、トラブルシューティングの現場で活用する場面が多いため、基本的な使い方を覚えておくと役立ちます!

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?