cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13000
Views
0
Helpful
10
Replies

Why am I able to ping a device on a different subnet without a default gw or router?

shadowplay101
Level 1
Level 1

Setup:

PC1 = 7.6.6.48 /8

LaserJet Printer = 7.7.7.51 /24

PC2 = 7.7.7.50 /24

I have all devices networked together using a hub

Question: Why am able to successfully ping from PC1 to the LaserJet printer, but NOT from PC1 to PC2????

Thanks

10 Replies 10

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

I would really need to think this through as to what ought to happen, assuming it doesn't fall through the cracks of the RFCs, but would suspect the networks stacks on PC2 and the LaserJet deal with the overlapping subnets differently.

Note that your PC is using a mask which differs from the actual subnet mask i.e /8 on the client and presumably /24 on the switch/router. This is when a feature called "proxy-arp" comes into action. The link below explains how it works:

http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080094adb.shtml

When you turn this feature off (no ip proxy-arp) on the appropriate interface, you will see it doesn't work any longer and masks on client and router need to match in order to do routing.

regards,

Leo

Thanks for the reply, but I am using hub.

cadet alain
VIP Alumni
VIP Alumni

Hi,

Put another PC with a sniffer like Wireshark to your hub and look at the capture file.

PC2  calculates that 7.6.6.48 is in a different subnet and so must arp for default-gateway then reply via this default

gateway but as there are no default gw the arp reply never happens.

So on PC2 no entry in the arp cache so ping fails.

Maybe the printer calculates you are in the same subnet. take a look at its arp requests.

Regards.

Alain.

Don't forget to rate helpful posts.

Gerald Vogt
Level 3
Level 3

What OS do you use?

Is there a firewall on either PC?

I think Windows assumes an IP address directly connected on the LAN if it has no routing table entry for the destination. Thus, it will send out an ARP request for the IP address and will accept whatever it gets...

ajasti
Level 1
Level 1

From PC1 perspective, both printer and PC2 are in its own subnet so PC1 will ARP for their mac addresses. As Cadet mentioned, PC2 will not reply as there is no default gateway. So, for ping test to be successful, printer should be replying back to ARP request in some way. A wire shark capture on PC1 or PC2 (apply ARP filter) should show what is going on. If possible turn on wire shark on both PC's and see.

Regards,

AJ

Yes wireshark show the ARP request from PC1 to the printer and the reply from the Printer to PC1.

But, why is this? The printer is on a different subnet! and remember that I am using a HUB.

I expected the Printer not reply at all.

Hi,

a hub is a multiport repeater working at layer 1, it replicates the signal on the wire on every port so all the packets.

As you ping from PC1 for him the 2 destinations are on the same subnet and so he sends an arp request for the ip address of each host and all replies are replicated also.So the hub is not the problem here.

Can you post the the wireshark capture and also when pinging from PC2 to PC1 and printer.

Regards.

Alain.

Don't forget to rate helpful posts.

The printer doesn't seem to check for the subnetting if it has not default gateway. The printer receives a packet or ARP request from PC1. It remembers the MAC address of the sender in its ARP cache. Then it sends the reply and uses the ARP cache again, thus delivers it directly.

Actually, until the printer wants to initiate traffic (e.g. send a notification e-mail to an e-mail server outside of its own LAN) the printer wouldn't ever need a routing table or bother with subnetting or a default gateway. The printer accepts incoming packets from any source address and delivers responses to the MAC address of the sender. Even if incoming packets are routed through a router this would work just fine.

Sakun Sharma
Level 1
Level 1

Hub is a broadcast domain, every packet received by Hub is broadcast to every network device attached to Hub.

So when PC1 ping to printer, at first it need is MAC address of printer which is obtained by ARP over IP address, but in your case ARP packet is reached to printer but it should not be replied.

Can you please post Wireshark output also the ping output?

Review Cisco Networking for a $25 gift card