[android-x86] IP forwarding


http://grokbase.com/t/gg/android-x86/123xvnphgp/ip-forwarding


MatthieuD  
Mar 30, 2012 at 1:18 am


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?


+++++++++++++++++++++++++++++++++++++++++




原文地址:https://www.cnblogs.com/ztguang/p/12646094.html