바인딩에 ipv6 주소가 두 개 있는 이유는 무엇입니까?

바인딩에 ipv6 주소가 두 개 있는 이유는 무엇입니까?

아래에서 바인딩에 두 개의 ipv6 주소(2603:8080:4540:7cfb::13fc 및 2603:8080:4540:7cfb:4866:4bff:fe44:a988)가 있음을 확인할 수 있습니다. 이로 인해 systemd-networkd가 본드를 단일 인터페이스로 처리하지 못하고 있다고 생각됩니다.

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

5 links listed.

root@gentooserver /etc/systemd/network # networkctl status bond1
● 4: bond1                                                                               
                     Link File: /lib/systemd/network/99-default.link
                  Network File: /etc/systemd/network/master.network
                          Type: bond
                         State: routable (configured)
                  Online state: online                                                   
                        Driver: bonding
                    HW Address: 4a:66:4b:44:a9:88
                           MTU: 1500 (min: 68, max: 65535)
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
                          Mode: 802.3ad
                        Miimon: 10s
                       Updelay: 20s
                     Downdelay: 1min 20s
          Queue Length (Tx/Rx): 16/16
              Auto negotiation: no
                         Speed: 1Gbps
                        Duplex: full
                       Address: 10.0.0.46 (DHCP4 via 10.0.0.1)
                                2603:8080:4540:7cfb::13fc
                                2603:8080:4540:7cfb:4866:4bff:fe44:a988
                                fe80::4866:4bff:fe44:a988
                       Gateway: 10.0.0.1
                                fe80::96de:80ff:fea8:8096 (GIGA-BYTE TECHNOLOGY CO.,LTD.)
                                fe80::a263:91ff:fe7c:32a2 (NETGEAR)
                           DNS: 10.0.0.1
                                2603:8080:4540:7cfb:96de:80ff:fea8:8096
                Search Domains: dehnel.info
              Carrier Bound To: eno1
                                eno2
             Activation Policy: bound
           Required For Online: yes
               DHCP4 Client ID: IAID:0x8db4800/DUID
             DHCP6 Client IAID: 0x8db4800
             DHCP6 Client DUID: DUID-EN/Vendor:0000ab11abc83a896377c51f0000

Sep 29 17:35:35 gentooserver systemd-networkd[2235623]: bond1: Link UP
Sep 29 17:35:35 gentooserver systemd-networkd[2235623]: bond1: Gained carrier
Sep 29 17:35:35 gentooserver systemd-networkd[2235623]: bond1: Lost carrier
Sep 29 17:35:35 gentooserver systemd-networkd[2235623]: bond1: DHCPv6 lease lost
Sep 29 17:35:35 gentooserver systemd-networkd[2235623]: bond1: Link DOWN
Sep 29 17:35:38 gentooserver systemd-networkd[2235623]: bond1: Link UP
Sep 29 17:35:38 gentooserver systemd-networkd[2235623]: bond1: Gained carrier
Sep 29 17:35:40 gentooserver systemd-networkd[2235623]: bond1: Gained IPv6LL
Sep 29 17:35:42 gentooserver systemd-networkd[2235623]: bond1: DHCPv4 address 10.0.0.46/24 via 10.0.0.1
Sep 29 17:35:43 gentooserver systemd-networkd[2235623]: bond1: DHCPv6 address 2603:8080:4540:7cfb::13fc/128 (valid for 2h, preferred for 1h 15min)

root@gentooserver /etc/systemd/network # tail *
==> bond1.netdev <==
Name=bond1
Kind=bond

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

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

[Network]
Bond=bond1

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

[Network]
Bond=bond1

==> master.network <==
IPv6AcceptRA=yes

[Link]
Multicast=yes

[DHCPv4]
UseDomains=true

[IPv6AcceptRA]
UseDomains=yes

root@gentooserver /etc/systemd/network # ifconfig
bond1: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 10.0.0.46  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 fe80::4866:4bff:fe44:a988  prefixlen 64  scopeid 0x20<link>
        inet6 2603:8080:4540:7cfb::13fc  prefixlen 128  scopeid 0x0<global>
        inet6 2603:8080:4540:7cfb:4866:4bff:fe44:a988  prefixlen 64  scopeid 0x0<global>
        ether 4a:66:4b:44:a9:88  txqueuelen 1000  (Ethernet)
        RX packets 179330571  bytes 26132404875 (24.3 GiB)
        RX errors 0  dropped 914092  overruns 0  frame 0
        TX packets 1543646148  bytes 2313271455798 (2.1 TiB)
        TX errors 0  dropped 5 overruns 0  carrier 0  collisions 0

eno1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 4a:66:4b:44:a9:88  txqueuelen 1000  (Ethernet)
        RX packets 2371371  bytes 200785874 (191.4 MiB)
        RX errors 0  dropped 911837  overruns 0  frame 0
        TX packets 60668  bytes 7644831 (7.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xfae00000-fae7ffff  

eno2: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 4a:66:4b:44:a9:88  txqueuelen 1000  (Ethernet)
        RX packets 176959198  bytes 25931618869 (24.1 GiB)
        RX errors 0  dropped 869  overruns 0  frame 0
        TX packets 1543585480  bytes 2313263810967 (2.1 TiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xfad00000-fad7ffff  

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 3334928  bytes 580238437 (553.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3334928  bytes 580238437 (553.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wg0: flags=209<UP,POINTOPOINT,RUNNING,NOARP>  mtu 1420
        inet 192.168.2.1  netmask 255.255.255.0  destination 192.168.2.1
        inet6 fd86:ea04:1111::1  prefixlen 64  scopeid 0x0<global>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        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 18363  dropped 0 overruns 0  carrier 0  collisions 0

IP의 MAC 주소가 동일하므로 바인딩이 작동하고 있다고 생각됩니다.

ip -6 neigh show | grep 2603:8080:4540:7cfb::13fc
2603:8080:4540:7cfb::13fc dev wlp170s0 lladdr 4a:66:4b:44:a9:88 router REACHABLE
ip -6 neigh show | grep 2603:8080:4540:7cfb:4866:4bff:fe44:a988
2603:8080:4540:7cfb:4866:4bff:fe44:a988 dev wlp170s0 lladdr 4a:66:4b:44:a9:88 router REACHABLE

답변1

IPv6 접두사 길이는 64이므로 자율 주소 구성에 SLAAC를 사용할 수 있습니다. 분명히 IPv6 라우터 알림은 DHCPv6의 자율 구성 및 사용을 허용합니다.

rdisc6 -1 bond1시스템이 어떤 라우터 알림을 받고 있는지 확인하려면 실행해야 할 수도 있습니다 . 출력에는 Autonomous address conf.: Yes(SLAAC 주소 구성 활성화됨) 및 Stateful address conf. : Yes(DHCPv6 주소 구성 활성화됨)과 같은 줄이 포함될 수 있습니다.

그러면 이 예의 바인딩을 포함하여 각 인터페이스에 대해 두 개의 IPv6 주소가 자동으로 구성됩니다. 이는 IPv6에 대한 유효한 구성이지만 예상한 것과 다를 수도 있습니다.

2603:8080:4540:7cfb:4866:4bff:fe44:a988MAC 주소와 라우터에서 광고하는 접두사를 기반으로 생성된 EUI64 스타일 주소인 것으로 보입니다. :xSxx:xxff:fexx:xxxx... 형식으로 식별 할 수 있습니다 . 이 x숫자는 MAC 주소의 해당 숫자에서 파생되며 S 숫자의 두 번째 최하위 비트가 반전됩니다.

2603:8080:4540:7cfb::13fc그런 다음 DHCPv6에서 할당한 주소여야 합니다.

관련 정보