无法重新启动networking接口

我编辑了/etc/network/interfaces文件,并使用sudo /etc/init.d/networking restart

重新启动后, eth1接口设置不正确。 我需要一个硬重启来启用这个configuration。 同时命令行提示:正在运行/etc/init.d/networking restart已弃用,因为它可能不会再启用某些接口

我使用运行命令重新启动networking接口?

 auto eth1 iface eth1 inet static address 192.168.1.87 netmask 255.255.255.0 gateway 192.168.1.1 

重新设置接口的“新”方法是通过ifdown和ifup命令:

 ifdown eth1 ifup eth1 

试试这个命令,看看eth1是否设置正确。 如果这仍然失败,你总是可以尝试检查你的日志文件,看看有没有可疑的事情发生在那里。