Wol*_*mec 12 networking debian
我有 Debian 6.0。在我的接口文件 ( /etc/network/interfaces) 中,我有以下几行:
auto eth0
iface eth0 inet static
address 192.168.0.8
netmask 255.255.255.0
gateway 192.168.0.1
Run Code Online (Sandbox Code Playgroud)
每次启动电脑,eth0都不行。
当我进入时ifconfig -a,eth0不是“up”和“running”。
我必须输入:
ifconfig eth0 up
/etc/init.d/networking restart
Run Code Online (Sandbox Code Playgroud)
......然后它就起作用了。
我必须如何更改配置才能eth0开始工作?
小智 9
将以下行添加到 /etc/network/interfaces :
allow-hotplug eth0
Run Code Online (Sandbox Code Playgroud)
来源:人机界面
以“allow-”开头的行用于标识应由各种子系统自动启动的接口。这可以使用诸如“ifup --allow=hotplug eth0 eth1”之类的命令来完成,如果eth0 或eth1 列在“allow-hotplug”行中,它只会显示eth0 或eth1。请注意,“allow-auto”和“auto”是同义词。
我必须如何更改配置才能在开始时有一个可用的“eth0” ?
每当我听到“一开始”,就会想起rc.local。
这实际上并不是解决您问题的直接答案,但您似乎在驱动程序方面遇到了一些困难。
为了快速修复,为什么不使用rc.local?如果您的问题通过每次启动时键入这两个命令得到解决,请将它们添加到/etc/rc.local.
为了深入解决您的问题,首先在执行其他操作之前执行以下操作:
apt-get update && apt-get upgrade
Run Code Online (Sandbox Code Playgroud)
我在回溯中也遇到了同样的问题,更新后解决了。显然这里讨论了相同的主题:Debian not running eth0 at boot
| 归档时间: |
|
| 查看次数: |
171558 次 |
| 最近记录: |