Tag Info

Hot answers tagged

15

Sending a single packet and waiting for a response is going to be one of the fastest possible ways, and ping is a fine way to do that. In fact, depending on your use case, I'd argue that it's too fast, since it doesn't really tell you if the system is actually doing anything useful, just that the kernel's network subsystem is alive and configured. But ...


10

What the RFC says is actually immaterial here. The RFC specifies what goes on at the DNS level, but that's moot if ping doesn't make a DNS query in the first place. When ping receives an all-numeric argument, it interprets it as an IP address. IPv4 addresses are technically 32-bit numbers. They are almost always written in dot-decimal notation, so-called ...


10

The hostname command outputs the hostname of the system from the systems local hostname configuration (could be /etc/hostname or /proc/sys/kernel/hostname or other depending on OS). The command ping -c 1 <hostname> is going to perform a lookup through the libc resolver (which may or may not be DNS. e.g., /etc/hosts is not DNS) of the <hostname> ...


8

ping needs root so it can open a socket in raw mode. That's literally the first thing it does when it starts up: icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); socket_errno = errno; That's the only thing it needs root for, so like many programs, it immediately drops its privilege level back to your normal user account: uid = getuid(); if ...


6

It means the reply packet is a duplicate. Each ICMP packet sent out to pint a host has a sequence number that is returned with the response. Sometimes you'll actually get more than one reply. This is usually caused by faulty networks. Wireless networks often rely on re-sending packets if they don't get proper verification, and if the first one actually ...


6

DUP means duplicate packet. From man ping: Duplicate and Damaged Packets ping will report duplicate and damaged packets. Duplicate packets should never occur, and seem to be caused by inappropriate link-level retransmissions. Duplicates may occur in many situations and are rarely (if ever) a good sign, although the presence of low ...


5

while ! ping -W 1 -c 4 www.google.com >& /dev/null || ! ping -W 1 -c 4 www.yahoo.com >& /dev/null; do sleep 600 done Though I'd just test connectivity to an IP address; 8.8.8.8 is Google's public DNS server (it has very high availability). Testing whether DNS works is unreliable anyway because the entry may be in the cache. while ! ...


4

Well, not exactly... What Wikipedia, and in turn the RFCs say is that since the original RFC 952, which didn't allow leading numerics, you can now have them. ( Per RFC 1123 ) You still can't have all numeric though, which is your problem. Your '6952' isn't a valid hostname, while '6952x' should be fine. But, RFCs aside, I've had problems within the last ...


4

Generally, in Linux, and Unix, traceroute and ping would both use a call to gethostbyname() to lookup the name of a system. gethostbyname() in turn uses the system configuration files to determine the order in which to query the naming databases, ie: /etc/hosts, and DNS. In Linux, the default action is (or maybe used to be) to query DNS first, and then ...


4

I believe it depends on how fast you ping the server: If it's one ping per second (or even slightly faster), they will most likely not care. If it's much faster, they may consider it a DDOS attack by ping flood. It's especially the case if you don't wait for the previous answer before sending the next ping. It reminds me of the kids who brought Yahoo!, ...


4

So here are in one answer a summary of my comments. You have 3 solutions depending on your environment: A. Your Windows host is connected to a network 1- Use "Bridge networking" And select the Windows network interface that is configured under Windows to have network access. Make sure you have no firewall on Ubuntu: sudo iptables -L should give you no ...


4

According to the Solaris 11 network interfaces manual in chapter 8 “Configuring an IP Interface”: ipadm create-addr -T static -a 10.0.11.10/24 eth0/staticip eth0 is the name of the Ethernet interface (listed by ipadm show-if). staticip is a name that you can choose.


4

What about trying a simple OR from your shell? ssh username@franklin.local || ssh -p 22 remote.address.of.franklin I am not really familiar with ZSH, but I guess the evaluation logic would still be lazy, meaning that the second part is only evaluated if the first part fails. Of course the first command may stall for some time trying to figure out if ...


3

I dont' think that it's related to ping problem, but if you want to put selinux temporary off, you have this option: setenforce 0 it put selinux from enforcing to permissive mode, to check its condition run sestatus to diable selinux permanently you can use system-config-securitylevel or edit with nano or vi /etc/selinux/config and change the parameter ...


3

How would ping know that the responses it got really are all of them? To find out which hosts on a subnet are up, something like nmap is well suited. See the -sn argument for Host Discovery: -sn (No port scan) This option tells Nmap not to do a port scan after host discovery, and only print out the available hosts that responded to the scan. This ...


3

Is there a chance that your IP is duplicated on the network? Given that you have done all of this testing the next step would be to use an intermediate hop in between and go to the website from your computer. Use a free proxy online. There are several available. I have seen this issue before and it turned out that the IP was being blacklisted blackholed by ...


3

As Caleb notes, cURL is usually the weapon of choice for command-line HTTP. The tricky part - as Caleb again notes - is putting the request together, especially for XML-RPC, where the server is likely looking for a well-formed input. But if you poke around at the source for Multipin, you see that it's not just a simple HTTP request (thought it does fall ...


3

As localhost and 127.0.0.1 are giving different response times, this is a name resolution problem. Check /etc/resolv.conf to make sure that it contains the correct addresses for your nameservers. If you're not sure of the right addresses, you could try nameserver 8.8.8.8 nameserver 8.8.4.4 It's slightly odd that localhost doesn't resolve from an entry ...


2

Some flaws with some of the above approaches, and why a comprehensive "is the internet working" can't really be done in one line: You should always check if your link is active before even trying to ping anything. If there is no cable plugged into your Ethernet port or your stupid cat chewed the wire, nothing is going to work. Should test localhost first. ...


2

You can just use a while loop from the shell. while true; do if ping -W 1 -c 4 www.google.com >& /dev/null && ping -W 1 -c 4 www.yahoo.com >& /dev/null; then break fi sleep 600 done The /bin/true and test 0 commands will always return 0 (true), but true may not always be a builtin.


2

Probably, when pluging in the ethernet cable, your default route gateway changes by dhcp. You send packets from wlan0 but your system doesn't know who is the gateway to forward them to. This way you can only ping systems within 192.168.1 network but not further. If you want to get a reply from the google server, you'll have to either change the default ...


2

What you could do it ping the broadcast address which should cause all the computers to ping back. Then you could cross check this list against what you have in SQLite to ensure all the computers are up. Other then that a ping is probably the fastest way to ensure a computer is awake on a network. As mentioned by the other answer this doesn't provide any ...


2

Looks like you have reverse lookup set up properly, but not forward. Your system can look up the IP address 192.168.235.41 and recognize that it's selenium-rc, but when it tries to look up selenium-rc it fails. I recommend you check /etc/hosts and /etc/resolv.conf; the behavior of the getaddrinfo system call is dictated by the latter and references the ...


2

There are several ping utilities available on Linux, even on Ubuntu. The default one (the only one in Ubuntu main) is from iputils (iputils-ping). The possible return statuses (for either ping or the companion IPv6 utility ping6), as of iputils 20100418, are: 0 if you pass the -V option. 255 if ping can't drop privileges (this shouldn't happen). 1 if an ...


2

The only reference to "Traceping" I could find was this one, which refers to an android app. Basically, it performs a traceroute to discover all the hops between your location and the target IP, then continuously pings each host to provide you with more information about the quality of the connection. If you didn't understand a word of what I just said, you ...


2

I'm pretty sure this is problem with network configuration on you VirtualBox. Open up VM settings: Make sure you select Bridged Adapter ( I expect you have NAT configured which does not allows to route connections from outside to your VM) Select available network card (I used MS Loopback adapter, on your PC it will be different) More info here and ...


2

I think your ping is not working because of SELinux. Try the following command as root: $ system-config-securitylevel-tui Change the Security Level to disable and change the SELinux to disable also. Now try to ping, I think now it shud work if there is no network problem.


2

From man ping: -w deadline Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits either for deadline expire or until count probes are answered or for some error notification from network. -W timeout ...


2

You first need to understand Time to Live ( TTL ) in DNS DNS TTL TTL is an acronym for Time To Live and refers to the capability of the DNS servers to cache DNS records. It represents the amount of time that a DNS record for a certain host remains in the cache memory of a DNS server after the latter has located the host's matching IP address. If your DNS ...


2

You could achieve this by adding the following iptables rule that effectively drops the incoming ECHO requests on any ppp device: iptables -A INPUT -p icmp --icmp-type 8 -i ppp+ -j DROP This rule should be added before any rule that allows the ICMP traffic. I would not recommend you to disable all ICMP traffic as it may break the connectivity.



Only top voted, non community-wiki answers of a minimum length are eligible