2

Look this scenario.

Host 1: Ip:192.168.0.1 mask:255.255.255.0 gateway: not defined

Host 2: Ip:192.168.1.1 mask:255.255.255.0 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 '17 at 14:30
1

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."

1

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 192.168.1.0/24 dev eth0
(host 2) ip route add 192.168.0.0/24 dev eth0

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

0

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.

-1

They are on different networks (192.168.0.0/24 and 192.168.1.0/24), 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, 192.168.0.1 with a mask of 255.255.255.0 can communicate with anything else with IPs between 192.168.0.2 and 192.168.0.254. If you were to subnet to smaller network*, an IP at 192.168.0.1 with a mask of 255.255.255.248 would only be able to communicate with 192.168.0.2 through .6 and would need a router to communicate with, say, 192.168.0.10.

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

  • 1
    Classless is classless. Any network can have any netmask. 192.168.48.0/21 is perfectly valid. – Ricky Beam Dec 20 '14 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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