Hi,
I'm trying to run my USB Ethernet dongle with my S4 LTE+ Lollipop D6, but aplications in the phone and other computers on the network didn't see that connection.
My tryings:
[email protected]:/ # netcfg eth0 up
[email protected]:/ # netcfg eth0 dhcp
[email protected]:/ # netcfg|grep eth0
eth0 UP 10.0.0.12/24 0x00001043 f0:25:b7:20:af:75
[email protected]:/ # ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=1.96 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=2.05 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=1.87 ms
[email protected]:/ # ping www.google.com
ping: unknown host www.google.com
2|[email protected]:/ # nslookup www.google.com
Server: 8.8.4.4
Address 1: 8.8.4.4 google-public-dns-b.google.com
Name: www.google.com
Address 1: 2a00:1450:4013:c01::93 ea-in-x93.1e100.net
Address 2: 74.125.136.104 ea-in-f104.1e100.net
Address 3: 74.125.136.103 ea-in-f103.1e100.net
Address 4: 74.125.136.99 ea-in-f99.1e100.net
Address 5: 74.125.136.105 ea-in-f105.1e100.net
Address 6: 74.125.136.147 ea-in-f147.
I've found this but it doesn't work also:
ndc network create 100
ndc network interface add 100 eth0
ndc network route add 100 eth0 <GATEWAY>/24
ndc network route add 100 eth0 0.0.0.0/0 <DNS1> <DNS2>
ndc resolver setnetdns 100 localdomain <DNS1> <DNS2>
ndc network default set 100
Any suggestions?
Thx
No body knows?
Hi
Have you tried this:
For Lollipop:
ndc resolver setnetdns eth0 "" 8.8.8.8 8.8.4.4For Kitkat:
ndc resolver setifdns eth0 "" 8.8.8.8 8.8.4.4
ndc resolver setdefaultif eth0Works for me on 5.1.1 (was able to ping 8.8.8.8 and 8.8.4.4 but not google.com. after typing this in the terminal, the ping worked !)
Related
I have android 4.2.2 ,Nexus 4 I would like to setup adhoc network . Firstly I rooted the device, secondly I tried to create adhoc network in android phone : I create ad hoc network in an android smartphone like below:
[email protected]:/ # ip link set dev wlan0 down
[email protected]:/ # iwconfig wlan0 mode ad-hoc
[email protected]:/ # iwconfig wlan0 channel 6
[email protected]:/ # iwconfig wlan0 essid 'Test1'
[email protected]:/ # ip link set dev wlan0 up
[email protected]:/ # ifconfig wlan0 192.168.65.129
when I typed iwconfig wlan0: the result is:
Qcom:802.11n ESSID:"Test1"
Mode:Ad-Hoc Frequency:2.437 GHz Cell: 02:82:5F:C1:4B:C1
Bit Rate=0 kb/s Tx-Power=0 dBm
RTS thr=2347 B Fragment thr=8000 B
Encryption keyff
Secondly, in my laptop ,I could see "Test1",so I did connect to "Test1" and I configure static ip address 192.168.65.128. in this case ,the smartphone create the ad hoc network and my laptop join it,then I can ping from my laptop to mobile and vice-versa.
However,in other case when : my laptop create ad hoc network
and later in an android mobile ,I tried to join it :
[email protected]:/ # iwconfig wlan0 mode ad-hoc
[email protected]:/ # iwconfig wlan0 channel 6
[email protected]:/ # iwconfig wlan0 essid 'Test1'
But,when I type iwconfig wlan0 ,essid still off/any
Qcom:802.11n ESSIDff/any
Mode:Ad-Hoc Frequency:2.437 GHz Cell: Not-Associated
Bit Rate:0 kb/s Tx-Power=0 dBm
RTS thr=2347 B Fragment thr=8000 B
Encryption keyff
it seems that android mobile can create ad hoc network but can not join existing one.so the same result I found when I try to setup adhoc network between two android mobiles. can anybody tell me what it's wrong here,and if there is any possible solution.
I tried many methods to setup ad hoc network in android ,and only this method that it seems work,but it still something wrong that prevent android phone to join existing ad hoc network.
fadwa.ww said:
[email protected]:/ # iwconfig wlan0 mode ad-hoc
[email protected]:/ # iwconfig wlan0 channel 6
[email protected]:/ # iwconfig wlan0 essid 'Test1'
Click to expand...
Click to collapse
Did you forgot to execute "ip link set dev wlan0 up"?
Hi,
I have a problem on Android phone Samsung GT-I9500.
Samsumg GT-I9500 sends DNS requests to DNS server address obtained via DHCP. But it ignores setup changes in setprorp 1 and setprorp 2.
do it:
Code:
adb shell
# setprop net.dns1 <ip1>
# setprop net.dns2 <ip2>
How to change DNS server?
How to add DNS server?
Info:
Code:
[email protected]:/ # getprop |grep dns
getprop |grep dns
[dhcp.wlan0.dns1]: [192.168.1.1]
[dhcp.wlan0.dns2]: []
[dhcp.wlan0.dns3]: []
[dhcp.wlan0.dns4]: []
[net.change]: [net.dns1]
[net.dns.search]: []
[net.dns1]: [192.168.1.1]
[email protected]:/ # setprop net.dns1 8.8.8.8
setprop net.dns1 8.8.8.8
[email protected]:/ # setprop net.dns2 4.4.4.4
setprop net.dns2 4.4.4.4
[email protected]:/ # setprop dhcp.wlan0.dns1 8.8.8.8
setprop dhcp.wlan0.dns1 8.8.8.8
[email protected]:/ # getprop |grep dns
getprop |grep dns
[dhcp.wlan0.dns1]: [8.8.8.8]
[dhcp.wlan0.dns2]: []
[dhcp.wlan0.dns3]: []
[dhcp.wlan0.dns4]: []
[net.change]: [net.dns2]
[net.dns.search]: []
[net.dns1]: [8.8.8.8]
[net.dns2]: [4.4.4.4]
[email protected]ja3g:/ # ping google.com
[email protected]:/ # tcpdump -ns0 -i wlan0 'port 53'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:37:40.246226 IP 192.168.1.177.3551 > 192.168.1.1.53: 52272+ A? google.com. (28)
Baseband version
I9509XXUEMK8
Kernel version
3.4.5-2092849
[email protected] #1
Thu Nov 21 12:59:52 KST 2013
Build number
JSS15J.I9509XXUEMK8
--
Alexander
There is an option to set dbs in advanced settings of the wifi networks
Sent from my GT-I9500 using XDA Premium 4 mobile app
maxsam4 said:
There is an option to set dbs in advanced settings of the wifi networks
Click to expand...
Click to collapse
I have not found DNS.
In advanced options only:
- Proxy settings
- IP setings
KASRU said:
I have not found DNS.
In advanced options only:
- Proxy settings
- IP setings
Click to expand...
Click to collapse
Choose static ip settings and you will see the option to change dns.
I am attaching a screenshot for you
Feel free to hit the thanks button
Sent from my GT-I9500 using XDA Premium 4 mobile app
[Resolved]
Change your DNS servers in Android.
You can change the same thing on your rooted Android Device.
With root privileges and a terminal app or (adb shell):
[email protected]:/ # ndc resolver flushif -- flushes old DNS servers
[email protected]:/ # ndc resolver flushdefaultif -- flush resolver
[email protected]:/ # ndc resolver setifdns <iface> <domains> <dns1> <dns2> ... -- Add the new servers
[email protected]:/ # ndc resolver setdefaultif -- Set as the default device
Hi,
I have a problem on Android tablet Google Nexus10.
Google Nexus10 sends DNS requests to DNS server address obtained via DHCP. But it ignores setup changes in setprorp 1 and setprorp 2.
do it:
Code:
adb shell
# setprop net.dns1 <ip1>
# setprop net.dns2 <ip2>
How to change DNS server?
How to add DNS server?
Info:
Code:
# getprop |grep dns
getprop |grep dns
[dhcp.wlan0.dns1]: [192.168.1.1]
[dhcp.wlan0.dns2]: []
[dhcp.wlan0.dns3]: []
[dhcp.wlan0.dns4]: []
[net.change]: [net.dns1]
[net.dns.search]: []
[net.dns1]: [192.168.1.1]
# setprop net.dns1 8.8.8.8
setprop net.dns1 8.8.8.8
# setprop net.dns2 4.4.4.4
setprop net.dns2 4.4.4.4
# setprop dhcp.wlan0.dns1 8.8.8.8
setprop dhcp.wlan0.dns1 8.8.8.8
# getprop |grep dns
getprop |grep dns
[dhcp.wlan0.dns1]: [8.8.8.8]
[dhcp.wlan0.dns2]: []
[dhcp.wlan0.dns3]: []
[dhcp.wlan0.dns4]: []
[net.change]: [net.dns2]
[net.dns.search]: []
[net.dns1]: [8.8.8.8]
[net.dns2]: [4.4.4.4]
# ping google.com
...
# tcpdump -ns0 -i wlan0 'port 53'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:37:40.246226 IP 192.168.1.177.3551 > 192.168.1.1.53: 52272+ A? google.com. (28)
...
--
Thanks
Alexander
[Resolved]
Change your DNS servers in Android.
You can change the same thing on your rooted Android Device.
With root privileges and a terminal app or (adb shell):
[email protected]:/ # ndc resolver flushif -- flushes old DNS servers
[email protected]:/ # ndc resolver flushdefaultif -- flush resolver
[email protected]:/ # ndc resolver setifdns <iface> <domains> <dns1> <dns2> ... -- Add the new servers
[email protected]:/ # ndc resolver setdefaultif -- Set as the default device
Override DNS for KitKat
KASRU said:
Change your DNS servers in Android.
You can change the same thing on your rooted Android Device.
With root privileges and a terminal app or (adb shell):
[email protected]:/ # ndc resolver flushif -- flushes old DNS servers
[email protected]:/ # ndc resolver flushdefaultif -- flush resolver
[email protected]:/ # ndc resolver setifdns <iface> <domains> <dns1> <dns2> ... -- Add the new servers
[email protected]:/ # ndc resolver setdefaultif -- Set as the default device
Click to expand...
Click to collapse
I implemented an app called "Override DNS for KitKat" which implements that technique. It's on the Play Store.
Hope it helps.
[email protected]:/ # ndc resolver flushif -- flushes old DNS servers
[email protected]:/ # ndc resolver flushdefaultif -- flush resolver
[email protected]:/ # ndc resolver setifdns <iface> <domains> <dns1> <dns2> ... -- Add the new servers
[email protected]:/ # ndc resolver setdefaultif -- Set as the default device
What should I replace instead of iface and domains?
Using the ifconfig command outputs are various interfaces and in particular:
wlan0
rmnet0
p2p0
to set the dns to google to use when mobile connection, okay this command?
[email protected]:/ # ndc resolver setifdns rmnet0 w w w .google.c o m 8.8.8.8 8.8.4.4 -- (I had to write the domains that otherwise would not let me reply, of course, I wrote all attached)
[email protected]:/ # ndc resolver setdefaultif --
When I give the command
[email protected]:/ # ndc resolver flushif --
the system responds with:
500 0 wrong number of arguments to resolver setdefaultif
While when I give other commands responds with:
200 0 Resolver command succeded
I apologize for the bad english but i used a translator
I am using Android 10 on a custom device (Variscite imx8). The Android image has been generated by AOSP.
I need to forward the traffico from the eth0 to the ppp0 (Quectel LTE module) interface.
I've managed to enable the ppp0 interface by using the pppd script (i.e.: pppd call my-connection-info) and I can see that I receive the two DNS server addresses and my public IPv4 successfully.
Now the first weird thing: If I ping to 8.8.8.8 I receive "connect: Network is unreachable" meanwhile if I specify the ppp0 interface with ping -I ppp0 8.8.8.8 I can successfully ping the target. I've added the following routing table with priority 25000 so that I'm able to ping 8.8.8.8 without specifying the interface:
Code:
ip rule add prio 250000 from all lookup 25000
ip rule add table 25000 default via <my-public-ip> dev ppp0
Now I want to forward the eth0 traffic to the ppp0, to do so I've tried the following commands:
Code:
$ echo 1 > /proc/sys/net/ipv4/ip_forward
$ iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
But the PC on the other end of the eth0 interfce still prompts "From 192.168.10.1 icmp_seq=xxx Destination Net Unreachable" where 192.168.10.1 address is the Android device (which acts like a gateway).
This is the content of netstat -rn command:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.64.64.64 0.0.0.0 UG 0 0 0 ppp0
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
This is the output of netstat -rn:
Code:
default via 10.64.64.64 dev ppp0
10.64.64.64 dev ppp0 proto kernel scope link src <my-public-ip>
192.168.10.0/24 dev eth0 proto kernel scope link src 192.168.10.1
This is the output of iptables -L (which I've flushed with iptables -F, iptables -X and iptables -t nat -F):
Code:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Which is the issue here? Thank you.