Ping with hostname does not work but IP address does

The two devices are connected by Wifi P2P . Device 1 has its Device 2's IP address as its default gateway.
Command :
ip route add default 192.168.x.1 via p2p-0
Device 2 forwards and accepts all the incoming packets to the AP that it is connected to (It has both wlan and p2p interfaces)
// All this is device 1 connected to device 2 via p2p
Ping -ip address of google : WORKS
Ping hostname google : DOES NOT WORK
I checked if dns is set.
Command : getprop net.dns1
Output : 8.8.8.8
Command : getprop net.dns2
Output : 8.8.4.4
I tried setting dns using setprop dhcp.p2p-0.dns1 8.8.8.8 When i used getprop i got back this IP. However ping with hostname on this interface still does not work
Ping with hostname works when the device1 is connected through wlan
How do I resolve this?

Комментарии

Популярные сообщения из этого блога

Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository … doesn't support architecture 'i386'

FillChar and StringOfChar under Delphi 10.2 for Win64 Release Target

Python Selenium - How to configure a client certificate file while initializing PhantomJS driver instance