ping

What's the easiest to remember publicly pingable IP address? [closed]

你。 提交于 2019-12-22 01:27:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . For frequent network troubleshooting purposes, do you know a publicly pingable host with an easy to remember IP address (such as 1.2.3.4)? 回答1: C:\Documents and Settings\Administrator>ping -a 4.2.2.2 Pinging vnsc-bak.sys.gtei.net [4.2.2.2] with 32 bytes of data: Reply from 4.2.2.2: bytes=32 time=10ms TTL=246 Reply

NM常用网络命令

不问归期 提交于 2019-12-21 11:03:04
Ipconfig 命令 Ipconfig 命令可以被用来显示机器当前 TCP/IP 配置信息。 当使用 Ipconfig 时不带不论什么參数选项,那么它为每一个已经配置好的接口显示 IP 地址、子网掩码和默认网关值。 当使用 Ipconfig 时使用 all 选项时,即 Ipconfig/all 或 Ipconfig –all ,除了显示已配置的 TCP/IP 信息外,还显示内置于本地网卡中的物理地址( MAC 地址)以及主机名等信息。 使用 Ipconfig/renew 或 Ipconfig –renew ,又一次获取 IP 地址 使用 Ipconfig/release 或 Ipconfig –release ,释放已获取 IP 地址 Ping 命令 Ping 命令仅仅有在安装了 TCP/IP 协议后才干够使用。 Ping 命令的主要作用是通过发送数据包并接收应答信息来检測两台计算机之间的网络是否连通。 当网络出现故障时,能够用这个命令来预測故障和确定故障源。 假设运行 Ping 不成功。则能够预測故障出如今下面几个方面:网线是否连通、网络适配器配置是否正确、 IP 地址是否可用等。 (1) Ping 命令的格式: Ping [-t] [-n count] [-l size] IP (2) Ping 命令的主要參数: –t :使当前主机不断地向目的主机发送数据,直到按 Ctrl

extract average time from ping -c

别等时光非礼了梦想. 提交于 2019-12-21 07:14:11
问题 I want to extract from the command ping -c 4 www.stackoverflow.com | tail -1| awk '{print $4}' the average time. 107.921/108.929/110.394/0.905 ms Output should be: 108.929 回答1: One way is to just add a cut to what you have there. ping -c 4 www.stackoverflow.com | tail -1| awk '{print $4}' | cut -d '/' -f 2 回答2: ping -c 4 www.stackoverflow.com | tail -1| awk -F '/' '{print $5}' would work fine. "-F" option is used to specify the field separator. 回答3: This might work for you: ping -c 4 www

How to ping a server only once from within a batch file?

人盡茶涼 提交于 2019-12-21 04:02:30
问题 I want to learn how to write batch scripts and tried to create a script which automatically runs this command in the command line once: ping www.google.de -t and displays the ping, so it would look like this: Reply from XXX.XXX.X.XX: time=30ms Reply from XXX.XXX.X.XX: time=31ms Reply from XXX.XXX.X.XX: time=29ms My problem is, that this will result in this when I execute this command as script: My problem is that it will not execute the ping command at all, but just insert the command

ubuntu12.10桥接模式上网设置

六眼飞鱼酱① 提交于 2019-12-21 02:50:45
近期使用VM8安装了ubuntu12.10玩玩,途中也遇到了许多问题,安装完成后,系统默认是选择NAT连接方式的,可以直接通过火狐浏览器上网。(不需任何设置,系统自己配置好了)。但是在和PC和板子互ping的时候出现了问题,首先,PC的IP是固定的(公司固定的),因此使用NAT模式的ubuntu系统和PC互ping不能实现。很明显,ifconfig查看ubuntu的ip和PC 的ip是不同网段的。网上找了些资料,要想和PC、板子互ping要选择桥接模式(bridge),然后在ubuntu中修改配置文件,Ubuntu的网络配置文件是:/etc/network/interfaces 白色高亮的是NAT时默认的。 接着给网卡配置静态的IP地址: 其中auto eth0表示让网卡开机自动挂载。退出后保存。重启:sudo /etc/init.d/networking restart.不行就sudo reboot。 配置好后,ubuntu和PC和板子就可以互ping了。 之前遇到了一个很bug的问题,我在使用NAT模式连接时,我修改了:/etc/network/interfaces的配置文件,接着重启服务,系统直接挂掉了!这个NAT模式是网络地址转换模式,就是虚拟系统借助NAT网络地址转换的功能,通过宿主机所在的网络来访问公网,意思就是,使用NAT模式可以实现在虚拟系统里访问互联网

bash script use cut command at variable and store result at another variable

帅比萌擦擦* 提交于 2019-12-20 09:39:17
问题 I have a config.txt file with IP addresses as content like this 10.10.10.1:80 10.10.10.13:8080 10.10.10.11:443 10.10.10.12:80 I want to ping every ip address in that file #!/bin/bash file=config.txt for line in `cat $file` do ##this line is not correct, should strip :port and store to ip var ip=$line|cut -d\: -f1 ping $ip done I'm a beginner, sorry for such a question but I couldn't find it out myself. 回答1: The awk solution is what I would use, but if you want to understand your problems with

Why can I ping a server but not connect via SSH? [closed]

∥☆過路亽.° 提交于 2019-12-20 08:56:39
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . When I ping my server, it responds: user@localhost:~$ ping my.server PING my.server (111.111.111.11) 56(84) bytes of data. 64 bytes from my.server (111.111.111.11): icmp_req=1 ttl=42 time=38.4 ms 64 bytes from my.server (111.111.111.11): icmp_req=2 ttl=42 time=50.0 ms 64 bytes from my.server (111.111.111.11):

mac dns look up misbehaving

你离开我真会死。 提交于 2019-12-20 05:23:15
问题 Got a new mac and now I'm trying to install/update some stuff. THe first issue I get is that http requests made from inside scripts/programs (such as git or ruby gem) doesn't work. I'll put an example below of the workaround I used because it illustrates the issue better than any explanation. Any help is appreciated! Leonardos-MacBook-Air:~ leo$ git clone git://github.com/sstephenson/rbenv.git .rbenv Cloning into '.rbenv'... fatal: Unable to look up github.com (port 9418) (nodename nor

IcmpSendEcho2 fails with fails with WSA_QOS_ADMISSION_FAILURE and ERROR_NOACCESS

早过忘川 提交于 2019-12-19 22:03:50
问题 I have an application that pings a bunch of servers. It runs great for days, but suddenly will have many failures of one of two types: WSA_QOS_ADMISSION_FAILURE (11010) "A QoS error occurred due to lack of resources" or ERROR_NOACCESS (998) "Invalid access to memory location." The odd thing is the errors come in bunches. Ie all pings might fail for a few minutes with one of the above errors. Then it clears up. Later all pings will fail for a few minutes with the other error. They don't seem

Why I can't ping Azure VM from my local PC [closed]

♀尐吖头ヾ 提交于 2019-12-19 21:49:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I have a Windows VM on Azure and I don't understand why my ping times out . I found a probable reason: on Azure portal I see public IP "40.127.163.20", but inside VM when I do ipconfig I see different IP that is strange. Do you have any ideas? 回答1: ICMP protocol is not permitted through the Azure load balancer