Linux_centos7_网络管理1_2

本文详细介绍了在CentOS7操作系统中如何进行网络管理,包括网络接口的配置、静态IP设置、DNS解析以及网络服务的启停操作,旨在帮助用户理解和掌握Linux网络管理基础。
摘要由CSDN通过智能技术生成

web managment 1_2

#测试网络连接状态
[kingarthur@localhost ~]$ ping www.google.com
PING www.google.com (174.37.175.229) 56(84) bytes of data.
^C
--- www.google.com ping statistics ---
33 packets transmitted, 0 received, 100% packet loss, time 32009ms

#发c=3次数据包,发包间隔时间i=2秒
[kingarthur@localhost ~]$ ping -c 3 -i 2 www.google.com
PING www.google.com (199.59.148.209) 56(84) bytes of data.

--- www.google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 3999ms

#最小发包间隔为200ms 或0.2s
[kingarthur@localhost ~]$ ping -c 5 -i 0.02 www.baidu.com
PING www.a.shifen.com (182.61.200.6) 56(84) bytes of data.
ping: cannot flood; minimal interval allowed for user is 200ms
#测试国内百度网站
[kingarthur@localhost ~]$ ping -c 5 -i 0.2 www.baidu.com
PING www.a.shifen.com (182.61.200.7) 56(84) bytes of data.
64 bytes from 182.61.200.7 (182.61.200.7): icmp_seq=1 ttl=55 time=6.63 ms
64 bytes from 182.61.200.7 (182.61.200.7): icmp_seq=2 ttl=55 time=6.55 ms
64 bytes from 182.61.200.7 (182.61.200.7): icmp_seq=3 ttl=55 time=6.39 ms
64 bytes from 182.61.200.7 (182.61.200.7): icmp_seq=4 ttl=55 time=5.92 ms
64 bytes from 182.61.200.7 (182.61.200.7): icmp_seq=5 ttl=55 time=5.87 ms

--- www.a.shifen.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 805ms
rtt min/avg/max/mdev = 5.871/6.274/6.633/0.317 ms
#测试 google
[kingarthur@localhost ~]$ ping -c 5 -i 0.2 www.google.com
PING www.google.com (69.171.237.16) 56(84) bytes of data.

--- www.google.com ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 810ms

#测试 youtube
[kingarthur@localhost ~]$ ping -c 5 -i 0.2 www.youtube.com
PING www.youtube.com (243.185.187.39) 56(84) bytes of data.

--- www.youtube.com ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 811ms

#测试 bing
[kingarthur@localhost ~]$ ping -c 5 -i 0.2 www.bing.com
PING cn-0001.cn-msedge.net (202.89.233.100) 56(84) bytes of data.
64 bytes from 202.89.233.100 (202.89.233.100): icmp_seq=1 ttl=117 time=4.58 ms
64 bytes from 202.89.233.100 (202.89.233.100): icmp_seq=2 ttl=117 time=4.64 ms
64 bytes from 202.89.233.100 (202.89.233.100): icmp_seq=3 ttl=117 time=3.09 ms
64 bytes from 202.89.233.100 (202.89.233.100): icmp_seq=4 ttl=117 time=4.63 ms
64 bytes from 202.89.233.100 (202.89.233.100): icmp_seq=5 ttl=117 time=4.37 ms

--- cn-0001.cn-msedge.net ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 806ms
rtt min/avg/max/mdev = 3.090/4.263/4.642/0.600 ms





#-p显示正在使用的socket的程序名称
#-l显示监控中的服务器的socket
#-n直接使用IP地址
#-t显示TCP端口情况


ingarthur@localhost ~]$ netstat -plnt
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN      -
tcp        0      0 192.16
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值