【问题标题】:IPstatic : don't seem to have all the variable for eth0IPstatic:似乎没有 eth0 的所有变量
【发布时间】:2014-04-11 18:09:21
【问题描述】:

我想为我的 debian 设置一个静态 ip:192.168.249.5

这是我的接口文件:/etc/network/interfaces

auto eth0
iface eth0 inet static
adress 192.168.249.5
netmask 255.255.255.0
gateway 192.168.152.255
dns-nameservers 192.168.249.5

当我这样做时:

/etc/init.d/networking stop
/etc/init.d/networking start

我有: 配置网络接口...似乎没有 eth0/inet 的所有变量。 启动 eth0 失败。

我不明白。

【问题讨论】:

    标签: static dns ip debian


    【解决方案1】:

    请查看documentation。您可能应该将“地址”写为“地址”以使其正常工作。您的网关地址也是不可能的。可能是254?

    【讨论】:

    • 您是否在网络中使用 255.255.0.0 (/16) 网络掩码(或者 152 只是一个错字)?如果不是,则当前设置无法访问网关(即使您将其更改为 254)。
    猜你喜欢
    • 2014-03-24
    • 2017-01-04
    • 1970-01-01
    • 1970-01-01
    • 2016-02-24
    • 1970-01-01
    • 1970-01-01
    • 2014-01-23
    • 1970-01-01
    相关资源
    最近更新 更多