본딩을 통한 IP4 연결은 "노예화" 대신 "라우팅 가능"으로 표시됩니다.

본딩을 통한 IP4 연결은 "노예화" 대신 "라우팅 가능"으로 표시됩니다.

본드 설정:

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

답변1

가장 쉬운 해결책은 /etc/dhcpcd.conf에 추가하는 것 같습니다 denyinterfaces eno*.

관련 정보