android x86看ip,[android-x86] 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?

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

6 responses20

at Mar 30, 2012 at 1:42 am

icon_anchor_16x16.png

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 -

20

at Mar 31, 2012 at 12:54 am

icon_anchor_16x16.png

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 -

20

at Apr 2, 2012 at 12:45 pm

icon_anchor_16x16.png

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 -

20

at Apr 7, 2012 at 2:27 am

icon_anchor_16x16.png

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 -

20

at Apr 9, 2012 at 3:46 pm

icon_anchor_16x16.png

hi math,

I resolved my issue...

I forgot to register to dhclient .... (dhclient eth0)

Thanks,

venky

- Show quoted text -

20

at Jan 6, 2013 at 3:13 pm

icon_anchor_16x16.png

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 -

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值