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
    • 最新
    • 标签
主页 / unix / 问题 / 512678
Accepted
Gooberpatrol66
Gooberpatrol66
Asked: 2019-04-16 17:13:55 +0800 CST2019-04-16 17:13:55 +0800 CST 2019-04-16 17:13:55 +0800 CST

没有通过绑定的 IP4 连接;被列为“可路由”而不是“被奴役”的奴隶

  • 772

绑定设置:

root@gentooserver /etc/systemd/network # tail -n +1 *
==> bond1.netdev <==
[NetDev]
Name=bond1
Kind=bond

[Bond]
Mode=802.3ad
MIIMonitorSec=1s
LACPTransmitRate=fast
TransmitHashPolicy=layer2
UpDelaySec=2s
DownDelaySec=8s

==> bond1.network <==
[Match]
Name=bond1

[Network]
BindCarrier=eno1 eno2

==> eno1.network <==
[Match]
Name=eno1

[Network]
Bond=bond1
DHCP=no

==> eno2.network <==
[Match]
Name=eno2

[Network]
Bond=bond1
DHCP=no

==> master.network <==
[Match]
Name=bond1

[Network]
DHCP=yes
UseDNS=true 

绑定和两个从属被列为具有相同的 IP4 地址:

root@gentooserver /etc/systemd/network # ifconfig
bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST>  mtu 1500
        ether a6:9c:13:85:9a:c1  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond1: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 10.0.0.45  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 fe80::1974:cfdd:ab17:6686  prefixlen 64  scopeid 0x20<link>
        inet6 2605:6000:1020:395:93b1:9356:17cb:7937  prefixlen 64  scopeid 0x0<global>
        inet6 2605:6000:1020:395::13fc  prefixlen 128  scopeid 0x0<global>
        inet6 2605:6000:1020:395:4866:4bff:fe44:a988  prefixlen 64  scopeid 0x0<global>
        ether 4a:66:4b:44:a9:88  txqueuelen 1000  (Ethernet)
        RX packets 22160  bytes 2917664 (2.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7431  bytes 778961 (760.7 KiB)
        TX errors 0  dropped 1 overruns 0  carrier 0  collisions 0

eno1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        inet 10.0.0.45  netmask 255.255.255.0  broadcast 10.0.0.255
        ether 4a:66:4b:44:a9:88  txqueuelen 1000  (Ethernet)
        RX packets 9361  bytes 1339502 (1.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2928  bytes 147234 (143.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xfb200000-fb27ffff 

eno2: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        inet 10.0.0.45  netmask 255.255.255.0  broadcast 10.0.0.255
        ether 4a:66:4b:44:a9:88  txqueuelen 1000  (Ethernet)
        RX packets 12799  bytes 1578162 (1.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4503  bytes 631727 (616.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xfb100000-fb17ffff 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 3198  bytes 391535 (382.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3198  bytes 391535 (382.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ping4 不起作用,ping6 起作用:

root@gentooserver /etc/systemd/network # ping4 google.com
PING google.com (74.125.136.139) 56(84) bytes of data.
From gentooserver.dehnel.info (10.0.0.45) icmp_seq=1 Destination Host Unreachable
From gentooserver.dehnel.info (10.0.0.45) icmp_seq=2 Destination Host Unreachable
From gentooserver.dehnel.info (10.0.0.45) icmp_seq=3 Destination Host Unreachable
^C
--- google.com ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 67ms
pipe 4
root@gentooserver /etc/systemd/network # ping6 google.com
PING google.com(atl26s15-in-x0e.1e100.net (2607:f8b0:4002:812::200e)) 56 data bytes
64 bytes from atl26s15-in-x0e.1e100.net (2607:f8b0:4002:812::200e): icmp_seq=1 ttl=51 time=52.6 ms
64 bytes from atl26s15-in-x0e.1e100.net (2607:f8b0:4002:812::200e): icmp_seq=2 ttl=51 time=52.4 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2ms
rtt min/avg/max/mdev = 52.415/52.518/52.622/0.251 ms

从站被列为“可路由的”:

root@gentooserver /etc/systemd/network # networkctl
IDX LINK             TYPE               OPERATIONAL      SETUP     
  1 lo               loopback           carrier          unmanaged
  2 eno1             ether              routable         configured
  3 eno2             ether              routable         configured
  4 bond0            bond               no-carrier       unmanaged
  5 bond1            bond               routable         configured

5 links listed. 

根据文档,它们应该被列为“被奴役”:https ://www.freedesktop.org/software/systemd/man/networkctl.html

linux dhcp
  • 1 1 个回答
  • 90 Views

1 个回答

  • Voted
  1. Best Answer
    Gooberpatrol66
    2019-04-17T23:47:42+08:002019-04-17T23:47:42+08:00

    最简单的解决方案似乎是添加denyinterfaces eno*到 /etc/dhcpcd.conf。

    • 0

相关问题

  • 有没有办法让 ls 只显示某些目录的隐藏文件?

  • 使用键盘快捷键启动/停止 systemd 服务 [关闭]

  • 需要一些系统调用

  • astyle 不会更改源文件格式

  • 通过标签将根文件系统传递给linux内核

Sidebar

Stats

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

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve