cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
16183
Views
0
Helpful
9
Replies

ping without gateway

macsoft
Level 1
Level 1

2pcs on each side connected with switch and both switch to a router

Left 2 pcs:

A has ip 192.168.1.2 sub 255.255.255.0 

B has ip 192.168.1.13 sub 255.255.255.0

both Gateway is 192.168.1.1

Right pcs

C has ip 192.168.2.2 sub 255.255.255.0

D has ip 192.168.2.3 sub 255.255.255.0

both Gateway is 192.168.2.1

Router is configured to FA/0 192.168.1.1 and FA/1 192.168.2.1

Each side can ping succesfuly, ex. A ping C or D and oposite

My question is if i remove gateway from A host ,is it possible to ping host C, my test prove that can not ping and also host A(without gateway) can not ping the router FA/1 ip.

Is it possible to be done to ping without gateway on host from one side to another and how? without changing the configuration set.

 

regards

1 Accepted Solution

Accepted Solutions

Reza Sharifi
Hall of Fame
Hall of Fame

In order to be able to ping between subnets, you need to have a gateway on the router for each subnet, if not you can only ping the local PC and not the remote ones.

HTH

View solution in original post

9 Replies 9

Reza Sharifi
Hall of Fame
Hall of Fame

In order to be able to ping between subnets, you need to have a gateway on the router for each subnet, if not you can only ping the local PC and not the remote ones.

HTH

answer accepted and was already tested using Cisco Packet Trace to emulate the above. But someone mention me that can be done through other way using vlan or conect also the 2 switches together and bypass router. Is that possible?

Weather you use a router or a layer-3 switch, as long as you are trying to reach between subnets/vlans the end host need to have a default gateway (which is the router or the layer-3 switch svi interface IP), if not you can only reach hosts in the local subnet/vlan.

HTH

I think what you meant to say was, you need to have a gateway pointing to the router in each subnet, not on the router. A gateway on the router is unnecessary in this case because both of the networks involved are directly connected.

Let me explain from begining

 

2 pcs

A and B have ports 192.168.1.2 and 192.168.1.10 mask both 255.255.255.0 and their gateway 192.168.1.1

conected to a switch

 

And 2 ocs C and D have ports 192.168.2.2 and 192.168.2.3, mask 255.255.255.0 and gateway 192.168.2.1

conected to a switch

on router are set the 2 gateways

If i remove the gateway from A and leave other as are the ping can not be done from A to C or D but on B witch is local and that is the corect as you mention also. the attached picture saw how is set.

What must be removed (device) or put other to ping from A to C or D if A has no gateway.if switch is changed with a hub?

 

 

I think there is a language barrier here, and perhaps a misunderstanding of some basic networking principals.
Devices A and B (192.168.1.0/24) and devices C and D (192.168.2.0/24) will NEVER be able to communicate with each other unless a ROUTER is connecting these 2 subnets together. This is because a router connects broadcast domains together.

If you changed that device to a switch, you would have each device configured for different broadcast domains (subnets), while physically connected to together. The devices would still not be able to communicate because each device would compare it's own IP and subnet mask to that of the destination and instantly know that they are not in the same subnet. The error you would get would likely indicate that a GATEWAY is needed.

 

PC2> ip 192.168.2.100/24
Checking for duplicate address...
PC2 : 192.168.2.100 255.255.255.0

PC2> ping 192.168.1.100
No gateway found

What must be removed (device) or put other to ping from A to C or D if A has no gateway.if switch is changed with a hub?

If you remove the switch and replace it with a hub, the hub does not understand vlans, so all devices will be in the same subnet/vlan and of course you can ping them all but again you woud using one of the subnets and not both.

HTH

Hi Please provide solution how to resolved 

Review Cisco Networking products for a $25 gift card