[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian 和 xp 共享 adsl 上网的问题



你的Debian的两个网卡不要配到一个网段上,接ADSL的随便配一个就好了。否则在路由
时有可能那个连ADSL被作为首选。

* Huisi Wang <huisiwang@gmail.com> [2005-05-21 19:10:07 +0800]:

> debian sid 做主机:
> /etc/network/interfaces
> 
> # The loopback network interface
> auto lo
> iface lo inet loopback
> 
> # The primary network interface
> auto eth0
> iface eth0 inet static
> 	address 192.168.1.2
> 	netmask 255.255.255.0
> 	# dns-* options are implemented by the resolvconf package, if installed
> 
> auto eth1
> iface eth1 inet static
> 	address 192.168.1.1
> 	netmask 255.255.255.0
> 	network 192.168.1.0
> 	broadcast 192.168.1.255
> 
> auto ppp0
> iface ppp0 inet ppp
>              provider dsl-provider
> # please do not modify the following line
>      pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
> 
> 并且,
> echo "1" > /proc/sys/net/ipv4/ip_forward
> 
> root# modprobe iptable_nat
> root# modprobe ipt_MASQUERADE
> root# iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
> 
> 用正确的网线连接两台电脑。
> 在xp设置
> IP:192.168.1.100
> netmask:255.255.255.0
> gateway:192.168.1.1
> 
> 但是,现在两台机器之间ping不通。不知是怎么回事,大家看看。
> 谢谢!
> 
> --
> Best regards,
> Huisi

Attachment: signature.asc
Description: Digital signature


Reply to: