blob: 8df5adc6687d61b44c414008a22c96d0caa239bb [file] [log] [blame] [view]
Eric Newberry7f25a112015-05-31 11:23:25 -07001# ndnping and ndnpingserver
2
3## Introduction
4
5**ndnping** and **ndnpingserver** are reachability testing tools for
6[Named Data Networking](http://named-data.net). They test the reachability between two nodes. The
7client sends an Interest intended for a node running **ndnpingserver**. The ping server then sends
8Data in response. The client then calculates the roundtrip time for the Interest-Data exchange, or
9marks it as a timeout if the Data is not received within the timeout period.
10
11## Using the Client
12
13The client can be invoked by calling **ndnping** with a name to ping. For example, to ping
14`ndn:/edu/arizona`, one would execute::
15
16 ndnping ndn:/edu/arizona
17
18There are also a variety of options to control the behavior of the ping client. For example, to
19send only four pings to `ndn:/edu/arizona`, displaying a timestamp with each received Data or
20timeout, type::
21
22 ndnping -c 4 -t ndn:/edu/arizona
23
24A list of the available options can be found with `man ndnping`.
25
26## Using the Server
27
28The server can be invoked by calling **ndnpingserver** with a name to listen for pings to. For
29example, to listen for pings to `ndn:/edu/arizona`, one would execute::
30
31 ndnpingserver ndn:/edu/arizona
32
33There are also a variety of options to control the behavior of the ping server. For example, to
34satisfy only 4 ping requests before exiting, execute the following::
35
36 ndnpingserver -p 4 ndn:/edu/arizona
37
Junxiao Shiae2c9f72016-02-16 09:03:24 -070038A list of the available options can be found with `man ndnpingserver`.
39
40## ndnping Protocol
41
42This section briefly describes ndnping's protocol, in order to allow alternate implementations
43to be compatible with this implementation.
44The current protocol version is **ndnping protocol version 1**.
45This version number will be incremented in case there's an incompatible change.
46
47### Probe Interests
48
49The client expresses probe Interests that are intended to be forwarded to the server
50without being aggregated.
51The Interests MUST have one of the following name structures:
52
53 ndn:/<prefix>/ping/<seq>
54 ndn:/<prefix>/ping/<client-identifier>/<seq>
55
56where:
57
58* `<prefix>` is the server prefix that contains zero or more NameComponents.
59* `<seq>` is one NameComponent whose value is an unsigned 64-bit integer, represented as
60 a decimal number in ASCII encoding.
61* `<client-identifier>` is one NameComponent with arbitrary value.
62
63If a client expresses multiple probe Interests, it is RECOMMENDED for those Interests to
64have consecutive increasing integers in `<seq>` field.
65
66If a client uses the name structure with `<client-identifier>` field, it is RECOMMENDED to use
67one or more printable characters only, to make it easier for a human operator to read the logs.
68A client implementation MAY restrict this field to be non-empty and have printable characters only.
69
Junxiao Shi20d5a0b2018-08-14 09:26:11 -060070The probe Interest SHOULD NOT carry CanBePrefix element.
71
72The probe Interest SHOULD carry MustBeFresh element.
73A client implementation MAY allow the operator to remove MustBeFresh element.
Junxiao Shiae2c9f72016-02-16 09:03:24 -070074
75### Reply Data
76
77The server SHOULD register the prefix `ndn:/<prefix>/ping`, and MUST reply to probe Interests
78under this prefix with Data.
79The Data MUST have the same name as the probe Interest.
80
81The Data MUST have BLOB as its ContentType.
82The Data MAY have arbitrary payload in its Content field.
83A server implementation MAY allow the operator to configure the length and contents of the payload.
84
85The Data SHOULD have a valid signature.
86The server SHOULD use DigestSha256 signature by default.
87A server implementation MAY allow the operator to configure a different signature algorithm.
88The client SHOULD NOT verify the signature by default.
89A client implementation MAY allow the operator to enable signature verification.