代码之家  ›  专栏  ›  技术社区  ›  Wesley Schravendijk

创建ifcfg-eth1时没有合适的网络设备

  •  0
  • Wesley Schravendijk  · 技术社区  · 7 年前

    我需要你帮忙解决一些奇怪的问题 我们正在尝试在centos 7服务器上创建ifcfg-eth1网络设备。

    我们在ifcfg-eth1文件中使用以下信息;

    TYPE=Ethernet
    BOOTPROTO=static
    DEVICE=eth1
    ONBOOT=yes
    IPADDR=192.168.101.61
    NETMASK=255.255.255.0
    GATEWAY=192.168.100.1
    DNS1=8.8.8.8
    DNS2=8.8.4.4
    

    ifcfg-eth0的工作方式和它应该的一样,但是当我们创建ifcfg-eth1时,我们得到以下错误:;

    No suitable device found for this connection.
    

        Oct  5 10:38:09 switch-onpremis1 network: ループバックインターフェイスを呼び込み中 [  OK  ]
    Oct  5 10:38:09 switch-onpremis1 network: インターフェース enp029f2u1 を活性化中:  [  OK  ]
    Oct  5 10:38:10 switch-onpremis1 network: インターフェース eth0 を活性化中:  [  OK  ]
    Oct  5 10:38:10 switch-onpremis1 NetworkManager[665]: <info>  [1538703490.1107] audit: op="connection-activate" uuid="9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04" name="System eth1" result="fail" reason="No suitable device found for this connection."
    Oct  5 10:38:10 switch-onpremis1 network: インターフェース eth1 を活性化中:  エラー: 接続のアクティベーションに失敗: No suitable device found for this connection.
    Oct  5 10:38:10 switch-onpremis1 network: [失敗]
    Oct  5 10:38:10 switch-onpremis1 network: RTNETLINK answers: File exists
    Oct  5 10:38:10 switch-onpremis1 network: RTNETLINK answers: File exists
    Oct  5 10:38:10 switch-onpremis1 network: RTNETLINK answers: File exists
    Oct  5 10:38:10 switch-onpremis1 network: RTNETLINK answers: File exists
    Oct  5 10:38:10 switch-onpremis1 network: RTNETLINK answers: File exists
    Oct  5 10:38:10 switch-onpremis1 network: RTNETLINK answers: File exists
    Oct  5 10:38:10 switch-onpremis1 network: RTNETLINK answers: File exists
    Oct  5 10:38:10 switch-onpremis1 network: RTNETLINK answers: File exists
    Oct  5 10:38:10 switch-onpremis1 network: RTNETLINK answers: File exists
    Oct  5 10:38:10 switch-onpremis1 systemd: network.service: control process exited, code=exited status=1
    Oct  5 10:38:10 switch-onpremis1 systemd: Failed to start LSB: Bring up/down networking.
    Oct  5 10:38:10 switch-onpremis1 systemd: Unit network.service entered failed state.
    Oct  5 10:38:10 switch-onpremis1 systemd: network.service failed.
    

    有什么问题吗? 或者问题可能出在别的地方?

    我们对ifcfg-eth0的设置是;

    TYPE=Ethernet
    PROXY_METHOD=static
    BROWSER_ONLY=no
    BOOTPROTO=static
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    IPV6_ADDR_GEN_MODE=stable-privacy
    NAME=eth0
    UUID=f3d98d60-6062-4b70-a14c-7ac4040bd403
    DEVICE=eth0
    ONBOOT=yes
    IPADDR=192.168.100.60
    PREFIX=24
    GATEWAY=192.168.100.1
    DNS1=8.8.8.8
    

    谢谢你的建议。

    在过去的三天里,我们已经在同一个问题上苦苦挣扎。

    1 回复  |  直到 7 年前
        1
  •  0
  •   GoinOff    7 年前

    CentOS 7.x的网络已更改,请检查以下内容:

    阅读 3. And what if I want the old naming back?

    还有,看看 7. What have you done with ifconfig/netstat?

    https://wiki.centos.org/FAQ/CentOS7

    推荐文章