[Q] VPNC Route Help - General Questions and Answers

So I inadvertently killed my D1 by drowning it in a river and work sent me a new D3.
With a rooted D1, I was able to get VPNC to a Cisco working and <whisper>WiFi tether; I wanted the same usability in the D3. A little trickier getting things set up, but I'm just about there.
With wonderful resources like you people, found a radio tweak, and also that the D3 has tun built in (can see dev/net/tun), so with VPNC widget, got connected, see our Cisco banner text and issued IP in the VPNC log.
However, once connected to VPN, I can't access internet and can't ping any of our internal IPs either...I think my routes are wrong.
But, I don't know enough about setting up the routing table and was hoping someone could steer me in the right direction? I would like to manually adjust them, see if it works, then hopefully script it for after connection.
Not sure what anyone might need, but I'll start with this:
Before...
ip route list
66.174.201.64 dev ppp0 scope link
66.174.201.64 dev ppp0 proto kernel scope link src 10.251.3.122
default via 66.174.201.64 dev ppp0
netcfg
lo UP 127.0.0.1 255.0.0.0 0x00000049
usb0 DOWN 0.0.0.0 0.0.0.0 0x00001002
gether0 DOWN 0.0.0.0 0.0.0.0 0x00001002
sit0 DOWN 0.0.0.0 0.0.0.0 0x00000080
ip6tnl0 DOWN 0.0.0.0 0.0.0.0 0x00000080
tun DOWN 0.0.0.0 0.0.0.0 0x00001002
ppp0 UP 10.251.3.122 255.255.255.255 0x000010d1
After VPN connected...
66.174.201.64 dev ppp0 scope link
66.174.201.64 dev ppp0 proto kernel scope link src 10.251.3.122
default via 66.174.201.64 dev ppp0
netcfg
lo UP 127.0.0.1 255.0.0.0 0x00000049
usb0 DOWN 0.0.0.0 0.0.0.0 0x00001002
gether0 DOWN 0.0.0.0 0.0.0.0 0x00001002
sit0 DOWN 0.0.0.0 0.0.0.0 0x00000080
ip6tnl0 DOWN 0.0.0.0 0.0.0.0 0x00000080
tun DOWN 0.0.0.0 0.0.0.0 0x00001002
tun0 UP 192.168.144.8 255.255.255.255 0x000010d1
ppp0 UP 10.251.3.122 255.255.255.255 0x000010d1
I appreciate anyone taking the time to help me out.

Update...
Apparently, I found my busybox wasn't symlinked properly, so things like grep weren't working...that's why the usual vpnc-script file wasn't updating routes as it normally would. Updated bb and after connecting with VPNC, I now get:
ip route list
<myciscoip> via 66.174.201.64 dev ppp0 src 10.242.253.151 mtu 1500
advmss 1460
66.174.201.64 dev ppp0 scope link
66.174.201.64 dev ppp0 proto kernel scope link src 10.242.253.151
default dev tun0 scope link
netcfg
lo UP 127.0.0.1 255.0.0.0 0x00000049
usb0 DOWN 0.0.0.0 0.0.0.0 0x00001002
gether0 DOWN 0.0.0.0 0.0.0.0 0x00001002
sit0 DOWN 0.0.0.0 0.0.0.0 0x00000080
ip6tnl0 DOWN 0.0.0.0 0.0.0.0 0x00000080
tun DOWN 0.0.0.0 0.0.0.0 0x00001002
ppp0 UP 10.242.253.151 255.255.255.255 0x000010d1
tun0 UP 192.168.144.5 255.255.255.255 0x000010d1
Unfortunately, I still can't reach internet or ping any of our internal IPs? Like I said, I don't know enough about TCP route configuration to know what's missing/wrong from the phone's routing table.
Anyone with some insight?

Interesting...came across this (site wouldn't allow me to post link, so I mucked it a bit): androidforums.com /evo-4g-support-troubleshooting/ 140775-post-froyo-vpn-issues.html
They could connect to VPN if using WiFi, but not 3g. So, I tried connecting to my home WiFi, then VPN to work Cisco on phone...voila! Works fine...ping internal work IPs, facebook is blocked in browser due to our WebSense...just as expected.
So, can't VPN over 3g connection just yet....

Please use the Q&A Forum for questions Thanks
Moving to Q&A

I've got it working in mine by doing the folowing (Thether + 3G):
First try using IP instead of DNS. Otherwise you'll need what I need probably (strip your APN of MMS etc.)
Create a new APN. Only fill in mimimal:
Name: Internet
APN: Internet
Type: Internet
Rest default. Worked for me. Adding MMS proxy etc. Blocks my VPN

Related

Android and OpenVPN

Running android-openvpn-settings on Das BAMF 1.8.6 rooted thunderbolt.
My config file:
Code:
remote mine.dyndns.org 443
client
proto tcp
nobind
dev tap
comp-lzo
verb 4
log /sdcard/openvpn/openvpn.log
resolv-retry infinite
persist-key
persist-tun
redirect-gateway def1
dhcp-option DNS 192.168.1.1
route-gateway 192.168.1.1
route-delay 10
ns-cert-type server
key-direction 1
ca "camine.crt"
cert "mine2.crt"
Had to manually add this route for the log file to be free of errors. route-default would cause some route add/del's that would give Invalid Parameter or No Such Process errors since 192.168.1.0 wasnt anywhere in the table. So running this before opening the VPN tunnel got rid of the errors:
Code:
busybox route add -net 192.168.1.0 netmask 255.255.255.0 rmnet_sdio0
Heres what my routing table looks like after android-openvpn-settings runs and says the tunnel is open:
Code:
# busybox route -n
busybox route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
98.249.31.333 192.168.1.1 255.255.255.255 UGH 0 0 0 rmnet_sdio0
98.249.31.333 10.189.54.12 255.255.255.255 UGH 0 0 0 rmnet_sdio0
10.189.54.11 0.0.0.0 255.255.255.240 U 0 0 0 rmnet_sdio0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 rmnet_sdio0
0.0.0.0 192.168.1.1 128.0.0.0 UG 0 0 0 rmnet_sdio0
128.0.0.0 192.168.1.1 128.0.0.0 UG 0 0 0 rmnet_sdio0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 rmnet_sdio0
0.0.0.0 10.189.54.12 0.0.0.0 UG 0 0 0 rmnet_sdio0
No clue if the table is OK now. One weird thing is I can't ping through tun0 at all. Don't see tun0 in ifconfig either... Did I miss some huge step?
Code:
# ping -c 1 -I tun0 192.168.1.1
ping -c 1 -I tun0 192.168.1.1
ping: unknown iface tun0
only background I have is with that config (except redirect-gateway instead of redirect-gateway def1) used to work on my old WM phone.
Anyone have any ideas? Let me know if I can provide any more details... Ive been racking my brain on this the past couple of days. Out of ideas.
Bump. Any ideas?
Maybe my Tun setup is wrong? Where is tun.ko located on Das BAMF 1.8.6? The location in the android-openvpn-settings just says "tun"
A few things to try:
1) Change the symlinks /system/bin/ifconfig and /system/bin/route to point to /system/xbin/busybox instead of toolbox
2) Once the tunnel is established, try these commands in a terminal:
ip ru del table gprs
ip ru del table wifi
After "connecting" with android-openvpn-settings then running
Code:
netcfg tap0 dhcp
in a terminal openvpn works.
Still have no clue about CM7 built in OpenVPN and the broken tunnel message.

[Q] Enable both wifi and mobile data for multihoming

This might sound like a slightly odd thing to do, but I am trying to enable both wifi and mobile data on an Motorola Xoom pad at the same time. I need both interfaces as I am exploring multihoming of mobile devices. To illustrate the current behavior of the xoom.
sh-4.1# netcfg
...
ppp0 UP 95.209.163.33 255.255.255.255 0x000010d1
sh-4.1# svc wifi enable
sh-4.1# netcfg
...
ppp0 UP 95.209.163.33 255.255.255.255 0x000010d1
wlan0 UP 0.0.0.0 0.0.0.0 0x00001043
sh-4.1# netcfg
...
ppp0 DOWN 0.0.0.0 0.0.0.0 0x00001090
wlan0 UP 130.229.167.92 255.255.192.0 0x00001043
sh-4.1# netcfg
...
wlan0 UP 130.229.167.92 255.255.192.0 0x00001043
It seems that enabling data over wlan0 automatically disables the mobile data. Is there any known way to prevent this and have both interfaces enabled at the same time?
I have root access on the tablet and I am not afraid to write some code if that is what is needed. I just don't know where to start.
ps.
I have tried searching and not found any similar question.
ds.
/Pehr

[TEMPFIX] [WIFI] Slimbean 4.2.2 build 4.2 v2.

So I managed to get wifi working with 4.2.2, but it's a bit clunky and manual and I have no idea why it works, but it does.
ROM here.
So for now since Beast is busy this week, anyone who wants working Wifi with this can do the following.
*Download the attached script and put it on the root of your SD card.
*Install Script Widgets and Script Manager (going to need to use a few mb of data for this, download from another ROM and save the apk's to offline install, or use the manual steps above to get wifi working at least once)
*Start up script manager and navigate to the wifiscript.txt file from the above step, click on it, it will open a window. Click SU and Boot and then click save. This will set the script to run at boot up.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
*Go to your home screen, add a widget to the Script Widget, set it to run your wifiscript.txt
*click on it, it will start and run. exit out of the widget, go to wifi setting. you should see your access points. Click on the one to connect to, enter password and make sure to choose automatically connect. It won't connect yet
*Go back to your home screen, run the widget shortcut again, it should connect. Anytime you want to switch AP's that you are connected to, you will need to run the widget shortcut again.
*Reboot your phone, let it fully boot, your wifi should be connected to your AP.
I offer no support here, don't clutter up the dev thread with anything about this. I know the junkies out there want something to flash and want wifi to play with this.
Nice find man. You might be able to just add the script to an init.d file and have it work from boot. I'm busy fixing some gallery issues on my rocket so if you have time to try it would be great.
hechoen said:
Nice find man. You might be able to just add the script to an init.d file and have it work from boot. I'm busy fixing some gallery issues on my rocket so if you have time to try it would be great.
Click to expand...
Click to collapse
I tried in the init.d, even at 99 and it runs too soon to be executed. That was my first thought. Not sure how to set it to run once you're like at the lock screen, and not the slimrom logo time, then I could set it there but couldn't find a way, so the script manager works out good. The widget also works out great if you switch AP's like lots of people do. It's only a few extra taps and gives you control when to run the script so can kick your wifi back in to gear if you need to.
Something for now anyways............
If you talk to beast, tell him to check out the thread and see if he knows why it's doing it. I posted some of my other findings in the dev thread.
Yeah I saw the dev thread. I'll let him know but he's pretty good at checking in. At least the drivers built correctly. Oh and sorry about quoting the whole OP. lol
:blowjob: is virtual but that and a thumbs up is all i can give you
Sent from my SGH-T959V using xda app-developers app
no vismis, please keep it PG.
Check out the bottom of this post
Sent from my SGH-T959V using xda app-developers app on slim 4.2.2 over WIFI!!!!!!!!!!!
---------- Post added at 10:04 PM ---------- Previous post was at 09:45 PM ----------
airfluip1 said:
no vismis, please keep it PG.
Click to expand...
Click to collapse
Any kid playing around on XDA has already learned far more on the internet then just blowjobs BTW
Sent from my SGH-T959V using xda app-developers app
getochkn said:
I tried in the init.d, even at 99 and it runs too soon to be executed. That was my first thought. Not sure how to set it to run once you're like at the lock screen, and not the slimrom logo time, then I could set it there but couldn't find a way, so the script manager works out good. The widget also works out great if you switch AP's like lots of people do. It's only a few extra taps and gives you control when to run the script so can kick your wifi back in to gear if you need to.
Something for now anyways............
If you talk to beast, tell him to check out the thread and see if he knows why it's doing it. I posted some of my other findings in the dev thread.
Click to expand...
Click to collapse
Try adding sleep before the netcfg command
sleep 30
netcfg blah blah
It'll make the script wait 30 seconds before executing the rest of the script.
That's odd that it works out that way. Can you show me the output of netcfg with no arguments? ICS shows me this:
When booted after wifi toggle was off:
Code:
[email protected]:/ # netcfg
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
svnet0 UP 0.0.0.0/0 0x000000d1 a0:00:00:00:00:00
ifb0 DOWN 0.0.0.0/0 0x00000082 2e:f9:39:dc:db:fb
ifb1 DOWN 0.0.0.0/0 0x00000082 82:b6:22:43:a0:df
gannet0 DOWN 0.0.0.0/0 0x00001082 b6:55:4b:d2:2f:db
usb0 DOWN 0.0.0.0/0 0x00001002 96:e2:9e:da:43:3c
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
When wifi is enabled:
Code:
[email protected]:/ # netcfg
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
svnet0 UP 0.0.0.0/0 0x000000d1 a0:00:00:00:00:00
ifb0 DOWN 0.0.0.0/0 0x00000082 2e:f9:39:dc:db:fb
ifb1 DOWN 0.0.0.0/0 0x00000082 82:b6:22:43:a0:df
gannet0 DOWN 0.0.0.0/0 0x00001082 b6:55:4b:d2:2f:db
usb0 DOWN 0.0.0.0/0 0x00001002 96:e2:9e:da:43:3c
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
eth0 UP 192.168.1.9/24 0x00001003 b4:07:f9:44:42:19
When wifi is disabled again:
Code:
[email protected]:/ # netcfg
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
svnet0 UP 0.0.0.0/0 0x000000d1 a0:00:00:00:00:00
ifb0 DOWN 0.0.0.0/0 0x00000082 2e:f9:39:dc:db:fb
ifb1 DOWN 0.0.0.0/0 0x00000082 82:b6:22:43:a0:df
gannet0 DOWN 0.0.0.0/0 0x00001082 b6:55:4b:d2:2f:db
usb0 DOWN 0.0.0.0/0 0x00001002 96:e2:9e:da:43:3c
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
eth0 UP 0.0.0.0/0 0x00001003 b4:07:f9:44:42:19
Turning wifi on and off would require us to run the widget command again?
Sent from my SGH-T959V using xda app-developers app
I'm just playing lol.
Dwack said:
Turning wifi on and off would require us to run the widget command again?
Sent from my SGH-T959V using xda app-developers app
Click to expand...
Click to collapse
Hi Dwack
from what I understood it is required only before registering a specific AP for the first time.
Therefore if you simply open and close on a known network, script is not needed.
If you add it to the bootup as I said, and you connect to an AP already saved in your list with the password, you shouldn't need to run it, but you might. It's not a perfect system or the end all fix for it, simply a tempfix for the junkies, but more importantly to show Beast that his drivers work fine and wifi can work, scan, and stay connected so hopefully that point him in the right direction of if it's a kernel thing, system thing, or what. I don't know to be honest. I'm surprised I got this to work, I'm not a linux guy by any means. I get all screwed up over permissions every time and folder owners and all that jazz. This was like a rainman type of find for me. lol.
FB. Cold boot without the script running but wifi on gives.
Code:
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
svnet0 UP 0.0.0.0/0 0x000000d1 a0:00:00:00:00:00
ifb0 DOWN 0.0.0.0/0 0x00000082 be:17:b3:a2:d9:f9
ifb1 DOWN 0.0.0.0/0 0x00000082 ae:af:e5:5a:52:70
gannet0 DOWN 0.0.0.0/0 0x00001082 4e:05:c6:59:ad:75
usb0 DOWN 0.0.0.0/0 0x00001002 82:bf:75:80:f3:6b
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
eth0 UP 0.0.0.0/0 0x00001003 50:cc:f8:f0:69:4f
But it won't connect so the eth0 is up, but not connecting.
when disabling the wifi button
Code:
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
svnet0 UP 0.0.0.0/0 0x000000d1 a0:00:00:00:00:00
ifb0 DOWN 0.0.0.0/0 0x00000082 be:17:b3:a2:d9:f9
ifb1 DOWN 0.0.0.0/0 0x00000082 ae:af:e5:5a:52:70
gannet0 DOWN 0.0.0.0/0 0x00001082 4e:05:c6:59:ad:75
usb0 DOWN 0.0.0.0/0 0x00001002 82:bf:75:80:f3:6b
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
Enabling the button
Code:
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
svnet0 UP 0.0.0.0/0 0x000000d1 a0:00:00:00:00:00
ifb0 DOWN 0.0.0.0/0 0x00000082 be:17:b3:a2:d9:f9
ifb1 DOWN 0.0.0.0/0 0x00000082 ae:af:e5:5a:52:70
gannet0 DOWN 0.0.0.0/0 0x00001082 4e:05:c6:59:ad:75
usb0 DOWN 0.0.0.0/0 0x00001002 82:bf:75:80:f3:6b
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
eth0 UP 0.0.0.0/0 0x00001003 50:cc:f8:f0:69:4f
Running the netcfg eth0 down
Code:
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
svnet0 UP 0.0.0.0/0 0x000000d1 a0:00:00:00:00:00
ifb0 DOWN 0.0.0.0/0 0x00000082 be:17:b3:a2:d9:f9
ifb1 DOWN 0.0.0.0/0 0x00000082 ae:af:e5:5a:52:70
gannet0 DOWN 0.0.0.0/0 0x00001082 4e:05:c6:59:ad:75
usb0 DOWN 0.0.0.0/0 0x00001002 82:bf:75:80:f3:6b
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
eth0 UP 192.168.1.119/24 0x00001003 50:cc:f8:f0:69:4f
I don't know why telling it go "down" actually keeps it up and it locks on within a second to my AP as you can see, I have an IP address now.
Again, I have no reason why it works, just hope Beast or someone can and maybe Beast can stop going crazy chasing other libraries or worried about his drivers, because it works fine once you do that command. Going back in wifi settings though and it connects and disconnects, so something is so close to working, it's there.
My bad ^_^
Sent from my SGH-T959V using xda app-developers app
Working as advertised. Tkx geto! Nice step-step. Easy.
Random Wifi Shutdowns
I know this is only a temporary fix, but my Wifi seems to disconnect randomly... Here is a logcat
Google Now and some other services shut down WiFi
dgmoodey said:
I know this is only a temporary fix, but my Wifi seems to disconnect randomly... Here is a logcat
EDIT: Was able to figure out the problem....
Click to expand...
Click to collapse
What was the problem?
getochkn said:
What was the problem?
Click to expand...
Click to collapse
Acutally, I wasn't able to make it work... When I open up the Google Search app, the Wifi immediately shut down and would not start right... This also happens with some other Google services.
After even rebooting phone, the WiFi stays up for 3-4 min, then shuts back down... Its strange
Also, after long periods of inactivity (10 min lol) the WiFi sleeps due to the inactivity and will not start unless the script is run again.
I guess that i will have to install jb 4.2 now.
dgmoodey said:
Acutally, I wasn't able to make it work... When I open up the Google Search app, the Wifi immediately shut down and would not start right... This also happens with some other Google services.
After even rebooting phone, the WiFi stays up for 3-4 min, then shuts back down... Its strange
Also, after long periods of inactivity (10 min lol) the WiFi sleeps due to the inactivity and will not start unless the script is run again.
Click to expand...
Click to collapse
That's why it's proof on concept. lol. I ran into it crashing after install the AIO slim apps and adding all the google apps in. Not a daily driver by any means. GPS doesn't work, no videos play, etc. It was just to show Beast that wifi works and maybe get any other devs looking into it or knowing, hey, I had that problem on a ROM and it was this file, etc. I was in way over my head when I decided to even try as I had no idea what I was doing. lol.
getochkn said:
That's why it's proof on concept. lol. I ran into it crashing after install the AIO slim apps and adding all the google apps in. Not a daily driver by any means. GPS doesn't work, no videos play, etc. It was just to show Beast that wifi works and maybe get any other devs looking into it or knowing, hey, I had that problem on a ROM and it was this file, etc. I was in way over my head when I decided to even try as I had no idea what I was doing. lol.
Click to expand...
Click to collapse
Well you sure as heck did an amazing job by making Beast's job a hell of a lot easier! Really nice job with it
I think that we should have a working ROM by the end of this month, hopefully

wired networking without DHCP

I suspect I'm not the only person with a wired network adapter - and some of us may be trying to do things like configure routers, etc, where there's no active DHCP server.
I was in this situation a couple of days ago, configuring a dd-wrt box with DHCP turned off.
The best how-to I found was at this entry at HeadlessAndroid
This could be "old hat" to everybody here (other than me), but, for most of my android devices, if I'm in the terminal, I'm connected via "adb terminal" so I've never needed to do this - and ifcfg does not work the way I'd have expected.
Hope this helps someone...
Networking on a Headless Android System
Android isn't the most intuitive environment for setting up networking on the command line. After playing with several different options here's what I've found.
Summary
# netcfg eth0 dhcp
# route add default gw 192.168.0.1 dev eth0
# setprop net.dns1 208.67.222.222
# setprop net.dns2 208.67.222.220
Details
The Android tools are quite different from the tools found on other embedded Linux systems, so most people I've talked to have had difficulty figuring out what utilities to use and how to use them. The most interesting one is ifconfig. When you type ifconfig on an Android system nothing happens. On a standard busybox or gnu based Linux system you will see the available networking interfaces and their associated settings (ok, technically ifconfig -a will show you that information). Since ifconfig doesn't show anything, most people assume (incorrectly) that it doesn't work.
On my development platform, to set a static IP address, I did the following:
# ifconfig eth0 192.168.0.84 netmask 255.255.255.0
Which didn't give any response, but DID show the following when I did netcfg.
# netcfg
lo UP 127.0.0.1 255.0.0.0 0x00000049
eth0 UP 192.168.0.84 255.255.255.0 0x00001043
usb0 DOWN 0.0.0.0 0.0.0.0 0x00001002
tunl0 DOWN 0.0.0.0 0.0.0.0 0x00000080
gre0 DOWN 0.0.0.0 0.0.0.0 0x00000080
sit0 DOWN 0.0.0.0 0.0.0.0 0x00000080
So what about DHCP you may ask?
# netcfg eth0 dhcp
Which yields the following.
# netcfg
lo UP 127.0.0.1 255.0.0.0 0x00000049
eth0 UP 192.168.0.227 255.255.255.0 0x00001043
usb0 DOWN 0.0.0.0 0.0.0.0 0x00001002
tunl0 DOWN 0.0.0.0 0.0.0.0 0x00000080
gre0 DOWN 0.0.0.0 0.0.0.0 0x00000080
sit0 DOWN 0.0.0.0 0.0.0.0 0x00000080
Just because you have an IP address now doesn't mean the applications on your Android device can get to the network. For that you have to set a default route and set the DNS resolver addresses. Again, with route keep in mind it won't show the usual output that a standard busybox or gnu based embedded Linux system would show.
To set the default route:
# route add default gw 192.168.0.1 dev eth0
And to set the DNS (I'm using OpenDNS addresses here):
# setprop net.dns1 208.67.222.222
# setprop net.dns2 208.67.222.220
And that allows the holy grail of a DNS resolved ping to a domain on the Internet.
# ping google.com
PING google.com (74.125.224.134) 56(84) bytes of data.
64 bytes from nuq04s09-in-f6.1e100.net (74.125.224.134): icmp_seq=1 ttl=57 time=41.5 ms
64 bytes from nuq04s09-in-f6.1e100.net (74.125.224.134): icmp_seq=2 ttl=57 time=43.2 ms
References
I found some great information in the following links.
http://www.anddev.org/advanced_networking_with_android-linux-t155.html
http://elinux.org/Android_Networking
Click to expand...
Click to collapse

Samsung Tab S 10.5- Cannot Use WLAN And Ethernet At The Same Time

networ
Dear all,
I am facing some issues with my device and I think that those can be a general "problem" of Android.
First I will describe what I want to do:
I have got an Android tablet with root access. (Samsung Tab S 10.5) and a docking station (Samsung EE-MT800) with ethernet socket.
When I plug in the network cable, I can configure the ethernet interface within Android settings or I can configure it with terminal emulator.
This is working fine, but: As soon as I want to use both, the WLAN and the Ethernet itnerface I cannot use both at one time. If have checked netcfg and it shows the interfaces wlan0 and eth0 "UP" and configured with the correct IP addresses. The routes were added correctly and the default route is set to the WLAN and the ethernet default route not present. BUT I cannot ping devices connected to the ethernet interface directly. After disabling wlan0 interface, a ping is possible.
References from CLI:
[email protected]:/ # netcfg
wlan0 UP 192.168.2.108/24 0x00001043 78:40:e4:11:11:11
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
eth0 UP 192.168.5.77/24 0x00001043 6c:a7:fa:00:00:00
p2p0 UP 0.0.0.0/0 0x00001003 7a:40:e4:16:e3:61
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
rmnet1 DOWN 0.0.0.0/0 0x00001090 00:00:00:00:00:00
rmnet0 DOWN 0.0.0.0/0 0x00001090 00:00:00:00:00:00
rmnet2 DOWN 0.0.0.0/0 0x00001090 00:00:00:00:00:00
rmnet3 DOWN 0.0.0.0/0 0x00001090 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
[email protected]:/ # ip route show
default via 192.168.2.1 dev wlan0 metric 310
192.168.2.0/24 dev wlan0 proto kernel scope link src 192.168.2.108 metric 310
192.168.5.0/24 dev eth0 proto kernel scope link src 192.168.5.77
Ping:
192.168.2.1 and 8.8.8.8 possible,
192.168.5.1 impossible
After disabling wlan0 interface, ping is possible:
[email protected]:/ # netcfg wlan0 down
[email protected]:/ # ip route show
192.168.5.0/24 dev eth0 proto kernel scope link src 192.168.5.77
[email protected]:/ # ping 192.168.5.1
PING 192.168.5.1 (192.168.5.1) 56(84) bytes of data.
64 bytes from 192.168.5.1: icmp_seq=1 ttl=64 time=2.06 ms
64 bytes from 192.168.5.1: icmp_seq=2 ttl=64 time=1.17 ms
64 bytes from 192.168.5.1: icmp_seq=3 ttl=64 time=1.10 ms
64 bytes from 192.168.5.1: icmp_seq=4 ttl=64 time=1.02 ms
^C
--- 192.168.5.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 1.025/1.342/2.063/0.419 ms
Can somebody help me with this?

Categories

Resources