3G pppd and set up dns

来源:互联网 发布:安卓app源码如何修改 编辑:程序博客网 时间:2024/06/05 20:03


being on lollipop android5, when pppd dial successfully , we got ip and dns addr, then run the following command to fix dns issus


ndc resolver flushnet ppp0

ndc resolver setnetdns ppp0  8.8.8.8 8.8.4.4


as a reference , see this :

Google Groups


 

netcfg eth0 down

ndc network destroy 100

ndc interface clearaddrs eth0



ifconfig eth0 10.99.4.11 netmask 255.255.252.0

route add default gw 10.99.5.1 dev eth0

ndc resolver setnetdns eth0  8.8.8.8 8.8.4.4

ping www.google.com (### this works well from command line but with this, browser doesn't work: ERR_NOT_REACHABLE)



Then I followed your steps as below:



ndc network create 100

ndc network interface add 100 eth0

ndc network route add 100 eth0 10.99.4.0/22 (This is taken from the output of ip route show, so I presume my gateway is 10.99.4.0)

ndc resolver setnetdns 100 localdomain 192.168.6.55 192.168.6.56 (My DNS addresses are 192,168.6.55 and 192.168.6.56)

ndc network default set 100 (Untill this command, the status is: ping works fine from command line for google, but after I enter this command, command line based ping stops and I am unable to get browser working as was the previous case).


being on lollipop android5, when pppd dial successfully , we got ip and dns addr, then run the following command to fix dns issus


ndc resolver flushnet ppp0

ndc resolver setnetdns ppp0  8.8.8.8 8.8.4.4


as a reference , see this :

Google Groups


 

netcfg eth0 down

ndc network destroy 100

ndc interface clearaddrs eth0



ifconfig eth0 10.99.4.11 netmask 255.255.252.0

route add default gw 10.99.5.1 dev eth0

ndc resolver setnetdns eth0  8.8.8.8 8.8.4.4

ping www.google.com (### this works well from command line but with this, browser doesn't work: ERR_NOT_REACHABLE)



Then I followed your steps as below:



ndc network create 100

ndc network interface add 100 eth0

ndc network route add 100 eth0 10.99.4.0/22 (This is taken from the output of ip route show, so I presume my gateway is 10.99.4.0)

ndc resolver setnetdns 100 localdomain 192.168.6.55 192.168.6.56 (My DNS addresses are 192,168.6.55 and 192.168.6.56)

ndc network default set 100 (Untill this command, the status is: ping works fine from command line for google, but after I enter this command, command line based ping stops and I am unable to get browser working as was the previous case).


0 0
原创粉丝点击