Look this scenario.

Host 1: Ip: mask: gateway: not defined

Host 2: Ip: mask: gateway: not defined

Is it possible to ping from host 1 to host 2? assume that both are connected on the same hub.

I tried in the packet tracer and didn't work, this is normal or a configuration fault? if it was a switch? to route between networks must use a router?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide your own answer and accept it.
    – Ron Maupin
    Aug 7, 2017 at 14:30

4 Answers 4


When it host is going to send IP traffic, it first checks to see if the destination IP address is on the local subnet. It uses both it's IP address and the subnet mask to make this determination.

If the destination IP is not on the local subnet (your case), the host then checks to see if it has a route to the destination IP in it's routing table. Generally most hosts only have one route, the default route or gateway that is provides somewhere to forward traffic for any other network (barring any more specific route to the destination IP).

In your case, with no configured gateway, the host will determine it doesn't know how to get to the destination IP. This means it has nowhere to send the traffic resulting in the traffic being dropped while generally returning an error like "No Route to Host."


Is it possible to ping from host 1 to host 2? assume that both are connected on the same hub.

Yes. But you have to add a route to the other network on each host. As it stands, there are two networks on the wire, but each host only knows about the network in which they reside.

On Linux, assuming eth0 is your interface:
(host 1) ip route add dev eth0
(host 2) ip route add dev eth0

(The same can be done in widows, but you have to know the interface numbers.)


Is it possible to ping from host 1 to host 2? assume that both are connected on the same hub.

while using of Cisco router you can ping both host 1 and 2 on the same hub.But without router you can't communicate. Because for two different ips we want to take them in one network or one gateway ip. For this we want to use routers. If we use two different network in single switch or hub ,their ip will conflicting again and again.By this the communication could not possible.


They are on different networks ( and, so in order to communicate, you either have to change one of the IPs to be on the same network as the other, or place a router in between them.

In a nutshell, the subnet mask lets clients know which addresses are local and which are remote. So, with a mask of can communicate with anything else with IPs between and If you were to subnet to smaller network*, an IP at with a mask of would only be able to communicate with through .6 and would need a router to communicate with, say,

*192.168.x.y addresses cannot be supernetted up to a larger subnet mask, such as, but that's another discussion.

  • 1
    Classless is classless. Any network can have any netmask. is perfectly valid.
    – Ricky
    Dec 20, 2014 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.