首页 map[addtime:<nil> column:0 data:{"status":0,"msg":"","data":{"data":{"banner":[{"image":"/assets/upload/2024/10/09/8321b9b943cd4f57fe891334012bebb1.png","t1":"感恩有你,未来可期","t2":"","t3":"/p/2802"}],"name1":"新闻资讯"}}} data2:<nil> description:16年IT服务经验-全国服务电话:400-017-5181 featured: id:1 illustrate:新闻资讯 keywords:同创双子公司新闻, 同创双子,同创双子怎么样,同创双子公司,成都同创双子,北京同创双子,同创双子最新新闻 name:新闻资讯 orders:1 state:true tag:<nil> templateslist:{ "controls": [ { "name": "data.name1", "label": "简单标题", "type": "input-text" }, { "type": "combo", "name": "data.banner", "label": "轮播", "multiple": true, "draggable": true, "items": [ { "name": "t1", "label": "标题", "type": "input-text" }, { "name": "t2", "label": "时间", "type": "input-text" }, { "name": "t3", "label": "连接", "type": "input-text" }, { "type": "input-image", "name": "image", "label": "配图", "receiver": "./api/upload?rich=2" } ] } ] } templatespage:{ "controls": [ { "label": "推荐等级", "type": "select", "name": "featured", "options": [ { "label": "不推荐", "value": 0 }, { "label": "首页推荐", "value": 1001 } ] }, { "type": "group", "body": [ { "name": "data.listimg", "label": "列表图片", "receiver": "./api/upload?rich=2", "type": "input-image" }, { "name": "data.img", "label": "首页图片", "receiver": "./api/upload?rich=2", "type": "input-image" } ] }, { "type": "input-rich-text", "name": "data.body", "label": "文章内容1", "receiver": "post:./api/upload?rich=1" } ] } title:新闻资讯-同创双子(北京)信息技术股份有限公司 tmpllist:list tmplpage:page url:news] > 新闻资讯 map[addtime:<nil> column:1 data:{"status":0,"msg":"","data":{"data":{"banner":[{"image":"/assets/upload/2023/12/13/3e1643bd17c60956f27ddf735eb3048d.png","t1":"桌面运维是什么?外包好还是自招好","t3":"https://www.itgemini.net/p/2613"},{"image":"/assets/upload/2023/12/13/d52a5f367538356cbcbfbbf727a5e0a7.png","t1":"什么是系统集成?同创双子可以做哪些系统集成服务","t3":"https://www.itgemini.net/p/2611"}],"name1":"干货分享"}}} data2:<nil> description:16年IT服务经验-全国服务电话:400-017-5181 featured: id:3 illustrate:干货分享 keywords:同创双子公司新闻, 同创双,同创双子公司,成都同创双子,北京同创双子,同创双子最新新闻,电脑卡顿,电脑故障,网络故障 name:干货分享 orders:1 state:true tag:<nil> templateslist:{ "controls": [ { "name": "data.name1", "label": "简单标题", "type": "input-text" }, { "type": "combo", "name": "data.banner", "label": "轮播", "multiple": true, "draggable": true, "items": [ { "name": "t1", "label": "标题", "type": "input-text" }, { "name": "t2", "label": "时间", "type": "input-text" }, { "name": "t3", "label": "连接", "type": "input-text" }, { "type": "input-image", "name": "image", "label": "配图", "receiver": "./api/upload?rich=2" } ] } ] } templatespage:{ "controls": [ { "label": "推荐等级", "type": "select", "name": "featured", "options": [ { "label": "不推荐", "value": 0 }, { "label": "首页推荐", "value": 1001 } ] }, { "type": "group", "body": [ { "name": "data.listimg", "label": "列表图片", "receiver": "./api/upload?rich=2", "type": "input-image" }, { "name": "data.img", "label": "首页图片", "receiver": "./api/upload?rich=2", "type": "input-image" } ] }, { "type": "input-rich-text", "name": "data.body", "label": "文章内容", "receiver": "post:./api/upload?rich=1" } ] } title:干货分享-IT技巧-同创双子(北京)信息技术股份有限公司 tmpllist:list tmplpage:page url:share] > 干货分享
网络探索工具ping命令的常用功能

发布日期:2017/11/06 08:00:00

ping简介

ping是一个用来测试网络连接的程序。它使用ICMP协议,请求目的地给予应答,它可以用来测试网络连通性、网络时延等,通常用来作为可用性的检查。它走在网络层,在网络维护和it运维中起到至关重要的作用,因此ping通不通与端口无关。

ping命令

ping常用选项

Windows

-t   :不间断向目标IP发送数据包

-l   num :数据包的大小,默认32字节,最大65500字节

-n  num:发包个数,默认4

SLES 11

-i  num:发包时间间隔,单位为秒

-c num:发包个数

-f :flood ping,顾名思义,洪水一般的ping,很明显可以认为是一种攻击了。

-s num:数据包大小,默认56字节

网络配置后ping测试的一般顺序

1、检查IP配置:linux:ifconfig /all ,windows:ipconfig

2、ping 127.0.0.1:测试TCP/IP协议

3、ping 本机IP:测试IP地址配置

4、ping网关:测试网关连通性

5、ping同网段其它机器:硬件设备检查

6、ping 目标机器:测试到目标机器的连通性

7、ping DNS地址:检查域名解析(特殊情况用)

ping的正常结果

time(时间):目标响应时间

ttl:生存时间(time-to-live),指数据包被路由器丢弃之前允许通过的网段数量,默认64。它是IP协议包中的一个值,它告诉网络,数据包在网络中的时间是否太长而应被丢弃。

ping非正常结果的可能原因

1、目标IP不存在

2、对方关机

3、对方禁PING,也叫ICMP包过滤(主机设置、防火墙设置)

4、网络故障

5、网卡配置错误:IP错误;多网卡同一网段;

6、IP冲突

7、不存在路由

8、网关配置错误:没有设置默认网关或者设置错误

9、网线故障

10、服务器故障,比如太繁忙,比如被攻击等

11、网络线路故障:电信、联通...

12、网卡硬件故障

13、网卡驱动不对或没安装驱动

14、ping域名的故障,需要检查到dns的连通性

15、TCP/IP协议故障

PING的攻击

1、Ping of Death(死亡之Ping)攻击

利用操作系统规定的ICMP数据包最大尺寸不超过64KB这一规定,向主机发起“Ping of Death”(死亡之Ping)攻击。“Ping of Death” 攻击的原理是:如果ICMP数据包的尺寸超过64KB上限时,主机就会出现内存分配错误,导致TCP/IP堆栈崩溃,致使主机死机。(操作系统已经取消了发送ICMP数据包的大小的限制,解决了这个漏洞)

2、ICMP风暴

向目标主机长时间、连续、大量地发送ICMP数据包,抢占网络资源,导致系统变慢,网速变慢,也会最终使系统瘫痪。大量的ICMP数据包会形成“ICMP风暴”,使得目标主机耗费大量的CPU资源处理,疲于奔命。

防御恶意的PING

1、主机

SLES11 SP3

# vi /etc/sysctl.conf

增加如下两行(如果没有)

net.ipv4.icmp_echo_ignore_all = 1

net.ipv4.icmp_echo_ignore_broadcasts = 1

使修改立即生效

# sysctl -p

注:生效后,本地ping 127.0.0.1或者ping本机IP都不通的。

2、防火墙

设置“防御ICMP攻击”或者“防止别人用ping命令探测”之类的设置即可。

转载时请注明:转载自“同创双子”,原文地址:http://www.itgemini.net/29-shuangzixinwen/it-zhishi/1466-ping

凡文章内未标注来源均为原创文章!

同创双子为企业保驾护航

专注数字化方案建设,推动智慧企业生态圈的升级发展