nslookup、arp、netstat、traceroute

nslookup

  主要用于测试DNS服务器是否正常工作,除此之外,还可以对域名和IP地址进行查询。

 

 

[root@weekend110 ~]# nslookup
> www.guet.edu.cn        输入待查询的域名  www.guet.edu.cn
Server: 192.168.80.2
Address: 192.168.80.2#53

以上为所使用的DNS服务器

 

Non-authoritative answer:
Name: www.guet.edu.cn
Address: 202.193.64.56
Name: dns.guet.edu.cn
Address: 202.103.243.112
Name: mango.guet.edu.cn
Address: 202.193.64.33
> 202.193.64.33      输入待查询的IP地址
Server: 192.168.80.2
Address: 192.168.80.2#53

以上为所使用的DNS服务器

 

 

Non-authoritative answer:
33.64.193.202.in-addr.arpa name = 33.64.193.202.in-addr.arpa.
33.64.193.202.in-addr.arpa name = mango.gliet.cn.
33.64.193.202.in-addr.arpa name = mango.gliet.edu.cn.

Authoritative answers can be found from:
193.202.in-addr.arpa nameserver = dns.gliet.cn.
193.202.in-addr.arpa nameserver = mango.gliet.cn.
dns.gliet.cn internet address = 202.103.243.112
mango.gliet.cn internet address = 202.193.64.33
> exit      退出nslookup命令环境

[root@weekend110 ~]#

 

 

  也可以,不进入nslookup命令交互模式,直接使用命令查询IP地址或域名使用的DNS服务器。

[root@weekend110 ~]# nslookup www.guet.edu.cn
Server: 192.168.80.2
Address: 192.168.80.2#53

Non-authoritative answer:
Name: www.guet.edu.cn
Address: 202.193.64.56
Name: dns.guet.edu.cn
Address: 202.103.243.112
Name: mango.guet.edu.cn
Address: 202.193.64.33

[root@weekend110 ~]# nslookup 202.193.64.33        查询IP地址为202.193.64.33的服务器的域名
Server: 192.168.80.2
Address: 192.168.80.2#53

Non-authoritative answer:
33.64.193.202.in-addr.arpa name = 33.64.193.202.in-addr.arpa.
33.64.193.202.in-addr.arpa name = mango.gliet.cn.
33.64.193.202.in-addr.arpa name = mango.gliet.edu.cn.

Authoritative answers can be found from:
193.202.in-addr.arpa nameserver = mango.gliet.cn.
193.202.in-addr.arpa nameserver = dns.gliet.cn.
dns.gliet.cn internet address = 202.103.243.112
mango.gliet.cn internet address = 202.193.64.33

[root@weekend110 ~]# nslookup 202.193.64.56
Server: 192.168.80.2
Address: 192.168.80.2#53

Non-authoritative answer:
56.64.193.202.in-addr.arpa name = 56.64.193.202.in-addr.arpa.

Authoritative answers can be found from:
193.202.in-addr.arpa nameserver = dns.gliet.cn.
193.202.in-addr.arpa nameserver = mango.gliet.cn.
dns.gliet.cn internet address = 202.103.243.112
mango.gliet.cn internet address = 202.193.64.33

[root@weekend110 ~]#

 

 

 arp

  arp可以实现,从IP地址到以太网MAC地址之间的转换。

[root@weekend110 ~]# man arp
ARP(8) Linux Programmer’s Manual ARP(8)

NAME
arp - manipulate the system ARP cache

SYNOPSIS
arp [-evn] [-H type] [-i if] -a [hostname]

arp [-v] [-i if] -d hostname [pub]

arp [-v] [-H type] [-i if] -s hostname hw_addr [temp]

arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub

arp [-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub

arp [-vnD] [-H type] [-i if] -f [filename]

NOTE
This program is obsolete. For replacement check ip neighbor.

DESCRIPTION
Arp manipulates the kernel’s ARP cache in various ways. The primary options are clearing an address mapping
entry and manually setting up one. For debugging purposes, the arp program also allows a complete dump of the
ARP cache.

OPTIONS
-v, --verbose
Tell the user what is going on by being verbose.

-n, --numeric

 

 

 arp -a        以BSD默认格式显示arp表中的所有记录项

 arp -e        以linux默认格式显示arp表中的所有记录项

 arp -s         设置一个新的arp记录项

 arp -d        删除一个arp记录项

 arp -i        指定网络接口

 arp -f         从指定文件中读取新的记录项

 arp -v        冗余模式

 

[root@weekend110 ~]# arp -a      
? (192.168.80.2) at 00:50:56:f4:e1:51 [ether] on eth0
WIN-BQOBV63OBNM (192.168.80.1) at 00:50:56:c0:00:08 [ether] on eth0
[root@weekend110 ~]# arp -e
Address HWtype HWaddress Flags Mask Iface
192.168.80.2 ether 00:50:56:f4:e1:51 C eth0
WIN-BQOBV63OBNM ether 00:50:56:c0:00:08 C eth0
[root@weekend110 ~]#

 

 

netstat

  用于显示网络的连接状态、查询路由表和对网络接口进行统计。

[root@weekend110 ~]# man netstat
NETSTAT(8) Linux Programmer’s Manual NETSTAT(8)

NAME
netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast
memberships

SYNOPSIS
netstat [address_family_options] [--tcp|-t] [--udp|-u] [--raw|-w] [--listening|-l] [--all|-a] [--numeric|-n]
[--numeric-hosts][--numeric-ports][--numeric-ports] [--symbolic|-N] [--extend|-e[--extend|-e]] [--timers|-o]
[--program|-p] [--verbose|-v] [--continuous|-c] [delay]

netstat {--route|-r} [address_family_options] [--extend|-e[--extend|-e]] [--verbose|-v] [--numeric|-n]
[--numeric-hosts][--numeric-ports][--numeric-ports] [--continuous|-c] [delay]

netstat {--interfaces|-I|-i} [iface] [--all|-a] [--extend|-e] [--verbose|-v] [--program|-p] [--numeric|-n]
[--numeric-hosts][--numeric-ports][--numeric-ports] [--continuous|-c] [delay]

netstat {--groups|-g} [--numeric|-n] [--numeric-hosts][--numeric-ports][--numeric-ports] [--continuous|-c]
[delay]

netstat {--masquerade|-M} [--extend|-e] [--numeric|-n] [--numeric-hosts][--numeric-ports][--numeric-ports]
[--continuous|-c] [delay]

netstat {--statistics|-s} [--tcp|-t] [--udp|-u] [--raw|-w] [delay]

netstat {--version|-V}

netstat {--help|-h}

address_family_options:

[--protocol={inet,inet6,unix,ipx,ax25,netrom,ddp, ... } ] [--unix|-x] [--inet|--ip] [--ax25] [--ipx] [--netrom]
[--ddp]

NOTE
This program is obsolete. Replacement for netstat is ss. Replacement for netstat -r is ip route. Replacement

 

 

 netstat -r      显示核心路由表

 netstat -g      显示多播组成员信息

 netstat -c      进行动态显示,每隔1秒更新1次

 netstat -p      显示每个socket所属的进程号和程序名

 netstat -l      显示所有处于侦听模式的socket

 netstat -a       显示所有的socket,无论其是否处于侦听状态

 netstat -n      以IP地址形式(即数字格式)进行显示

 

 

  查看当前linux系统中的,路由表

 

[root@weekend110 ~]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.80.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
default 192.168.80.2 0.0.0.0 UG 0 0 0 eth0
[root@weekend110 ~]#

 

  查看当前linux系统中所有处于侦听状态的socket

[root@weekend110 ~]# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State 
tcp 0 0 *:sunrpc *:* LISTEN 
tcp 0 0 *:ssh *:* LISTEN 
tcp 0 0 localhost:ipp *:* LISTEN 
tcp 0 0 localhost:smtp *:* LISTEN 
tcp 0 0 *:42011 *:* LISTEN 
tcp 0 0 *:sunrpc *:* LISTEN 
tcp 0 0 *:ssh *:* LISTEN 
tcp 0 0 localhost:ipp *:* LISTEN 
tcp 0 0 localhost:smtp *:* LISTEN 
tcp 0 0 *:36611 *:* LISTEN 
udp 0 0 *:sunrpc *:* 
udp 0 0 *:dec_dlm *:* 
udp 0 0 *:ipp *:* 
udp 0 0 *:vacdsm-app *:* 
udp 0 0 *:57815 *:* 
udp 0 0 *:sunrpc *:* 
udp 0 0 *:dec_dlm *:* 
udp 0 0 *:45438 *:* 
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 14040 public/cleanup
unix 2 [ ACC ] STREAM LISTENING 13165 /var/run/cups/cups.sock
unix 2 [ ACC ] STREAM LISTENING 13232 /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 14204 /var/run/abrt/abrt.socket
unix 2 [ ACC ] STREAM LISTENING 17430 /tmp/orbit-root/linc-7d0-0-4bd6383e5553e
unix 2 [ ACC ] STREAM LISTENING 16499 /tmp/keyring-8HHVIm/socket
unix 2 [ ACC ] STREAM LISTENING 17537 /tmp/orbit-root/linc-7db-0-7588364fa30
unix 2 [ ACC ] STREAM LISTENING 19412 /tmp/orbit-root/linc-8e5-0-721f687210c51
unix 2 [ ACC ] STREAM LISTENING 17602 /tmp/orbit-root/linc-7ed-0-5e98d0f082c23
unix 2 [ ACC ] STREAM LISTENING 19149 /tmp/orbit-root/linc-827-0-332326bc39787
unix 2 [ ACC ] STREAM LISTENING 17679 /tmp/orbit-root/linc-7f0-0-7172996f4d82
unix 2 [ ACC ] STREAM LISTENING 17318 /tmp/keyring-8HHVIm/socket.ssh
unix 2 [ ACC ] STREAM LISTENING 9291 @/com/ubuntu/upstart
unix 2 [ ACC ] STREAM LISTENING 17803 /tmp/orbit-root/linc-7f8-0-6c7fd4bd93072
unix 2 [ ACC ] STREAM LISTENING 17808 /tmp/orbit-root/linc-7f7-0-7a6b30919fbd0
unix 2 [ ACC ] STREAM LISTENING 18113 /tmp/orbit-root/linc-812-0-7eebc3b381f7
unix 2 [ ACC ] STREAM LISTENING 18127 /tmp/orbit-root/linc-810-0-5dede9ea43407
unix 2 [ ACC ] STREAM LISTENING 18147 /tmp/orbit-root/linc-814-0-27515ff3110f1
unix 2 [ ACC ] STREAM LISTENING 18169 /tmp/orbit-root/linc-80f-0-396353431195e
unix 2 [ ACC ] STREAM LISTENING 18810 /tmp/orbit-root/linc-7ee-0-5b99b8d7edc48
unix 2 [ ACC ] STREAM LISTENING 14047 private/tlsmgr
unix 2 [ ACC ] STREAM LISTENING 19087 /tmp/orbit-root/linc-81d-0-42129c74b7757
unix 2 [ ACC ] STREAM LISTENING 14051 private/rewrite
unix 2 [ ACC ] STREAM LISTENING 19058 /tmp/orbit-root/linc-82b-0-533037353012d
unix 2 [ ACC ] STREAM LISTENING 18913 /tmp/orbit-root/linc-81a-0-7112e73a1f025
unix 2 [ ACC ] STREAM LISTENING 19025 /tmp/orbit-root/linc-84c-0-66c382f0c6b3f
unix 2 [ ACC ] STREAM LISTENING 13276 @/var/run/hald/dbus-dBCYzUv7ZV
unix 2 [ ACC ] STREAM LISTENING 19167 /tmp/orbit-root/linc-822-0-51dd63b7702ba
unix 2 [ ACC ] STREAM LISTENING 20387 /tmp/orbit-root/linc-996-0-79704b5eac021
unix 2 [ ACC ] STREAM LISTENING 19192 /tmp/orbit-root/linc-82d-0-32d7b94d98dd8
unix 2 [ ACC ] STREAM LISTENING 20501 /tmp/orbit-root/linc-9a6-0-72a6389f1b80
unix 2 [ ACC ] STREAM LISTENING 17297 /tmp/orbit-root/linc-7c8-0-6c211c5c709ed
unix 2 [ ACC ] STREAM LISTENING 14935 @/tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 17314 /tmp/orbit-root/linc-76b-0-522d509a82410
unix 2 [ ACC ] STREAM LISTENING 13269 @/var/run/hald/dbus-5pt50VnGon
unix 2 [ ACC ] STREAM LISTENING 17320 /tmp/keyring-8HHVIm/socket.pkcs11
unix 2 [ ACC ] STREAM LISTENING 14936 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 15293 @/tmp/gdm-session-PjeRYypV
unix 2 [ ACC ] STREAM LISTENING 14055 private/bounce
unix 2 [ ACC ] STREAM LISTENING 14059 private/defer
unix 2 [ ACC ] STREAM LISTENING 16904 /tmp/orbit-root/linc-7c4-0-38b3482d4e5c7
unix 2 [ ACC ] STREAM LISTENING 16776 @/tmp/dbus-HJiBk8d8vI
unix 2 [ ACC ] STREAM LISTENING 14063 private/trace
unix 2 [ ACC ] STREAM LISTENING 17142 /tmp/orbit-root/linc-775-0-2edd1e56f3e7
unix 2 [ ACC ] STREAM LISTENING 15122 @/tmp/gdm-greeter-XLcQAHNj
unix 2 [ ACC ] STREAM LISTENING 18948 /tmp/.esd-0/socket
unix 2 [ ACC ] STREAM LISTENING 18951 /root/.pulse/af81270238cf72a12c7e89bc0000003d-runtime/native
unix 2 [ ACC ] STREAM LISTENING 14067 private/verify
unix 2 [ ACC ] STREAM LISTENING 14071 public/flush
unix 2 [ ACC ] STREAM LISTENING 14075 private/proxymap
unix 2 [ ACC ] STREAM LISTENING 14079 private/proxywrite
unix 2 [ ACC ] STREAM LISTENING 14083 private/smtp
unix 2 [ ACC ] STREAM LISTENING 14087 private/relay
unix 2 [ ACC ] STREAM LISTENING 14091 public/showq
unix 2 [ ACC ] STREAM LISTENING 14095 private/error
unix 2 [ ACC ] STREAM LISTENING 14099 private/retry
unix 2 [ ACC ] STREAM LISTENING 14103 private/discard
unix 2 [ ACC ] STREAM LISTENING 14107 private/local
unix 2 [ ACC ] STREAM LISTENING 14111 private/virtual
unix 2 [ ACC ] STREAM LISTENING 14115 private/lmtp
unix 2 [ ACC ] STREAM LISTENING 14119 private/anvil
unix 2 [ ACC ] STREAM LISTENING 14123 private/scache
unix 2 [ ACC ] STREAM LISTENING 16880 /tmp/.ICE-unix/1909
unix 2 [ ACC ] STREAM LISTENING 12587 /var/run/rpcbind.sock
unix 2 [ ACC ] STREAM LISTENING 16879 @/tmp/.ICE-unix/1909
unix 2 [ ACC ] STREAM LISTENING 12668 /var/run/dbus/system_bus_socket
[root@weekend110 ~]#

 

 

 traceroute

  用于检测到达目的地的路由状况

[root@weekend110 ~]# traceroute -n www.guet.edu.cn
traceroute to www.guet.edu.cn (202.193.64.56), 30 hops max, 60 byte packets
1 192.168.80.2 0.175 ms 0.084 ms 0.132 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * *^C
[root@weekend110 ~]#

转载于:https://www.cnblogs.com/wangsongbai/p/9115740.html

(1)普通用户端(全平台) 音乐播放核心体验: 个性化首页:基于 “听歌历史 + 收藏偏好” 展示 “推荐歌单(每日 30 首)、新歌速递、相似曲风推荐”,支持按 “场景(通勤 / 学习 / 运动)” 切换推荐维度。 播放页功能:支持 “无损音质切换、倍速播放(0.5x-2.0x)、定时关闭、歌词逐句滚动”,提供 “沉浸式全屏模式”(隐藏冗余控件,突出歌词与专辑封面)。 多端同步:自动同步 “播放进度、收藏列表、歌单” 至所有登录设备(如手机暂停后,电脑端打开可继续播放)。 音乐发现与管理: 智能搜索:支持 “歌曲名 / 歌手 / 歌词片段” 搜索,提供 “模糊匹配(如输入‘晴天’联想‘周杰伦 - 晴天’)、热门搜索词推荐”,结果按 “热度 / 匹配度” 排序。 歌单管理:创建 “公开 / 私有 / 加密” 歌单,支持 “批量添加歌曲、拖拽排序、一键分享到社交平台”,系统自动生成 “歌单封面(基于歌曲风格配色)”。 音乐分类浏览:按 “曲风(流行 / 摇滚 / 古典)、语言(国语 / 英语 / 日语)、年代(80 后经典 / 2023 新歌)” 分层浏览,每个分类页展示 “TOP50 榜单”。 社交互动功能: 动态广场:查看 “关注的用户 / 音乐人发布的动态(如‘分享新歌感受’)、好友正在听的歌曲”,支持 “点赞 / 评论 / 转发”,可直接点击动态中的歌曲播放。 听歌排行:个人页展示 “本周听歌 TOP10、累计听歌时长”,平台定期生成 “全球 / 好友榜”(如 “好友中你本周听歌时长排名第 3”)。 音乐圈:加入 “特定曲风圈子(如‘古典音乐爱好者’)”,参与 “话题讨论(如‘你心中最经典的钢琴曲’)、线上歌单共创”。 (2)音乐人端(创作者中心) 作品管理: 音乐上传:支持 “无损音频(FLAC/WAV)+ 歌词文件(LRC)+ 专辑封面” 上传,填写 “歌曲信息
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值