前言:
当前看官们对“ubuntu网卡绑定切换”大概比较着重,小伙伴们都想要剖析一些“ubuntu网卡绑定切换”的相关文章。那么小编同时在网摘上收集了一些有关“ubuntu网卡绑定切换””的相关文章,希望小伙伴们能喜欢,朋友们一起来了解一下吧!NVIDIA VPI 网卡模式切换
查询主机 PCIe 是否 识别到网卡设备
root@ubuntu02:~# lspci |grep Mellanox04:00.0 Infiniband controller: Mellanox Technologies MT28908 Family [ConnectX-6]0e:00.0 Infiniband controller: Mellanox Technologies MT28908 Family [ConnectX-6]
查看某张网卡的详细信息,VPI adapter 支持IB和以太网 2种模式切换
root@ubuntu02:~# lspci -xxxvvv -s 0e:00.0 |grep -E "SN|PN|Product Name" Product Name: ConnectX-6 VPI adapter card, HDR IB (200Gb/s) and 200GbE, single-port QSFP56 [PN] Part number: MCX653105A-HDAT [SN] Serial number: MT2233J05410
查看网卡状态,Link layer有Infiniband和Ethernet 2种状态
root@ubuntu02:~# ibstatCA 'mlx5_0' CA type: MT4123 Number of ports: 1 Firmware version: 20.37.1014 Hardware version: 0 Node GUID: 0xb88303ffff9ec6dc System image GUID: 0xb88303ffff9ec6dc Port 1: State: Active Physical state: LinkUp Rate: 100 Base lid: 1 LMC: 0 SM lid: 1 Capability mask: 0xa651e84a Port GUID: 0xb88303ffff9ec6dc Link layer: InfiniBandCA 'mlx5_1' CA type: MT4123 Number of ports: 1 Firmware version: 20.37.1014 Hardware version: 0 Node GUID: 0xe8ebd30300fd0710 System image GUID: 0xe8ebd30300fd0710 Port 1: State: Active Physical state: LinkUp Rate: 100 Base lid: 5 LMC: 0 SM lid: 1 Capability mask: 0xa651e848 Port GUID: 0xe8ebd30300fd0710 Link layer: InfiniBand
如果只想查看某个网卡,可以按照以下方法:
root@ubuntu02:~# ibdev2netdev mlx5_0 port 1 ==> ibp4s0 (Up)mlx5_1 port 1 ==> ibp14s0 (Up)root@ubuntu02:~# ibstat mlx5_1CA 'mlx5_1' CA type: MT4123 Number of ports: 1 Firmware version: 20.37.1014 Hardware version: 0 Node GUID: 0xe8ebd30300fd0710 System image GUID: 0xe8ebd30300fd0710 Port 1: State: Active Physical state: LinkUp Rate: 100 Base lid: 5 LMC: 0 SM lid: 1 Capability mask: 0xa651e848 Port GUID: 0xe8ebd30300fd0710 Link layer: InfiniBand
开启mst 并查询网卡设备
root@ubuntu02:~# mst start Starting MST (Mellanox Software Tools) driver setLoading MST PCI module - Success[warn] mst_pciconf is already loaded, skippingCreate devicesUnloading MST PCI module (unused) - Successroot@ubuntu02:~# mst status -vMST modules:------------ MST PCI module is not loaded MST PCI configuration module loadedPCI devices:------------DEVICE_TYPE MST PCI RDMA NET NUMA ConnectX6(rev:0) /dev/mst/mt4123_pciconf1 0e:00.0 mlx5_1 net-ibp14s0 -1 ConnectX6(rev:0) /dev/mst/mt4123_pciconf0 04:00.0 mlx5_0 net-ibp4s0 -1
切换网卡模式操作,IB 模式LINK_TYPE_P1=1 ,以太网模式LINK_TYPE_P1=2
root@ubuntu02:~# mlxconfig -d /dev/mst/mt4123_pciconf1 set LINK_TYPE_P1=2Device #1:----------Device type: ConnectX6 Name: MCX653105A-HDA_AxDescription: ConnectX-6 VPI adapter card; HDR IB (200Gb/s) and 200GbE; single-port QSFP56; PCIe4.0 x16; tall bracket; ROHS R6Device: /dev/mst/mt4123_pciconf1Configurations: Next Boot New LINK_TYPE_P1 IB(1) ETH(2) Apply new Configuration? (y/n) [n] : yApplying... Done!-I- Please reboot machine to load new configurations.
重启主机,以使配置生效
root@ubuntu02:~# reboot
版权声明:
本站文章均来自互联网搜集,如有侵犯您的权益,请联系我们删除,谢谢。
标签: #ubuntu网卡绑定切换