Ping
From Wsms
Note: This page should be titled ping (all lowercase). It is Ping due to technical limitations of Mediawiki.
Ping is a network tool that can let you see if networking is working or if other hosts are available.
Contents |
Common Usage
Ping a host by name:
[ggeller@arthur ~]$ ping google.com PING google.com (72.14.207.99) 56(84) bytes of data. 64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=1 ttl=246 time=99.4 ms --- google.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 99.450/99.450/99.450/0.000 ms
Ping a host or router by address:
[ggeller@arthur ~]$ ping 192.168.2.1 PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data. 64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=0.654 ms 64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=0.605 ms --- 192.168.2.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.605/0.629/0.654/0.035 ms
Tips
Some sites don't allow you to ping beyond your local network or at all. Windows machines are set to not answer by default.
To turn on ping-answering in Windows: Start->Control Panel, Open "Network and Internet Connections", Open Windows Firewall, select the Advanced tab, Click the "Settings..." button in the ICMP section, make sure "Allow incomming echo request" is turned on.
You can usually find routers with a broadcast ping:
[root@arthur ~]# ping -b 192.168.2.255 WARNING: pinging broadcast address PING 192.168.2.255 (192.168.2.255) 56(84) bytes of data. 64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=0.771 ms 64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=0.656 ms 64 bytes from 192.168.2.1: icmp_seq=3 ttl=64 time=0.654 ms 64 bytes from 192.168.2.1: icmp_seq=4 ttl=64 time=0.650 ms --- 192.168.2.255 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3000ms rtt min/avg/max/mdev = 0.650/0.682/0.771/0.060 ms
questions
Is there a way to make linux machines answer broadcast pings?
