Feature #9093

want basic utility for Ethernet level pong

Added by Robert Mustacchi 9 days ago.

Status:NewStart date:2018-02-10
Priority:NormalDue date:
Assignee:Robert Mustacchi% Done:

100%

Category:cmd - userland programs
Target version:-
Difficulty:Medium Tags:

Description

There have been various operational problems that have arisen where we've wanted to verify that we can send basic Ethernet level frames. Unfortunately, doing that is often tricky as we're trying to avoid relying on IP, because ARP and broadcast may be broken. What we've used in the past are a few one off programs that were written for fabric's development.

This adds a /usr/lib/dl/dlsend and its counterpart /usr/lib/dl/dlrecv which are small programs that send packets in one direction. dlsend sends on an interface to a target address once a second, and dlrecv, listens and prints them.

In the messages we encode a sequence number-like entry, the hostname, and a message that the other end expects.

Here's some output from the sending side:


[root@ivy /var/tmp]# ./dlsend -h
dlsend: Unknown option: -h
Usage: dlsend [-s sap] device target-mac
        -s sap  specify SAP to send on
You have new mail in /var/mail/root
[root@ivy /var/tmp]# ./dlsend e1000g0 0:25:90:d3:11:d2

And the receiving side:

[root@haswell /var/tmp]# ./dlrecv -h
dlrecv: Unknown option: -h
Usage: dlrecv [-s sap] device target-mac
        -s sap  specify SAP to send on
[root@haswell /var/tmp]# ./dlrecv igb1
Received Elbereth from 00:25:90:d3:11:d2 seq=1 host=ivy
Received Elbereth from 00:25:90:d3:11:d2 seq=2 host=ivy
Received Elbereth from 00:25:90:d3:11:d2 seq=3 host=ivy
Received Elbereth from 00:25:90:d3:11:d2 seq=4 host=ivy
Received Elbereth from 00:25:90:d3:11:d2 seq=5 host=ivy
Received Elbereth from 00:25:90:d3:11:d2 seq=6 host=ivy
...

This isn't being added to ping because it's designed to be a one way message. Looking at the other 'ping' style commands that exist, none of them really have this level of simple message / format.

Also available in: Atom