Debian 11(Bullseye)では、1つのIPアドレスしか表示/使用できません。

Debian 11(Bullseye)では、1つのIPアドレスしか表示/使用できません。

BusterからBullseyeにアップグレードした後、1つのインターフェイスにのみ有効なIPv4設定があります。

デュアルNIC Intel PCIxカードとオンボードRealTec NIC(現在のBIOSで無効)がありますが、NIC#2(および#3)を機能させることはできません。システムはカードを検出し、それに応じて名前を変更しますが、リンクを検出せずに割り当てられた後にIPアドレスを使用しません(静的/ dhcp)。

dmesgから:

[    1.004895] igb 0000:01:00.0: added PHC on eth0
[    1.004900] igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
[    1.004904] igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x4) 1c:fd:08:73:60:e0
[    1.004986] igb 0000:01:00.0: eth0: PBA No: E43709-006
[    1.004989] igb 0000:01:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)
[    1.096063] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    1.180841] igb 0000:01:00.1: added PHC on eth1
[    1.180845] igb 0000:01:00.1: Intel(R) Gigabit Ethernet Network Connection
[    1.180849] igb 0000:01:00.1: eth1: (PCIe:2.5Gb/s:Width x4) 1c:fd:08:73:60:e1
[    1.180931] igb 0000:01:00.1: eth1: PBA No: E43709-006
[    1.180934] igb 0000:01:00.1: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)
[    1.183527] igb 0000:01:00.0 enp1s0f0: renamed from eth0
.
[    1.204343] igb 0000:01:00.1 enp1s0f1: renamed from eth1
.
[    5.596440] igb 0000:01:00.0 enp1s0f0: igb: enp1s0f0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[    5.596675] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0f0: link becomes ready

どちらのインターフェイスも /etc/network/interfaces に設定されています。

auto enp1s0f0
allow-hotplug enp1s0f0
iface enp1s0f0 inet static
address 192.168.22.1
netmask 255.255.255.0
broadcast 192.168.22.255

auto enp1s0f1
allow-hotplug enp1s0f1
iface enp1s0f1 inet dhcp

ifconfig /ip a は lo と enp1s0f0 のみを報告します。

enp1s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.22.1  netmask 255.255.255.0  broadcast 192.168.22.255
.
.

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
.
.

dhclientがenp1s0f1を起動しましたが:

Sep 18 11:54:17 vile dhclient[529]: Listening on LPF/enp1s0f1/1c:fd:08:73:60:e1
Sep 18 11:54:17 vile sh[529]: Listening on LPF/enp1s0f1/1c:fd:08:73:60:e1
Sep 18 11:54:17 vile sh[529]: Sending on   LPF/enp1s0f1/1c:fd:08:73:60:e1
Sep 18 11:54:17 vile sh[529]: Sending on   Socket/fallback
Sep 18 11:54:17 vile sh[529]: DHCPDISCOVER on enp1s0f1 to 255.255.255.255 port 67 interval 3
Sep 18 11:54:17 vile sh[529]: send_packet: Network is down
Sep 18 11:54:17 vile sh[529]: dhclient.c:2446: Failed to send 300 byte long packet over enp1s0f1 interface.

ifupは言った:

#> ifup enp1s0f1
ifup: interface enp1s0f1 already configured

インターフェイス名を指定すると、カードに関する情報が表示されます。

#> ifconfig enp1s0f1 
enp1s0f1: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 1c:fd:08:73:60:e1  txqueuelen 1000  (Ethernet)
.
.

インターフェイスを手動で上げ、

#> ifconfig enp1s0f1 up

インターフェイスのdhcpアドレスを提供します。

Sep 18 12:45:35 vile kernel: [ 3080.994947] igb 0000:01:00.1 enp1s0f1: igb: enp1s0f1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
Sep 18 12:45:35 vile kernel: [ 3080.995217] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0f1: link becomes ready
Sep 18 12:45:37 vile ntpd[801]: bind(28) AF_INET6 fe80::1efd:8ff:fe73:60e1%3#123 flags 0x11 failed: Cannot assign requested address
Sep 18 12:45:37 vile ntpd[801]: unable to create socket on enp1s0f1 (11) for fe80::1efd:8ff:fe73:60e1%3#123
Sep 18 12:45:37 vile ntpd[801]: failed to init interface for address fe80::1efd:8ff:fe73:60e1%3
Sep 18 12:45:37 vile dhclient[2556]: DHCPDISCOVER on enp1s0f1 to 255.255.255.255 port 67 interval 3
Sep 18 12:45:37 vile dhclient[2556]: DHCPOFFER of 10.0.1.2 from 10.0.1.1
Sep 18 12:45:37 vile dhclient[2556]: DHCPREQUEST for 10.0.1.2 on enp1s0f1 to 255.255.255.255 port 67
Sep 18 12:45:37 vile dhclient[2556]: DHCPACK of 10.0.1.2 from 10.0.1.1
Sep 18 12:45:37 vile dhclient[2556]: bound to 10.0.1.2 -- renewal in 33797 seconds.

ただし、ifconfigはまだIPv4アドレスを表示しません。

enp1s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::1efd:8ff:fe73:60e1  prefixlen 64  scopeid 0x20<link>
        ether 1c:fd:08:73:60:e1  txqueuelen 1000  (Ethernet)

そして、iproute2では、ルーティング情報は表示または使用されません。

#> ip ro ls
0.0.0.0/1 via 10.251.4.1 dev tun9
default via 192.168.22.254 dev enp1s0f0
10.251.4.0/24 dev tun9 proto kernel scope link src 10.251.4.77
128.0.0.0/1 via 10.251.4.1 dev tun9
155.4.89.151 via 192.168.22.254 dev enp1s0f0
192.168.22.0/24 dev enp1s0f0 proto kernel scope link src 192.168.22.1

#> ip ro get 10.0.1.1
10.0.1.1 via 10.251.4.1 dev tun9 src 10.251.4.77 uid 0
    cache

tcpdump はインターフェイスにトラフィックを表示します。

オンボードRealTec-nicを使用して、同じ動作で同じ手順を試しました。また、古いBuster-kernel(Linuxバージョン4.19.0-16-amd64([Eメール保護])(gccバージョン8.3.0(Debian 8.3.0-6))#1 SMP Debian 4.19.181-1(2021-03-19))

ティア/ジョン

ベストアンサー1

回避策として、NetworkManager(cli-version:))を使用してセカンダリネットワークカードを管理しました。

デバイス enp1s0f0 は /etc/network/interfaces で構成されなくなり、NetworkManager デーモンはこのインターフェイスを自動的に管理します。

#> nmcli device 
DEVICE    TYPE      STATE                   CONNECTION
enp1s0f1  ethernet  connected               Wired connection 1
enp1s0f0  ethernet  unmanaged               --
lo        loopback  unmanaged               --

これで、ifconfig /ip aは#> ifconfig enp1s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.22.1 netmask 255.255.255.0 Broadcast 192.1. 。 。

enp1s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet xxx.xxx.xxx.xxx  netmask 255.255.255.192  broadcast xxx.xxx.xxx.255
.
.
.

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0

iproute2も満足しています:

#> ip ro ls
0.0.0.0/1 via 10.251.3.1 dev tun9
default via xxx.xxx.xxx.193 dev enp1s0f1 proto dhcp metric 100
10.251.3.0/24 dev tun9 proto kernel scope link src 10.251.3.50
xxx.xxx.xxx.192/26 dev enp1s0f1 proto kernel scope link src xxx.xxx.xxx.213 metric 100
128.0.0.0/1 via 10.251.3.1 dev tun9
192.168.22.0/24 dev enp1s0f0 proto kernel scope link src 192.168.22.1

そして、インターフェイスはNetworkManagerを介してDHCPアドレスを受信します。

Dec  7 15:38:29 host NetworkManager[615]: <info>  [1638887909.8445] dhcp4 (enp1s0f1): state changed extended -> extended, address=xxx.xxx.xxx.213

したがって、「正しい」ソリューションを待っている間、この方法を回避策として使用しました。

//男

おすすめ記事