Le BGP est un protocole de routage dynamique qui se base historiquement sur la confiance. En théorie, n’importe qui peut plus ou moins annoncer n’importe quoi, et ça sera pris en compte. En pratique, les peerings BGP sont protégés par des prefix-lists afin de ne propager que ce …
Installer des optiques 10G ZR directement dans une carte réseau PCI
Dans un contexte de FAI associatif comme grifon on cherche à vraiment limiter les coûts. Cela nous amène à des architectures où des machines peuvent faire à la fois routeur et serveur. C’est le cas de la machine que nous avons à TH2 : grifon la partage avec stolon afin de diviser par deux le prix du U (qui est trois fois celui de Rennes, mais c’est normal c’est pas les mêmes DCs non plus). Cette machine a donc deux fonctions :
- recevoir les liens des différents FAIs
- héberger les routeurs virtualisés des dits FAIs
- un 10G BiDi pour une porte de collecte qui sert à recevoir les FTTH de stolon et grifon et un L2 vers Pau pour Stolon
- un 10G LR qui porte un transit pour stolon et grifon et un L2 vers Rennes pour grifon
- un 1G cuivre qui sert à avoir un peering intra-baie vers un autre réseau sans perdre de précieux ports 10G
- un 10G ZR qui portera un autre transit et un autre L2 vers Rennes pour grifon afin de redonder celui déjà en place
Donc en gros : on arrive à avoir une cross-co dans TH2 à 2 € au lieu de devoir payer les FAS et le récurrent si nous avions utilisé du LR ou du BiDi.
Tout cela est bien joli sur le papier, mais il faut maintenant insérer ces optiques 10G DWDM ZR dans une carte qui en veut bien. En effet, les optiques classiques de datacenter (donc SR ou LR) consomment moins d’un watt, et les cartes ont donc un refroidissement qui va avec. Quand on branche une optique ZR qui consomme trois watts sur une bien connue X510, même avec les options kernel pour autoriser tout le monde, le driver dit non avec ce message très reconnaissable :
[ 389.330803] ixgbe 0000:03:00.0: failed to initialize because an unsupported SFP+ module type was detected.
[ 389.330805] ixgbe 0000:03:00.0: Reload the driver after installing a supported module.
Alors qu’une optique ER sur le port d’à côte fonctionne :
[ 389.330813] ixgbe 0000:03:00.1 enp3s0f0: detected SFP+: 65535
Si on regarde très rapidement le code d’ixgbe, on remarque que ça supporte les DAC,
le SR, le LR et basta ; par contre pourquoi l’optique ER n’a pas été
rejetée ça je ne sais pas.
Ici on peut donc être arrangeant et re-coder l’EEPROM de l’optique DWDM
pour faire croire à la carte que c’est du LR et ça fonctionnerait, au
moins dans l’immédiat. Mais comme je ne sais pas à quel point refroidir
trois fois plus de puissance que prévu va endommager la carte ou
l’optique, j’ai préféré trouver une carte qui supporte bien ces optiques.
Je me suis donc penché sur les documentations techniques des cartes les plus connues du marché afin d’en trouver qui sont prévues pour le ZR, c’était le grand fun. Mais j’ai fini par en ressortir deux :
- Mellanox ConnectX-3 Pro (MCX312B-XCCS)
- QLogic 57810
Lors de mon premier essai avec la carte Mellanox je me suis retrouvé avec
ce message fort peu plaisant : mlx4_core 0000:03:00.0:
MLX4_CMD_MAD_IFC Get Module ID attr(ff60) port(1) i2c_addr(50) offset(0)
size(1): Response Mad Status(21c) - operation not supported for this port
(the port is of type CX4 or internal)
. Mes recherches sur le web
concordaient toutes vers des situations où des gens tentaient de mettre en
place du SR-IOV. Il n’y a aucune chance que nous en ayons besoin ici, je
l’ai donc désactivé et là nous avons un dmesg vachement plus engageant :
[ 6.714162] pci 0000:03:00.0: [15b3:1007] type 00 class 0x020000 PCIe Endpoint
[ 6.724165] pci 0000:03:00.0: BAR 0 [mem 0x92700000-0x927fffff 64bit]
[ 6.730723] pci 0000:03:00.0: BAR 2 [mem 0x91000000-0x917fffff 64bit pref]
[ 6.740902] pci 0000:03:00.0: ROM [mem 0xfff00000-0xffffffff pref]
[ 8.147183] pci 0000:03:00.0: ROM [mem 0xfff00000-0xffffffff pref]: can't claim; no compatible bridge window
[ 8.304334] pci 0000:03:00.0: ROM [mem size 0x00100000 pref]: can't assign; no space
[ 8.313109] pci 0000:03:00.0: ROM [mem size 0x00100000 pref]: failed to assign
[ 15.769296] mlx4_core: Mellanox ConnectX core driver v4.0-0
[ 15.769334] mlx4_core: Initializing 0000:03:00.0
[ 21.746373] mlx4_core 0000:03:00.0: DMFS high rate steer mode is: disabled performance optimized steering
[ 21.746692] mlx4_core 0000:03:00.0: 63.008 Gb/s available PCIe bandwidth (8.0 GT/s PCIe x8 link)
[ 22.167339] mlx4_en: Mellanox ConnectX HCA Ethernet driver v4.0-0
[ 22.167586] mlx4_en 0000:03:00.0: Activating port:1
[ 22.173307] mlx4_en: 0000:03:00.0: Port 1: Using 32 TX rings
[ 22.173315] mlx4_en: 0000:03:00.0: Port 1: Using 16 RX rings
[ 22.173522] mlx4_en: 0000:03:00.0: Port 1: Initializing port
[ 22.173925] mlx4_en 0000:03:00.0: registered PHC clock
[ 22.174825] mlx4_en 0000:03:00.0: Activating port:2
[ 22.178881] mlx4_en: 0000:03:00.0: Port 2: Using 32 TX rings
[ 22.178889] mlx4_en: 0000:03:00.0: Port 2: Using 16 RX rings
[ 22.179045] mlx4_en: 0000:03:00.0: Port 2: Initializing port
[ 22.179318] mlx4_ib_probe: mlx4_ib: Mellanox ConnectX InfiniBand driver v4.0-0
[ 22.180991] mlx4_ib_probe: counter index 2 for port 1 allocated 1
[ 22.180997] mlx4_ib_probe: counter index 3 for port 2 allocated 1
[ 22.191166] mlx4_core 0000:03:00.0 enp3s0: renamed from eth0
[ 22.191452] mlx4_core 0000:03:00.0 enp3s0d1: renamed from eth1
[ 3112.382336] mlx4_core 0000:03:00.0: MLX4_CMD_MAD_IFC Get Module ID attr(ff60) port(2) i2c_addr(50) offset(0) size(1): Response Mad Status(31c) - cable is not connected
[ 3224.605811] mlx4_en: enp3s0: Steering Mode 1
[ 3224.632338] mlx4_en: enp3s0: Link Down
Le fait que le lien soit down est normal, il n’y avait rien de branché au bout au moment de l’insertion de l’optique, forcément. Mais j’ai testé et le lien monte. Et l’optique est bien détecté :
asbr-th2 ~ # ethtool -m enp3s0
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x07 (LC)
Transceiver codes : 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Transceiver type : 10G Ethernet: 10G Base-ER [SFF-8472 rev10.4 onwards]
Encoding : 0x06 (64B/66B)
BR, Nominal : 10300MBd
Rate identifier : 0x00 (unspecified)
Length (SMF,km) : 80km
Length (SMF) : 25500m
Length (50um) : 0m
Length (62.5um) : 0m
Length (Copper) : 0m
Length (OM3) : 0m
Laser wavelength : 1554nm
Vendor name : FLEXOPTIX
Vendor OUI : 00:00:00
Vendor PN : P.1696.23.29
Vendor rev : A
Option values : 0x00 0x1a
Option : RX_LOS implemented
Option : TX_FAULT implemented
Option : TX_DISABLE implemented
BR margin, max : 0%
BR margin, min : 0%
Vendor SN : F78GJ6W
Date code : 170511
Optical diagnostics support : Yes
Laser bias current : 96.464 mA
Laser output power : 1.2225 mW / 0.87 dBm
Receiver signal average optical power : 0.1017 mW / -9.93 dBm
Module temperature : 50.74 degrees C / 123.34 degrees F
Module voltage : 3.2214 V
Alarm/warning flags implemented : Yes
Laser bias current high alarm : Off
Laser bias current low alarm : Off
Laser bias current high warning : Off
Laser bias current low warning : Off
Laser output power high alarm : Off
Laser output power low alarm : Off
Laser output power high warning : Off
Laser output power low warning : Off
Module temperature high alarm : Off
Module temperature low alarm : Off
Module temperature high warning : Off
Module temperature low warning : Off
Module voltage high alarm : Off
Module voltage low alarm : Off
Module voltage high warning : Off
Module voltage low warning : Off
Laser rx power high alarm : Off
Laser rx power low alarm : On
Laser rx power high warning : Off
Laser rx power low warning : On
Laser bias current high alarm threshold : 120.000 mA
Laser bias current low alarm threshold : 30.000 mA
Laser bias current high warning threshold : 110.000 mA
Laser bias current low warning threshold : 35.000 mA
Laser output power high alarm threshold : 5.0119 mW / 7.00 dBm
Laser output power low alarm threshold : 0.6310 mW / -2.00 dBm
Laser output power high warning threshold : 3.9811 mW / 6.00 dBm
Laser output power low warning threshold : 0.7943 mW / -1.00 dBm
Module temperature high alarm threshold : 90.00 degrees C / 194.00 degrees F
Module temperature low alarm threshold : -15.00 degrees C / 5.00 degrees F
Module temperature high warning threshold : 85.00 degrees C / 185.00 degrees F
Module temperature low warning threshold : -10.00 degrees C / 14.00 degrees F
Module voltage high alarm threshold : 3.6000 V
Module voltage low alarm threshold : 3.0000 V
Module voltage high warning threshold : 3.5000 V
Module voltage low warning threshold : 3.0500 V
Laser rx power high alarm threshold : 0.1585 mW / -8.00 dBm
Laser rx power low alarm threshold : 0.0013 mW / -28.86 dBm
Laser rx power high warning threshold : 0.1259 mW / -9.00 dBm
Laser rx power low warning threshold : 0.0016 mW / -27.96 dBm
La QLogic 57810 n’a posé absolument aucun souci. La seule surprise est que
le driver utilisé est le bnx2x
normalement pour les cartes
Broadcom. Je suppose qu’il s’agît d’un rebranding.
[ 2.799491] pci 0000:08:00.0: [14e4:168e] type 00 class 0x020000 PCIe Endpoint
[ 2.807461] pci 0000:08:00.0: BAR 0 [mem 0xd5000000-0xd57fffff 64bit pref]
[ 2.815432] pci 0000:08:00.0: BAR 2 [mem 0xd5800000-0xd5ffffff 64bit pref]
[ 2.823432] pci 0000:08:00.0: BAR 4 [mem 0xd77e0000-0xd77effff 64bit pref]
[ 2.831431] pci 0000:08:00.0: ROM [mem 0xdb000000-0xdb07ffff pref]
[ 2.838495] pci 0000:08:00.0: PME# supported from D0 D3hot D3cold
[ 2.845560] pci 0000:08:00.1: [14e4:168e] type 00 class 0x020000 PCIe Endpoint
[ 2.853460] pci 0000:08:00.1: BAR 0 [mem 0xd6000000-0xd67fffff 64bit pref]
[ 2.861432] pci 0000:08:00.1: BAR 2 [mem 0xd6800000-0xd6ffffff 64bit pref]
[ 2.868432] pci 0000:08:00.1: BAR 4 [mem 0xd77f0000-0xd77fffff 64bit pref]
[ 2.876433] pci 0000:08:00.1: ROM [mem 0xdb000000-0xdb07ffff pref]
[ 2.883492] pci 0000:08:00.1: PME# supported from D0 D3hot D3cold
[ 4.831134] pci 0000:08:00.1: ROM [mem 0xdb000000-0xdb07ffff pref]: can't claim; address conflict with 0000:08:00.0 [mem 0xdb00000]
[ 4.932854] pci 0000:08:00.1: ROM [mem 0xdb080000-0xdb0fffff pref]: assigned
[ 5.662873] pci 0000:08:00.0: Adding to iommu group 19
[ 5.668763] pci 0000:08:00.1: Adding to iommu group 19
[ 7.216257] bnx2x 0000:08:00.0: msix capability found
[ 7.228769] bnx2x 0000:08:00.0: part number 0-0-0-0
[ 7.843878] bnx2x 0000:08:00.0: 32.000 Gb/s available PCIe bandwidth (5.0 GT/s PCIe x8 link)
[ 7.853509] bnx2x 0000:08:00.1: msix capability found
[ 7.859503] bnx2x 0000:08:00.1: part number 0-0-0-0
[ 7.993891] bnx2x 0000:08:00.1: 32.000 Gb/s available PCIe bandwidth (5.0 GT/s PCIe x8 link)
[ 8.063617] bnx2x 0000:08:00.0 enp8s0f0: renamed from eth0
[ 8.077124] bnx2x 0000:08:00.1 enp8s0f1: renamed from eth1
[ 127.745440] bnx2x 0000:08:00.0 enp8s0f0: using MSI-X IRQs: sp 47 fp[0] 49 ... fp[2] 51
[ 127.877574] bnx2x 0000:08:00.0 enp8s0f0: Warning: Unqualified SFP+ module detected, Port 0 from OEM part number SFP-10G-SR-CO
[ 135.314517] bnx2x 0000:08:00.1 enp8s0f1: using MSI-X IRQs: sp 53 fp[0] 55 ... fp[2] 58
[ 190.032144] bnx2x 0000:08:00.1 enp8s0f1: Warning: Unqualified SFP+ module detected, Port 0 from FLEXOPTIX part number P.1696.23.29
[ 625.652691] bnx2x 0000:08:00.1 enp8s0f1: NIC Link is Up, 10000 Mbps full duplex, Flow control: ON - receive & transmit
[ 2751.353848] bnx2x 0000:08:00.1 enp8s0f1: NIC Link is Down
Et le DOM fonctionne également :
root@hv-infra:~# ethtool -m enp8s0f1
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x07 (LC)
Transceiver codes : 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Transceiver type : 10G Ethernet: 10G Base-ER [SFF-8472 rev10.4 onwards]
Encoding : 0x06 (64B/66B)
BR, Nominal : 10300MBd
Rate identifier : 0x00 (unspecified)
Length (SMF,km) : 80km
Length (SMF) : 25500m
Length (50um) : 0m
Length (62.5um) : 0m
Length (Copper) : 0m
Length (OM3) : 0m
Laser wavelength : 1554nm
Vendor name : FLEXOPTIX
Vendor OUI : 00:00:00
Vendor PN : P.1696.23.29
Vendor rev : A
Option values : 0x00 0x1a
Option : RX_LOS implemented
Option : TX_FAULT implemented
Option : TX_DISABLE implemented
BR margin, max : 0%
BR margin, min : 0%
Vendor SN : F78GJ6X
Date code : 170513
Optical diagnostics support : Yes
Laser bias current : 84.782 mA
Laser output power : 1.1501 mW / 0.61 dBm
Receiver signal average optical power : 0.0887 mW / -10.52 dBm
Module temperature : 48.47 degrees C / 119.25 degrees F
Module voltage : 3.2206 V
Alarm/warning flags implemented : Yes
Laser bias current high alarm : Off
Laser bias current low alarm : Off
Laser bias current high warning : Off
Laser bias current low warning : Off
Laser output power high alarm : Off
Laser output power low alarm : Off
Laser output power high warning : Off
Laser output power low warning : Off
Module temperature high alarm : Off
Module temperature low alarm : Off
Module temperature high warning : Off
Module temperature low warning : Off
Module voltage high alarm : Off
Module voltage low alarm : Off
Module voltage high warning : Off
Module voltage low warning : Off
Laser rx power high alarm : Off
Laser rx power low alarm : Off
Laser rx power high warning : Off
Laser rx power low warning : Off
Laser bias current high alarm threshold : 120.000 mA
Laser bias current low alarm threshold : 30.000 mA
Laser bias current high warning threshold : 110.000 mA
Laser bias current low warning threshold : 35.000 mA
Laser output power high alarm threshold : 5.0119 mW / 7.00 dBm
Laser output power low alarm threshold : 0.6310 mW / -2.00 dBm
Laser output power high warning threshold : 3.9811 mW / 6.00 dBm
Laser output power low warning threshold : 0.7943 mW / -1.00 dBm
Module temperature high alarm threshold : 90.00 degrees C / 194.00 degrees F
Module temperature low alarm threshold : -15.00 degrees C / 5.00 degrees F
Module temperature high warning threshold : 85.00 degrees C / 185.00 degrees F
Module temperature low warning threshold : -10.00 degrees C / 14.00 degrees F
Module voltage high alarm threshold : 3.6000 V
Module voltage low alarm threshold : 3.0000 V
Module voltage high warning threshold : 3.5000 V
Module voltage low warning threshold : 3.0500 V
Laser rx power high alarm threshold : 0.1585 mW / -8.00 dBm
Laser rx power low alarm threshold : 0.0013 mW / -28.86 dBm
Laser rx power high warning threshold : 0.1259 mW / -9.00 dBm
Laser rx power low warning threshold : 0.0016 mW / -27.96 dBm
Je ne sais pas pourquoi le DOM remonte les optiques comme étant des ER
dans les deux cas, mais en tous cas les liens montent avec des
atténuateurs 10 dB et ce sont bien des étiquettes ZR. Donc j’aurais
tendance à dire que c’est juste une affaire de recodage d’EEPROM pour
qu’elles soient acceptées par des routeurs tatillons (ces optiques ont
déjà eu une autre vie).
En tous cas, si vous avez besoin d’avoir du ZR sur un serveur, mettez y
une carte Mellanox ConnectX-3 Pro ou une QLogic 57810. Par acquis de
conscience j’ai également testé des Chelsio que j’avais chez moi, mais
aucune n’a accepté les optiques ZR. J’ai également testé une Mellanox
ConnectX-4 Lx 25G qui accepte aussi des optiques 10G. Le LR fonctionnait
mais pas le ZR, alors que le 25G consomme plus que le 10G.