Ping one IP address but get a response from another?

mobyaki

Reputable
Jun 29, 2014
46
0
4,530
Lets say I have a printer on my LAN with an IP address of 192.168.1.50

when I run the Ping command i.e. "ping 192.168.1.50"

I get back

response from 192.168.1.23

Whey does this happen?
 
Solution
It all depends on if you have a split network setup.
Since you have not provided details on if you have a network setup with two routers for example this may not be the correct answer but I will explain.

On each router when you configure it you have the IP address pool for that router and any computer that connects to it via a wired connection or a wireless connection.

The maximum amount of individual computers if you wired them to the router and had enough Ethernet ports on it.
Or what we call a hub or a switch, patch panel.

Can be up to 253 client machines where each would receive its own IP address via the Dhcp function of the router

Eg 192.168.1.1 to 192.168.1.253.
The last or end number of the IP address relating to the...
It all depends on if you have a split network setup.
Since you have not provided details on if you have a network setup with two routers for example this may not be the correct answer but I will explain.

On each router when you configure it you have the IP address pool for that router and any computer that connects to it via a wired connection or a wireless connection.

The maximum amount of individual computers if you wired them to the router and had enough Ethernet ports on it.
Or what we call a hub or a switch, patch panel.

Can be up to 253 client machines where each would receive its own IP address via the Dhcp function of the router

Eg 192.168.1.1 to 192.168.1.253.
The last or end number of the IP address relating to the machine from 1 to 253.

So if you wanted to expand, but keep the same IP pool for a range of computer, or client over 253 you would add another router.

But on the second router what changes is what we call the sub net address for example of the second router as part of the whole network.

For example from 192.168.1.1 to 192.168.1.253 the sub net address would be 255.255.255.0


But anyone connecting to second router of the network via a wired connection or wireless connection would get.

Eg. 192.168.1.1 to 192.168.1.253 with a sub net address of 255.255.255.1

What you will be seeing is the IP address, that looks the same but the sub net address changes.

Where the printer is on the network could indeed be 192.168.1.50 but on a sub net of 255.255.255.0
Where as the machine you are on and connected to a router may be 192.168.1.4 but be on a sub net of 255.255.255.1

And why when you try to ping the command for IP 192.168.1.50
You get back a response and IP of 192.168.1.23

The 23 value is the amount of machines connected to a set router with a IP address of 192.168.1.23
With a different assigned sub net address.

Unless the routers are configured in such a way where translation from one part of the network to a sub net of it.
You will never reach the 192.168.1.50 IP you are sure the printer is running on that set IP because it redides on another part of the network under a different sub net range.

What should be done is a printer should be attached to the second router so it can work on the same sub net range
setup as a large network.

Each the IP address when you change from one sub net part of the network will differ depending on how, or who setup more than one router as part of the whole network.

Think of adding a new router like adding a block or a brick of another 253 client machines to expand the network.

If the router is configured in a set way you can have access to every printer connected to the network.
But if it is contained within a sub net then each can be set or isolated for only that part of the whole network withing the 255.255.255.0 or 255.255.255.1 sub net of a client machine attaching to the at part of the network.


EG. 192.168.1.1 sub net 255.255.255.0 Printer IP 192.168.1.30 laser printer.

192.168.1.1 sub net 255.255.255.1 Printer IP 192.168.1.50 HP desk jet 520 DX.




 
Solution
Shaun, thanks so much for such a in-depth response.

The networks I would be dealing with would only have 3-4 devices on them.

Secondly, would it have anything to do with the printer's own software or driver. For example, with some
Brother network printers, they seem to connect to a network but when you go to Printer Properties it would not display an actual IP address but just something like Brother XYZ Printer Port? This totally differs from other printers like HP where you can go to another computer on the network and just eyeball which IP address the printer is using.
 
Ignore everything Shaun o stated. It's all 100% incorrect. You need to provide more information. Post a screenshot of your ping results and a screenshot of your local IP configuration.
 
sorry I don't have a screenshot of it.

Surely, someone has seen this before?

Just to recap,

1) You ping a printer with it's IP address e.g. 192.168.1.200

2) The ping results come back as "Reply from 192.168.1. 40"

I am just wondering what is happening here?
 
There are a couple of things that can cause this but it generally something misconfigured. Either the printer itself really is sending this response or you have some other device on the network that is giving you that response even though you think it is the printer it might not be.

You are going to have to spend some time learning how ping and ARP really work to figure this out. You can load wireshark and actually capture all the data. What you need to look at is the mac addresses that the traffic is being send to and what mac address responds.

It could be some issue with a conflict of the ARP table in your PC.

 


You are talking about a subnet mask, not a subnet, they're different.
And also for a subnet mask:
255.x.x.x = /8
255.255.x.x = /16
255.255.255.x = /24

/8, /16 and /24 are what is called CIDR's (Classless Inter Domain Routing) where x can only be a value of 128 (126 hosts), 192 (62 hosts), 224 (30 hosts), 240 (14 hosts), 248 (6 hosts), and 252 (2 hosts), each of those hosts have 2 hosts taken out to allocate host space for network address and broadcast address. You can't have 255.255.255.1 because you start from the left octet and not at the right.

Example:
IIIIIIII.IIIIIIII.IIIIIIII.00000000 = /24 (255.255.255.0)
You start turning the "on" bits from the left, meaning:
IIIIIIII.IIIIIIII.IIIIIIII.I0000000 = /25 (255.255.255.128)
Next is:
IIIIIIII.IIIIIIII.IIIIIIII.II000000 = /26 (255.255.255.192)

And so on, you start at the left side of the octets, not at the right, you can't do it this way:
IIIIIIII.IIIIIIII.IIIIIIII.0000000I = /25 (255.255.255.1)

Subnet Mask is different from Subnets. Subnetting doesn't work that way.