AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 976000
Accepted
Tim Altgeld
Tim Altgeld
Asked: 2019-07-20 15:27:12 +0800 CST2019-07-20 15:27:12 +0800 CST 2019-07-20 15:27:12 +0800 CST

network.service 在 Debian buster 中失败

  • 772

network.service 无法启动 eth0:2 和 eth0:3,但我的配置似乎正确。

我尝试了几件事,还将网卡从 ens3 重命名为 eth0

/etc/网络/接口:

auto lo
iface lo inet loopback

allow-hotplug eth0

auto eth0
iface eth0 inet static
    address xx.xxx.xxx.xxx/22
    gateway xx.xxx.xxx.x

allow-hotplug eth0:1
auto eth0:1
iface eth0:1 inet6 static
    address 2a03:xxxx:x:xxxx::1000/64
    gateway fe80::1

allow-hotplug eth0:2
iface eth0:2 inet6 static
    address 2a03:xxxx:x:xxxx::2000/64
    gateway fe80::1

allow-hotplug eth0:3
iface eth0:3 inet6 static
    address 2a03:xxxx:x:xxxx::3000/64
    gateway fe80::1

预期的:

启动时,eth0 和 eth0:1 会自动启动。

ifup eth0:2 和 ifup eth0:3 调出其他网卡

实际的:

ifup eth0:2
RTNETLINK answers: File exists
ifup: failed to bring up eth0:2

ifup eth0:3
RTNETLINK answers: File exists
ifup: failed to bring up eth0:3

它给出了一个错误,但尽管有错误,但适配器已加载并且 IPv6 正在工作。

另外,如果我添加

自动 eth0:2

自动 eth0:3

network.service 在启动时失败:


● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-07-19 20:29:26 CEST; 1min 21s ago
     Docs: man:interfaces(5)
  Process: 409 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
 Main PID: 409 (code=exited, status=1/FAILURE)
Jul 19 20:29:24 root systemd[1]: Starting Raise network interfaces...
Jul 19 20:29:24 root ifup[409]: ifup: waiting for lock on /run/network/ifstate.eth0
Jul 19 20:29:26 root ifup[409]: Waiting for DAD... Done
Jul 19 20:29:26 root ifup[409]: RTNETLINK answers: File exists
Jul 19 20:29:26 root ifup[409]: ifup: failed to bring up eth0:2
Jul 19 20:29:26 root ifup[409]: RTNETLINK answers: File exists
Jul 19 20:29:26 root ifup[409]: ifup: failed to bring up eth0:3
Jul 19 20:29:26 root systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Jul 19 20:29:26 root systemd[1]: networking.service: Failed with result 'exit-code'.
Jul 19 20:29:26 root systemd[1]: Failed to start Raise network interfaces.

尽管networking.service 失败,但所有IPv6 都在工作。

我不知道有什么问题。

networking
  • 1 1 个回答
  • 2711 Views

1 个回答

  • Voted
  1. Best Answer
    Michael Hampton
    2019-07-20T17:01:29+08:002019-07-20T17:01:29+08:00

    您正在尝试将过时的接口别名格式 ( eth0:x) 与 IPv6 一起使用,但这不起作用。这些实际上并不是独立的接口,而且从来都不是。还建议不要使用它们超过十年。你不应该这样做。(并且您应该忽略 Debian wiki 中关于此方法的长期过时警告。)

    正确的配置是将所有地址放在接口中eth0(或者,更确切地说,不再ens3应该如此eth0)。

    auto lo
    iface lo inet loopback
    
    allow-hotplug eth0
    
    auto eth0
    iface eth0 inet static
        address xx.xxx.xxx.xxx/22
        gateway xx.xxx.xxx.x
    
    iface eth0 inet6 static
        address 2a03:xxxx:x:xxxx::1000/64
        gateway fe80::1
    
    iface eth0 inet6 static
        address 2a03:xxxx:x:xxxx::2000/64
    
    iface eth0 inet6 static
        address 2a03:xxxx:x:xxxx::3000/64
    
    • 1

相关问题

  • 谁能指出我的 802.11n 范围扩展器?

  • 我怎样才能得到一个网站的IP地址?

  • 在一个 LAN 中使用两台 DHCP 服务器

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve