帮我看看我的双网卡无法跨网段访问(ping都不通)?

由 冰箱 在 06-21-2003 08:57 发表:

帮我看看我的双网卡无法跨网段访问(ping都不通)?

eth0: 192.168.1.89 gw 192.168.1.254 接外网

eth1: 192.168.2.254 接内网

客户机ip:192.168.2.200 gw 192.168.2.254

ping不通192.168.1.254 能ping通192.168.1.89

---------------------------------------------------------------------

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

255.255.255.255 * 255.255.255.255 UH 0 0 0 eth1

192.168.2.0 * 255.255.255.0 U 0 0 0 eth1

192.168.1.0 * 255.255.255.0 U 0 0 0 eth0

127.0.0.0 * 255.0.0.0 U 0 0 0 lo

default 192.168.1.254 0.0.0.0 UG 0 0 0 eth0

---------------------------------------------------------------------

各位帮我看看啊。


所有人不许动,把手举起来。我是菜鸟!


由 laixi 在 06-21-2003 09:24 发表:


客户机有没有指定网关?


由 tower 在 06-21-2003 10:55 发表:


try this

echo 1 >/proc/sys/net/ipv4/ip_forward


由 tower 在 06-21-2003 10:56 发表:


or edit /etc/sysctl.conf

check if this exists:

net.ipv4.ip_forward=1


由 冰箱 在 06-23-2003 10:51 发表:


> quote: > > * * * > > 最初由 tower 发表
>
> **try this
>
> echo 1 >/proc/sys/net/ipv4/ip_forward ** > > * * *

不行啊。除非加上下面的命令:

echo 1 >/proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j SNAT --to 192.168.1.89

即使这样也只能ping到192.168.1.0网段的ip,网上邻居使不了啊。

如何在网上邻居也能看到啊?


所有人不许动,把手举起来。我是菜鸟!


由 冰箱 在 06-23-2003 10:53 发表:


> quote: > > * * * > > 最初由 tower 发表
>
> **or edit /etc/sysctl.conf
>
> check if this exists:
>
> net.ipv4.ip_forward=1 ** > > * * *

不行啊,我的最终目的是网上邻居也能跨网段访问


所有人不许动,把手举起来。我是菜鸟!


由 dancingpig 在 06-23-2003 12:02 发

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus