0

How to setup gateway and dns on android emulator correctly if my eth1 on emulator is connected to tap on host via:

emulator -dns-server 8.8.8.8 -selinux permissive -qemu -device virtio-net-pci,netdev=hn0 -netdev tap,id=hn0,ifname=tap0,script=no,downscript=no

and tap is connected to docker bridge on host :

bridge name bridge id       STP enabled interfaces
br-bf01bc4d9244     8000.0242c51c8c31   no      tap0
                            veth7b9d706

ip is brought up via link here

for now i have :

generic_car_x86_64:/ # getprop net.dns1                                                                                                                                                                      
8.8.8.8
generic_car_x86_64:/ # getprop net.dns2                                                                                                                                                                      
1.1.1.1
generic_car_x86_64:/ # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=114 time=24.2 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=114 time=62.3 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 24.216/43.299/62.382/19.083 ms
generic_car_x86_64:/ # ping 1.1.1.1                                                                                                                                                                          
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=58 time=11.0 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=58 time=10.2 ms
^C
--- 1.1.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 10.234/10.627/11.020/0.393 ms
generic_car_x86_64:/ # ping google.com
ping: unknown host google.com
2|generic_car_x86_64:/ #

how this is working????

0

You must log in to answer this question.

Browse other questions tagged .