[android-x86] IP forwarding
http://grokbase.com/t/gg/android-x86/123xvnphgp/ip-forwarding
hi,
First, thanks for your work, Android-x86 is a great project!
I have compiled ICS generic_x86-eng and I test IP forwarding
functionality. My target has two ethernet ports. I connect two
computers(linux) to these ports.I give their ip:
192.168.0.1
192.168.1.1
In android console, i do :
netcfg eth0 up
ifconfig eth0 192.168.0.2
netcfg eth1 up
ifconfig eth1 192.168.1.2
Android target can ping 192.168.0.1 and 192.168.1.1
Now, i want that 192.168.0.1 can ping 192.168.1.1.
on 192.168.1.1: route add -net 192.168.0.0 netmask 255.255.255.0 gw
192.168.1.2
on 192.168.0.1: route add -net 192.168.1.0 netmask 255.255.255.0 gw
192.168.0.2
And finally on android target: echo 1 > /proc/sys/net/ipv4/conf/all/
forwarding
(/proc/sys/net/ipv4/conf/all/forwarding pass to 1)
Now, on 192.168.1.1, I can ping 192.168.0.2 but not 192.168.0.1.
it seems that IP forwarding doesn't work.
I look in kernel config, but i don't find that can I change..Anyone
got an idea?
+++++++++++++++++++++++++++++++++++++++++
-
Tabletsx86 at Mar 30, 2012 at 1:42 am ⇧ Ping ethx sends packets only outside the ethx interface and can not
redirect packet to the internal router
having said that note that "when u ping from your system, the source
IP is set to INADDR_ANY. And when the kernel finds the destination IP
to be on the same system, it will simply loopback it. Its using
loopback (lo) interface"
ref: http://superuser.com/questions/307105/ping-two-ethernet-card-on-the-same-computer-and-on-the-same-subnet
- Show quoted text - -
OK, as I understand it, this explains why computer 192.168.1.1 can ping
192.168.0.2.
Now, i want 192.168.0.1 and 192.168.1.1 to ping each other knowing that
they are on different systems.
Le jeudi 29 mars 2012 19:42:15 UTC+2, tabletsx86 a écrit :
- Show quoted text - -
Venkatesh bachina at Apr 2, 2012 at 12:45 pm ⇧ Hi,
I do have similar problem with Ethernet.
i am able ping to other system in the network, but cant able to ping to
others like ping google.com
or some others.
ping 172.16.5.8
PING 172.16.5.8 (172.16.5.8) 56(84) bytes of data.
64 bytes from 172.16.5.8: icmp_req=1 ttl=64 time=0.000 ms
64 bytes from 172.16.5.8: icmp_req=2 ttl=64 time=0.061 ms
64 bytes from 172.16.5.8: icmp_req=3 ttl=64 time=0.031 ms
64 bytes from 172.16.5.8: icmp_req=4 ttl=64 time=0.030 ms
apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libgpm2 libpython2.7 vim-runtime
Suggested packages:
gpm ctags vim-doc vim-scripts
The following NEW packages will be installed:
libgpm2 libpython2.7 vim vim-runtime
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,813 kB of archives.
After this operation, 30.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://ports.ubuntu.com/ubuntu-ports/ oneiric/main libgpm2 armel
1.20.4-3.4ubuntu1
Temporary failure resolving 'ports.ubuntu.com'
Err http://ports.ubuntu.com/ubuntu-ports/ oneiric/main libpython2.7 armel
2.7.2-5ubuntu1
Temporary failure resolving 'ports.ubuntu.com'
Err http://ports.ubuntu.com/ubuntu-ports/ oneiric/main vim-runtime all
2:7.3.154+hg~74503f6ee649-2ubuntu3
Temporary failure resolving 'ports.ubuntu.com'
Err http://ports.ubuntu.com/ubuntu-ports/ oneiric/main vim armel
2:7.3.154+hg~74503f6ee649-2ubuntu3
Temporary failure resolving 'ports.ubuntu.com'
Failed to fetch
http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gpm/libgpm2_1.20.4-3.4ubuntu1_armel.deb
Temporary failure resolving 'ports.ubuntu.com'
Failed to fetch
http://ports.ubuntu.com/ubuntu-ports/pool/main/p/python2.7/libpython2.7_2.7.2-5ubuntu1_armel.deb
Temporary failure resolving 'ports.ubuntu.com'
Failed to fetch
http://ports.ubuntu.com/ubuntu-ports/pool/main/v/vim/vim-runtime_7.3.154+hg~74503f6ee649-2ubuntu3_all.deb
Temporary failure resolving 'ports.ubuntu.com'
Failed to fetch
http://ports.ubuntu.com/ubuntu-ports/pool/main/v/vim/vim_7.3.154+hg~74503f6ee649-2ubuntu3_armel.deb
Temporary failure resolving 'ports.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?
Any help regarding this network issue....
Thanks in Advance,
Venky
- Show quoted text - -
Sorry Venky, but your problem doesn't look like mine.. And I don't
understand why you try to install ubuntu packages.
On my own, I try exactly the same thing i explain before, but I replace
Android with Debian, and IP forwarding works..
So, I think something doesn't work on Android?
Le jeudi 29 mars 2012 14:41:07 UTC+2, MatthieuD a écrit :
- Show quoted text - -
Venkatesh bachina at Apr 9, 2012 at 3:46 pm ⇧ hi math,
I resolved my issue...
I forgot to register to dhclient .... (dhclient eth0)
Thanks,
venky
- Show quoted text - -
Hi,
I have the same problem about ip forward in android 4.0. And it works in
fedora 14 and android 2.3. I don't kown the reason. So I want to kown that
do you have resolved the issis. Thanks!
在 2012年3月29日星期四UTC+8下午8时41分07秒,MatthieuD写道:
- Show quoted text -
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通