在 Mellanox ConnectX-4 Lx 上测试 SR-IOV 后,只有 DHCP 有效

在 Mellanox ConnectX-4 Lx 上测试 SR-IOV 后,只有 DHCP 有效

我正在关注Proxmox 指南为我的 NIC 启用 PCIe 直通和 SR-IOV,因为我在 VM 中将 Vyos 作为路由器运行。但是,撤消所有更改后,NIC 不再工作。直接连接另一台计算机时,似乎唯一起作用的是 DHCP(而不是 DHCPv6)。我怀疑这可能是因为我设置了 DHCP 中继,因为我连接到的端口具有与 DHCP 服务器(12)不同的 VLAN(10)。以下是来自的输出tcpdump -e

98:03:9b:b7:f7:ea > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 362: vlan 10, p 0, ethertype IPv4 (0x0800), 10.10.10.115.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 98:03:9b:b7:f7:ea, length 316
fe:63:6d:d4:da:18 > 2a:a2:54:7e:47:45, ethertype 802.1Q (0x8100), length 373: vlan 12, p 0, ethertype IPv4 (0x0800), 10.10.12.1.67 > 10.10.12.5.67: BOOTP/DHCP, Request from 98:03:9b:b7:f7:ea, length 327
fe:63:6d:d4:da:18 > 98:03:9b:b7:f7:ea, ethertype 802.1Q (0x8100), length 395: vlan 10, p 0, ethertype IPv4 (0x0800), 10.10.10.1.67 > 10.10.10.115.68: BOOTP/DHCP, Reply, length 349

我还尝试清除服务器上的 DHCP 租约,但它仍然有效并分配了一个新地址。

从 DHCP 获取地址后,我无法从 10.10.10.115 ping 10.10.10.1 处的网关。我尝试arping从路由器进行操作,但没有成功。但是,当使用 wireshark 检查流量时,我可以看到 10.10.10.1 之后的 ARP 回复,该回复来自拥有 10.10.10.1 的人。客户端 (98:03:9b:b7:f7:ea) 在路由器 ARP 表中显示为过时,但从客户端来看一切正常。

我还将 NIC 上的另一个端口设置为中继,并将其连接到交换机,但在这种情况下,甚至 DHCP 也不起作用。主板上另一个 1G NIC 与 Proxmox 主机上的配置相同,工作正常。

我尝试在启动菜单中将 NIC 重置为默认值,并使用mlxconfig -d <dev> reset。在使用 SR-IOV 之前,它按预期工作,所以我猜我搞砸了一些东西,但此时我不确定是什么。

这是我/etc/network/interfaces从 Proxmox 主机收到的

auto lo
iface lo inet loopback

auto enp39s0
iface enp39s0 inet manual
        ovs_type OVSPort
        ovs_bridge vmbr0
#Trunk 1G

auto enp45s0f0np0
iface enp45s0f0np0 inet manual
        ovs_type OVSPort
        ovs_bridge vmbr0
#Trunk 25G

iface enp42s0f3u5u3c2 inet manual

auto enp38s0
iface enp38s0 inet manual
        ovs_type OVSPort
        ovs_bridge vmbr1
#WAN

auto enp45s0f1np1
iface enp45s0f1np1 inet manual
        ovs_type OVSPort
        ovs_bridge vmbr0
        ovs_options tag=10 vlan_mode=native-untagged
#Users

auto intport01
iface intport01 inet static
        address 10.10.16.30/24
        gateway 10.10.16.1
        ovs_type OVSIntPort
        ovs_bridge vmbr0
        ovs_options tag=16
#MGMT

auto vmbr0
iface vmbr0 inet manual
        ovs_type OVSBridge
        ovs_ports intport01 enp39s0 enp45s0f0np0 enp45s0f1np1
#Inside

auto vmbr1
iface vmbr1 inet manual
        ovs_type OVSBridge
        ovs_ports enp38s0
#WAN

enp45s0f1np1是 DHCP 工作的端口,enp45s0f0np0是非工作网卡上的另一个端口。在路由器上vmbr0添加为网卡,并在那里设置 VLAN。

相关内容