ping

linux ping命令

心不动则不痛 提交于 2020-01-01 04:23:36
1. 名称解释 PING (Packet Internet Grope),因特网包探索器 2. 简单测试 [rocky@dev_pc1 ~]$ ping www.baidu.com PING www.a.shifen.com (61.135.169.125) 56(84) bytes of data. 64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=1 ttl=57 time=2.95 ms 不加http 或 https [rocky@dev_pc1 ~]$ ping http://www.baidu.com ping: http://www.baidu.com: 未知的名称或服务 [rocky@dev_pc1 ~]$ ping https://www.baidu.com ping: https://www.baidu.com: 未知的名称或服务 3. 其他 3.1 ping10次 间隔1秒 ping -c 10 -i 1 www.baidu.com 4. shell bash #!/bin/bash network="192.168.1" for sitenu in $(seq 1 100) do ping -c 1 -w 1 "${network}"."${sitenu}" &> /dev/null &&

idea登录github报错 Can't login: Connection reset

守給你的承諾、 提交于 2020-01-01 02:10:09
idea登录github报错 Can't login: Connection reset 转载请注明出处: https://www.cnblogs.com/xiaoliangyuu/p/11486158.html 问题描述: 使用idea导入github工程时报错如下,使用Settings设置登录也是同样的报错,用户名密码正确,且在tortoiseGit和msysgit可以成功pull和push且无需重复登录账户。 尝试解决一 ( 未解决 ): 原因分析: cmd无法ping通 github.com 参考: github不能访问,ping不通github.com解决办法 解决无法Ping通Github 无法 ping 通 github.com 编辑 host文件,再ping可以ping通,但是还是无法登录 尝试解决二(已解决): 1、关闭翻墙软件 jikess后,再次在idea尝试,报错如下: 2、查看翻墙软件的本地代理端口也是1080. 3、查看idea代理设置如下,改为 auto-detect proxy settings,如下: 4、再次尝试报错如下: 5、此报错原因是密码错误,输入正确密码,成功!! 来源: https://www.cnblogs.com/xiaoliangyuu/p/11486158.html

Fast ping sweep in python

让人想犯罪 __ 提交于 2019-12-31 22:26:23
问题 So, I'm trying to get similar results using python as I do with a bash script. Code for the bash script: #!/bin/bash for ip in $(seq 1 254); do ping -c 1 10.10.10.$ip | grep "bytes from" | cut -d " " -f 4 | cut -d ":" -f 1 & done The thing that I would like to do is get the same results with similar speed. The issue that I've had with every version of the python script is that it takes a very long time to complete compared to the few seconds the batch script takes. The batch file takes about

写一个脚本,实现判断192.168.3.0/24网络里,当前在线的IP有哪些。

拟墨画扇 提交于 2019-12-31 17:50:00
条件如下: 通过ping命令测试192.168.3.1到192.168.3.5之间的所有主机是否在线, 如果在线,就显示"ip is up.",其中的IP要换为真正的IP地址,且以绿色显示; 如果不在线,就显示"ip is down.",其中的IP要换为真正的IP地址,且以红色显示; 要求:分别使用while,until和for(两种形式)循环实现。 方法一:用while实现。 #!/bin/bash IP=1 while [ $IP -le 5 ] ; do ping - c 2 - w 2 192 . 168 . 3 . $IP &> / dev / null STRING=$? # if ping -w 2 -c 2 192.168.3.$IP &>/dev/null;then if [ $STRING -eq 0 ] ; then echo - e "\033[32;40m192.168.3. $IP is up.\033[0m" else echo - e "\033[31;40m192.168.3. $IP is down.\033[0m" fi let IP= $IP + 1 done 或者 : #!/bin/bash # while true ; do for I in { 1 . . 5 } ; do ping - c 2 - w 2 192 . 168 . 3

关于wordpress升级遇到的问题

你离开我真会死。 提交于 2019-12-31 05:09:44
前几天登录我的博客后台,发现可以升级了,顺手点了一下,但顺接出现了几个报错,然后这里记录一下解决方法: 1、出现“另一更新正在进行”的错误解决: 这是因为可能你上次更新失败了,或者WordPress在升级的过程中,如果你刷新页面或者关闭页面会造成Wordpress升级不成功 由于在升级Wordpress的过程时,Wordpress会在数据库 wp_options 表中增加 core_updater.lock 记录。若中途打断Wordpress程序的升级,这个记录会保留在数据库中。当下次升级时,Wordpress检测到此记录的存在就会返回”另一更新正在进行”。 可以直接通过MySQL数据库管理工具(比如 phpMyAdmin 或 navicat),在 wp_options 表中找到 core_updater.lock记录并将这一列数据并且删除。 再次点更新就没有这个问题了 2、 wordpress其它错误: Warning: 发生了预料之外的错误。WordPress.org或是此服务器的配置可能出了一些问题。如果您持续遇到困难,请试试支持论坛。 (WordPress无法建立到WordPress.org的安全连接,请联系您的服务器管理员。) in /fujieace/nginxssl/html/wp-admin/includes/translation-install.php on

best Alternative for InetAddress.getByName(host).isReachable(timeout)

拈花ヽ惹草 提交于 2019-12-30 04:35:07
问题 I am trying to reach a host and have the following code if(!InetAddress.getByName(host).isReachable(TIMEOUT)){ throw new Exception("Host does not exist::"+ hostname); } The hostname I am able to ping from windows, and also did a tracert on it and it returns all the packets. But java throws out exception "Host does not exist::"; The Timeout value I experimented from giving 2000ms, to 5000ms. I tried 3000 as well. What is the cause of this problem I am not able to understand. I researched on

Batch ERRORLEVEL ping response

限于喜欢 提交于 2019-12-29 04:45:25
问题 I'm trying to use a batch file to confirm a network connection using ping. I want to do batch run and then print if the ping was successful or not. The problem is that it always displays 'failure' when run as a batch. Here is the code: @echo off cls ping racer | find "Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)," if not errorlevel 1 set error=success if errorlevel 1 set error=failure cls echo Result: %error% pause 'racer' is the name of my computer. I'm having my computer ping itself

ACG作为二层透明设备如何进行配置

孤者浪人 提交于 2019-12-29 00:54:43
1、 用户需求 为了不改变现网拓扑环境,用户打算将ACG设备二层透明部署到网络环境中。 2、 拓扑环境 3、 配置思路 ACG配置思路: 创建网桥接口 将上下行物理接口划入到网桥接口中(关于网桥接口地址可配可不配) ACG配置步骤: 通过浏览器打开ACG(默认是基于https的),点击“接口”选项如下所示: 点击右侧“网络接口”选项------>点击“新建” 在“名称”这里起一个编号,将左侧ACG连接上下行接口划入到桥接口中,点击“提交”如下图所示: 解释:这里勾选ping测试原因是方便做测试(在ACG也可以ping的,在菜单“系统管理”----->“系统维护”,----->“系统诊断工具中”------>ping) 提交后的配置如下图所示: 最后在菜单“上网行为管理”------->“策略配置”——>“IPv4策略”,创建一条允许所有流量的策略,配置如下图所示: S5500A配置 [S5500A]int vlan 1 [S5500A-Vlan-interface1]ip add 192.168.1.1 24 [S5500A-Vlan-interface1] [S5500A-Vlan-interface1]quit S5500B配置 [S5500B]int vlan 1 [S5500B-Vlan-interface1]ip add 192.168.1.2 24 Ping测试:

mininet命令

╄→尐↘猪︶ㄣ 提交于 2019-12-28 13:41:14
官方文档: http://mininet.org/walkthrough/ 翻译的官方文档: https://segmentfault.com/a/1190000000669218 ovs-ofctl相关指令: http://blog.csdn.net/rocson001/article/details/73163041 sudo mn --topo-single,3 --mac --switch-ovsk --controller-remote, ip = 192.168.56.1 运行mininet并创建一个简单的topo(1个switch,3个host);创建的host拥有的mac地址相当于独立的IP,OpenFlow switch拥有3个端口;创建的switch连接到remote控制器上。 mininet> 1) nodes   查看mininet中节点的状态 2) help    获取帮助列表 3) h1 ifconfig   查看host1的IP等信息 4) xterm h1   打开host1的终端 5) exit   退出mininet登录 6) iperf h1 h2   测试h1和h2之间的带宽,用TCP 7) net   显示link状态 8) h1 ping -c 4 h2   检查两个主机间的连通状态   解释:该命令只会ping 4次

kali信息主动收集之三层发现

安稳与你 提交于 2019-12-28 11:38:42
三层发现 优点可路由 速度比较快 缺点 速度比二层慢 经常被边界防火墙过滤 是IP、icmp协议(网络控制管理,路径发现网络发现诊断的协议) ping命令 ping IP -c 指定包数 用这个命令发到指定的包数之后就会结束发包 当我们如果探测一个目标机器可以ping他 他会返回ICMP的数据包还有一个办法就是路由追踪的方式可以作到探测目标机器在线或者离线 还可以发现从我的机器到目标机器经过了多少跳的路由。 用traceroute 域名 可以实现路由追踪 边界防火墙过滤的反应就是会变成三个星号 打开wireshark抓包 当Time-to-live 值超过最大数的时候他就会返回数据包 每经过一跳Time-to-live值就会减一 基于这个方式把路径上的所有方式都发现出来 Time-to-live变0了他就会给我回包了 ping -R 域名 使用这个命令也可以实现路由的追踪 记录从我的电脑到目标IP路径上的每一跳的IP地址但是和traceroute 显示的信息是不一样的如果没有受到限制traceroute是发现离我近的内网口IP地址,ping-R就是发现远的外网口IP地址。 ping命令加管道可以显示IP地址 ping命令不支持网段扫描所以要写shell脚本对IP地址段进行扫描 ping IP地址 -c 1 | grep -“bytes from” | cut -d " " - f