Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does pinging work on your machine if it's not on the network?

Can these two machine be on the same network?

machine A ( 
machine B (
share|improve this question

migrated from Sep 18 '09 at 15:30

This question came from our site for professional and enthusiast programmers.

Yes, is called loopback network and is always available. This address points to the machine itself.

EDIT: To answer the second part of the question: Yes, machines A and B can be on the same network (but NOT the same as, while loopback is virtual) if the netmask is set properly. Use IP calculator to get what you need.

share|improve this answer
IIRC, on some versions of Windows (I think 95), the loopback interface was only available if you had a NIC (or modem, presumably) installed. – rmeador Sep 18 '09 at 15:41
Yeah, but let's say we don't count ancient systems ;) If he has a network stack installed (required to set machine's IP), he has the loopback interface. – minder Sep 18 '09 at 15:46
1 is an HOST, not a network. So A and B can't stay on the same becouse it is an host IP, not becouse it is not a real IP. If a and B are given and they could see each others. – drAlberT Sep 18 '09 at 16:05
@AlberT: I'm confused about what you're saying. According to RFC 3330, any address in 127.x.x.x is the loopback interface. – rmeador Sep 18 '09 at 16:54
@meador, you are right this class is not routable. But not every net stack accomplish the RFC, so is possible to have packets directed to to be routed to a physical interface. My poit was to undeline that is an host, not a net... two hosts can't comunicate having the same IP, even if the IP is not RFC3330 or RFC1918. This was my point – drAlberT Sep 18 '09 at 17:06
  • yes of course, is always available. It is the "localhost", pointing to the machine itself without going to a real net. It is the address of the loopback device and it is present even if no net card is installed (on every modern OS at least).

  • 192.168.x.x is a set of 256 C classes for internal use (see RFC1918) so you can have 65k hosts (as if it would had been a B class). So your machines can stay on the same net and see each others, pay attention to have the right netmask!

    If you have a netmask they are on the same net, if you have they don't

share|improve this answer
192.168.x.x is not a class B network, it's a class C... – Scott Lundberg Sep 18 '09 at 16:25
A C class is a.b.c.X, a B class is a.b.X.X – drAlberT Sep 18 '09 at 16:58
I thought that there is now no such thing as network classes. The old style 'B class' networks are being distributed as much smaller subset these days. Network classes are a thing of the past. – mdpc Sep 18 '09 at 17:40
That only defines the reserved range for that block. "Classes" are a way to define which super block a particular subnet belongs to. This is entirely dependent on the netmask in use. is a Class A, is a Class B, and is a Class C. People commonly refer to blocks that they have been assigned in these classes as well even if they have broken them down further. – TrueDuality Sep 18 '09 at 19:35

Yes, pinging works if you're not plugged in. Those addresses can be on the same network, but it depends on some other things on whether or not they actually are. They might be on different subnets. What are the subnet masks on the machines?

share|improve this answer

You can ping if a computer is not connected to a network.

Machine A and B can both be on the same network, as their IPs are different. Assuming a 24-bit subnet mask, they are on different subnets though, so you will need routing between the subnets in order for them to communicate.

share|improve this answer
There is no reason to assume a mask of 24 bits. – bortzmeyer Sep 21 '09 at 20:11
The only way to answer the question as stated is to assume certain things about the setup. Seeing as /24 is the most common it is what I assumed. – MDMarra Sep 21 '09 at 20:34

Kernel firewall packet filtering could be used to prevent ICMP packets from hitting loopback. In which case a ping would appear to fail (although the interface would still be up).

You could theoretically take it down, but then you would disable sockets. You'd have a seriously stripped down box that would boot up without loopback. It would resemble... MS-DOS!

share|improve this answer

Yes, you can. In the PC world, is the "loopback" address. On each network card, there is actually a circuit which "loops back" to the network interface, which allows you to test sending/receiving traffic without traffic actually leaving the card. It also allows you to connect to local network services without placing any load onto whatever switch you are connected to. In switches and routing equipment you can actually define the loopback address as any ip address you like, but the functionality is the same.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.