Debian Codegraph @

cmd/etherecho/README.md

raw
1 etherecho
2 =========
3
4 Command `etherecho` broadcasts a message to all machines in the same network
5 segment, and listens for other messages from other `etherecho` servers.
6
7 `etherecho` only works on Linux and BSD, and requires root permission or
8 `CAP_NET_ADMIN` on Linux.
9
10 Usage
11 -----
12
13 ```
14 $ etherecho -h
15 Usage of etherecho:
16 -i string
17 network interface to use to send and receive messages
18 -m string
19 message to be sent (default: system's hostname)
20 ```
21
22 Example
23 -------
24
25 Start an instance of `etherecho` on two machines on the same network segment:
26
27 ```
28 foo $ etherecho -i eth0
29 ```
30 ```
31 bar $ etherecho -i eth0
32 ```
33
34 Both machines should begin seeing messages from each other at regular intervals:
35
36 ```
37 foo $ etherecho -i eth0
38 2017/06/14 00:03:13 [aa:aa:aa:aa:aa:aa] bar
39 2017/06/14 00:03:14 [aa:aa:aa:aa:aa:aa] bar
40 2017/06/14 00:03:15 [aa:aa:aa:aa:aa:aa] bar
41 ```
42 ```
43 bar $ etherecho -i eth0
44 2017/06/14 00:03:13 [bb:bb:bb:bb:bb:bb] foo
45 2017/06/14 00:03:14 [bb:bb:bb:bb:bb:bb] foo
46 2017/06/14 00:03:15 [bb:bb:bb:bb:bb:bb] foo
47 ```
48
49 Additional machines can be added, so long as they reside on the same network
50 segment.