ping is an application, considering this it needs an existing connection between the sender and receiver, in other words a routing path; since you specify a gateway in your setup it means that everything that is send or received by 192.168.1.2 has to pass through 192.168.1.1, and if 192.168.1.1 it is not present in your topology you simply do not will have any connection at all from 192.168.1.2 .