LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: fangjia

为啥我的Debian上不了网啊?!(已解决)

[复制链接]
发表于 2006-2-6 11:34:50 | 显示全部楼层
去掉网关,我遇到过这个情况!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-6 17:38:55 | 显示全部楼层
去掉网卡?请问具体修改哪个文件,改哪段啊?
回复 支持 反对

使用道具 举报

发表于 2006-2-6 18:24:15 | 显示全部楼层
/etc/network/interfaces

注释掉gateway行
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-6 18:53:11 | 显示全部楼层
楼上的能帖出个完整的文件内容吗?我好比对啊!
回复 支持 反对

使用道具 举报

发表于 2006-2-6 22:01:26 | 显示全部楼层
先pppoeconf,这个过程中会修改/etc/network/interfaces
然后修改/etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
# auto eth1
# iface eth1 inet dhcp

auto eth0
iface eth0 inet static
        address 10.1.31.6
        netmask 255.255.255.0
        network 10.1.31.0
        broadcast 10.1.31.255
#        gateway 10.1.31.254

iface dsl-provider inet ppp
provider dsl-provider

#auto eth0
# iface eth0 inet manual
拨号时可以使用pon dsl-provider,下线可以使用poff dsl-provider
拨号也可以使用ifup dsl-provider,下线可以使用ifdown dsl-provider
回复 支持 反对

使用道具 举报

发表于 2006-2-7 13:09:41 | 显示全部楼层
安装这个包 etherconf
#dpkg-dpkg-reconfigure etherconf
配置会更方便
回复 支持 反对

使用道具 举报

发表于 2006-2-7 17:41:21 | 显示全部楼层
我的/etc/network/interfaces
========================
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
        script grep
        map eth0

# The primary network interface

auto eth0

iface eth0 inet static
        address 10.0.0.1
        netmask 255.255.255.0
#        gateway 10.0.0.138

iface dsl-provider inet ppp
provider dsl-provider

    pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf

======================================

地址是为了访问我的modem方便设的,10.0.0.138是我的modem的地址,如果用猫拨号做路由,取消网关的注释即可,在用debian拨号的时候,注释掉gateway那一行

pon-dslprovider拨号
另外,可以这样:
sudo rm -rf /etc/ppp/peers/provider
sudo ln -sf /etc/ppp/peers/dsl-provider /etc/ppp/peers/provider
这样之后,就可以更简便的用pon拨号,poff断线了,我就这么干的,只拨号的话删了那个文件似乎没有不良影响:)
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-8 03:45:53 | 显示全部楼层
多谢各位大大热心帮助啊,困扰了我这么长时间的问题终于解决了。
高兴ing ............
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表