温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Linux基础命令---nslookup查询域名工具

发布时间:2020-08-05 10:26:40 来源:ITPUB博客 阅读:112 作者:一生有你llx 栏目:建站服务器

nslookup

nslookup 是一个查询DNS域名的工具,它有交互和非交互两种工作模式。

此命令的适用范围:RedHat、RHEL、Ubuntu、CentOS、Fedora。

 

1 、语法

nslookup [-option]  [name | -] [server]

 

2 、进入交互模式之后有如下命令

命令

说明

host

查询host的信息

server   domain

改变服务器

exit

退出

set keyword= value

设置指定属性

all ,打印所有的属性

domain=name  设置查询的名字

port=value  改变服务器端口

type=value  改变查询的类型

timeout=number  设置等待超时

class={IN | CH | HS | ANY}

 

3 、实例

1 )非交互模式查询

[root@localhost ~]#  nslookup www.baidu.com

Server:           172.20.10.1

Address:         172.20.10.1#53

 

Non-authoritative answer:

www.baidu.com    canonical name = www.a.shifen.com.

Name:            www.a.shifen.com

Address: 111.13.100.91

Name:            www.a.shifen.com

Address: 111.13.100.92 

2 )交互模式查询

[root@localhost ~]#  nslookup              // 交互模式

www.baidu.com                               // 输入查询的域名

Server:           172.20.10.1

Address:         172.20.10.1#53

 

Non-authoritative answer:

www.baidu.com    canonical name = www.a.shifen.com.

Name:            www.a.shifen.com

Address: 111.13.100.91

Name:            www.a.shifen.com

Address: 111.13.100.92

set all                                    // 打印当前所有的配置信息

Default server: 172.20.10.1

Address: 172.20.10.1#53

 

Set options:

  novc               nodebug       nod2

  search          recurse

  timeout = 0     retry = 3  port = 53

  querytype = A       class = IN

  srchlist = 

     

      做了一个Linux学习的平台,目前出来一个雏形,各位可以参考使用
      链接:https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ 密码:n7bk 

       Linux基础命令---nslookup查询域名工具

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI