LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2317|回复: 7

debian中手工配置好了/etc/network/interfaces 文件,但是只能ifup eth0 来生效 ?

[复制链接]
发表于 2009-7-3 19:53:45 | 显示全部楼层 |阅读模式
debian中手工配置好了/etc/network/interface文件,但是只能ifup eth0 来生效
/etc/init.d/networking start 无论是在rcS.d 自动执行 还是 手动执行,IP地址并没有设置成功
只能 ifup eth0 来使得IP配置生效

/etc/network/interface

auto lo
iface lo inet loopback

allow-hotplug eht0
iface eth0 inet static

address 192.168.3.133
netmask 255.255.255.0
broadcast 192.168.3.255

gateway 192.168.3.1
发表于 2009-7-3 20:02:29 | 显示全部楼层
network 服务没启动?
回复 支持 反对

使用道具 举报

发表于 2009-7-3 20:40:44 | 显示全部楼层
最后少了行吧:
  1. auto eth0
复制代码

你看我的:
  1. # This file describes the network interfaces available on your system
  2. # and how to activate them. For more information, see interfaces(5).
  3. # The loopback network interface
  4. auto lo
  5. iface lo inet loopback
  6. # The primary network interface
  7. allow-hotplug eth0
  8. iface eth0 inet static
  9.         address 192.168.0.35
  10.         netmask 255.255.255.0
  11.         network 192.168.0.0
  12.         broadcast 192.168.0.255
  13.         # dns-* options are implemented by the resolvconf package, if installed
  14.         dns-nameservers 192.58.128.30
  15.         gateway 192.168.0.3
  16. iface dsl-provider inet ppp
  17. pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
  18. provider dsl-provider
  19. auto eth0
复制代码
回复 支持 反对

使用道具 举报

发表于 2009-7-3 22:31:34 | 显示全部楼层
allow-hotplug eht0

改成
auto eth0 看看
回复 支持 反对

使用道具 举报

发表于 2009-7-4 18:36:17 | 显示全部楼层
Post by blue_stone;2003351
allow-hotplug eht0

改成
auto eth0 看看

我以前这么改后,没插网线时,开机会不停尝试dhcp,等了五分钟才启动成功

Post by tigatron;2003351

最后少了行吧:
auto eth0


allow-hotplug eht0和auto eth0 能共存吗?
回复 支持 反对

使用道具 举报

发表于 2009-7-4 21:22:36 | 显示全部楼层
Post by stesen;2003551
我以前这么改后,没插网线时,开机会不停尝试dhcp,等了五分钟才启动成功





allow-hotplug eht0和auto eth0 能共存吗?


你的配置文件里“allow-hotplug eht0”是否是笔误?  eht0 应该是 eth0
回复 支持 反对

使用道具 举报

发表于 2009-7-4 21:51:15 | 显示全部楼层
可以共存(反正我的 /etc/network/interface 里它们是共存的,没出过什么问题)

现在指定了静态地址之后它应该不会再去尝试 DHCP 了吧
auto eth0 就是让它自动 up 的,没有别的功能
回复 支持 反对

使用道具 举报

发表于 2009-7-4 22:53:47 | 显示全部楼层
Post by slurker;2003591
你的配置文件里“allow-hotplug eht0”是否是笔误?  eht0 应该是 eth0


e,楼主笔误了,我直接cp的
回复 支持 反对

使用道具 举报

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

本版积分规则

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