EosSdk
EosSdk copied to clipboard
Ethernet CFM
I am exploring if rolling my own simple continuity fault management (CFM) implementation using the following source and porting to EOS SDK will be viable. The source is at: https://github.com/vnrick/dot1ag-utils
As per their source and the presentation here (https://indico.cern.ch/event/159549/contributions/1405997/attachments/181787/255530/802.1ag.pdf) the package works on Arista just fine. I went to the trouble to compile it and it works. I can get CFM frames between two switches.
-bash-4.3# tcpdump -i po802 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on po802, link-type EN10MB (Ethernet), capture size 65535 bytes 15:54:40.114147 00:1c:73:e1:f8:89 (oui Arista Networks) > 00:1c:73:cf:e0:57 (oui Arista Networks), ethertype CFM (0x8902), length 64: CFMv0 Loopback Message, MD Level 0, length 50 15:54:41.114275 00:1c:73:e1:f8:89 (oui Arista Networks) > 00:1c:73:cf:e0:57 (oui Arista Networks), ethertype CFM (0x8902), length 64: CFMv0 Loopback Message, MD Level 0, length 50
Now the complicated bit. I want to be able to send the locally generated CFM frame into a VXLAN tunnel. Trying to use the source VLAN of the VXLAN tunnel yields no frame on the remote end. I used directflow to trap the CFM ethertype of 0x8902 to the CPU as a further test.
-bash-4.3# ./ethping -i vlan999 00:1c:73:cf:e0:57 Sending CFM LBM to 00:1c:73:cf:e0:57 Request timeout for 1833623530 Request timeout for 1833623531 Request timeout for 1833623532 Request timeout for 1833623533
BTW, I tested my POC on of the above code with EOS 4.17.0F using 7050X switches.
The CFM source implementation uses standard linux kernel interfaces to generate frames and libpcap to read them. This is clearly not going to scale, and I do not intend to create a vlan interface for every layer-2 connection through each switch.
So my questions are as follows:
Can the EOS SDK create layer-2 dataplane frames without having to create a kernel interface (interface vlan xxx)? Can the frames generated get encapsulated into a VXLAN tunnel? Can I read the frames on the kernel? Using directflow to program a flow for ethertype 0x8902 is OK. I need to read non-IP MAC level frames. Problem is that the CPU MAC address will be different to the CFM destination MAC of the interface so the frames will be dropped. I do not want to use PCAP to read the frames.
From reading through some of the EOS SDK examples it looks like there is only support for linux TCP/IP based interactions and no direct access to dataplane frames. I hope I am wrong.
Hi @richardeaxon - let me circulate this question with some of our Kernel & VXLAN folks, and see what we can come up with. In any case, it doesn't sound like you'll need any EOS SDK specific APIs here—hopefully we can come up with a solution that just uses linux APIs.