Project

General

Profile

Actions

Feature #9093

closed

want basic utility for Ethernet level pong

Added by Robert Mustacchi almost 6 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
cmd - userland programs
Start date:
2018-02-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

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.

Actions #1

Updated by Electric Monk about 5 years ago

  • Status changed from New to Closed

git commit 2076885612f784f9ddfc09282d62518d0f9b2c4d

commit  2076885612f784f9ddfc09282d62518d0f9b2c4d
Author: Robert Mustacchi <rm@joyent.com>
Date:   2018-09-10T17:02:19.000Z

    9093 want basic utility for Ethernet level pong
    Reviewed by: Ryan Zezeski <ryan.zeseski@joyent.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF