LinuxSir.cn,穿越时空的Linuxsir!

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

默认开机 无法自动获取 DHCP ip 地址

[复制链接]
发表于 2011-6-3 21:32:43 | 显示全部楼层 |阅读模式
各位兄台,昨天晚上安装的 squeeze。默认开机发现 网卡没有启动

# ifconfig 显示为空
使用 ifconfig eth0 up && dhclient eth0 手动开启 网卡
获取 ip 地址

我的 /etc/network/interfaces

  1. auto lo
  2. iface lo inet loopback

  3. auto eth0
  4. iface eht0 inet dhcp
复制代码


$ dmesg |grep eth

  1. [    3.432380] 0000:00:19.0: eth0: (PCI Express:2.5GB/s:Width x1) f0:4d:a2:34:c2:97
  2. [    3.432382] 0000:00:19.0: eth0: Intel(R) PRO/1000 Network Connection
  3. [    3.432413] 0000:00:19.0: eth0: MAC: 8, PHY: 8, PBA No: 2011ff-0ff
  4. [  261.116523] ADDRCONF(NETDEV_UP): eth0: link is not ready
  5. [  262.716754] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None
  6. [  262.716757] 0000:00:19.0: eth0: 10/100 speed: disabling TSO
  7. [  262.717155] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
  8. [  272.980254] eth0: no IPv6 routers present
复制代码



$ update-rc.d networking defaults

  1. update-rc.d: using dependency based boot sequencing
  2. update-rc.d: warning: networking start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (S)
  3. update-rc.d: warning: networking stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (0 6)
复制代码


谢谢各位,兄台了@
发表于 2011-6-4 09:53:00 | 显示全部楼层
在 /etc/network/interfaces 里用 gateway 添加你的路由网关看下?

或者把
auto eth0
iface eht0 inet dhcp
屏蔽,换成:
allow-hotplug eth0

不然就把启停网卡的脚本放到 rc.d 里随开机启动。
回复 支持 反对

使用道具 举报

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

本版积分规则

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