Giter VIP home page Giter VIP logo

etherp's Introduction

Ethernet Ping (Etherp)

This project allows you to generate and send Ethernet datagrams between two network interfaces. It is actually composed of two programs:

  • etherp-send -- in charge of sending Ethernet frames
  • etherp-recv -- in charge of receiving them

These two tools, used together, can help you to test an Ethernet link or a network driver by detecting loss of frames at different speeds. This is not actually a ping protocol as frames are transfered only on one way (there is no pong).

Let's consider the following test bench with two computers with their Network Interfaces (NIC) directly connected:

__________                __________
|        |                |        |
|  PC1 __|_____       ____|__ PC2  |
|______| NIC1 |-------| NIC2 |_____|
       '------'       '------'

etherp-send usage

etherp-send needs to be run as root (or at least with the CAP_NET_RAW capability) on the machine sending Ethernet frames (let's say PC1 with its MAC address being 00:24:e8:00:00:01):

etherp-send -I eth0 00:24:e8:00:00:01

For more help on usage, run the command etherp-send --help.

etherp-recv usage

etherp-recv also needs to be run as root (or at least with the CAP_NET_RAW capability) on the machine receiving Ethernet frames (PC2):

etherp-recv -I eth0

For more help on usage, run the command etherp-recv --help.

Note that etherp-recv receives all frames with etherp protocol. This means that it would receives frames from several etherp-send instances. However, using several etherp-send instances is not supported by the protocol (cf. next section).

Protocol details

etherp is an Ethernet protocol using the Ethertype 0x4242. Frames contains the following fields:

  • id (4 bytes): identifier (increasing as long as frames are sent)
  • crc32 (4 bytes): Checksum of data
  • stop (1 byte): boolean indicating if this is the last frame sent by the sender
  • data: generated data whose size is the rest of the Ethernet frame

All fields are transmitted using network byte order.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.