Eric Newberry | 7f25a11 | 2015-05-31 11:23:25 -0700 | [diff] [blame] | 1 | # 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 |
| 7 | client sends an Interest intended for a node running **ndnpingserver**. The ping server then sends |
| 8 | Data in response. The client then calculates the roundtrip time for the Interest-Data exchange, or |
| 9 | marks it as a timeout if the Data is not received within the timeout period. |
| 10 | |
| 11 | ## Using the Client |
| 12 | |
| 13 | The 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 | |
| 18 | There are also a variety of options to control the behavior of the ping client. For example, to |
| 19 | send only four pings to `ndn:/edu/arizona`, displaying a timestamp with each received Data or |
| 20 | timeout, type:: |
| 21 | |
| 22 | ndnping -c 4 -t ndn:/edu/arizona |
| 23 | |
| 24 | A list of the available options can be found with `man ndnping`. |
| 25 | |
| 26 | ## Using the Server |
| 27 | |
| 28 | The server can be invoked by calling **ndnpingserver** with a name to listen for pings to. For |
| 29 | example, to listen for pings to `ndn:/edu/arizona`, one would execute:: |
| 30 | |
| 31 | ndnpingserver ndn:/edu/arizona |
| 32 | |
| 33 | There are also a variety of options to control the behavior of the ping server. For example, to |
| 34 | satisfy only 4 ping requests before exiting, execute the following:: |
| 35 | |
| 36 | ndnpingserver -p 4 ndn:/edu/arizona |
| 37 | |
Junxiao Shi | ae2c9f7 | 2016-02-16 09:03:24 -0700 | [diff] [blame] | 38 | A list of the available options can be found with `man ndnpingserver`. |
| 39 | |
| 40 | ## ndnping Protocol |
| 41 | |
| 42 | This section briefly describes ndnping's protocol, in order to allow alternate implementations |
| 43 | to be compatible with this implementation. |
| 44 | The current protocol version is **ndnping protocol version 1**. |
| 45 | This version number will be incremented in case there's an incompatible change. |
| 46 | |
| 47 | ### Probe Interests |
| 48 | |
| 49 | The client expresses probe Interests that are intended to be forwarded to the server |
| 50 | without being aggregated. |
| 51 | The Interests MUST have one of the following name structures: |
| 52 | |
| 53 | ndn:/<prefix>/ping/<seq> |
| 54 | ndn:/<prefix>/ping/<client-identifier>/<seq> |
| 55 | |
| 56 | where: |
| 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 | |
| 63 | If a client expresses multiple probe Interests, it is RECOMMENDED for those Interests to |
| 64 | have consecutive increasing integers in `<seq>` field. |
| 65 | |
| 66 | If a client uses the name structure with `<client-identifier>` field, it is RECOMMENDED to use |
| 67 | one or more printable characters only, to make it easier for a human operator to read the logs. |
| 68 | A client implementation MAY restrict this field to be non-empty and have printable characters only. |
| 69 | |
| 70 | The probe Interest SHOULD carry MustBeFresh selector by default. |
| 71 | A client implementation MAY allow the operator to turn off MustBeFresh selector. |
| 72 | |
| 73 | ### Reply Data |
| 74 | |
| 75 | The server SHOULD register the prefix `ndn:/<prefix>/ping`, and MUST reply to probe Interests |
| 76 | under this prefix with Data. |
| 77 | The Data MUST have the same name as the probe Interest. |
| 78 | |
| 79 | The Data MUST have BLOB as its ContentType. |
| 80 | The Data MAY have arbitrary payload in its Content field. |
| 81 | A server implementation MAY allow the operator to configure the length and contents of the payload. |
| 82 | |
| 83 | The Data SHOULD have a valid signature. |
| 84 | The server SHOULD use DigestSha256 signature by default. |
| 85 | A server implementation MAY allow the operator to configure a different signature algorithm. |
| 86 | The client SHOULD NOT verify the signature by default. |
| 87 | A client implementation MAY allow the operator to enable signature verification. |