From e9265a6324b11e703713b890e8c566d4fd1bf772 Mon Sep 17 00:00:00 2001 From: Michael Standen Date: Fri, 22 Mar 2024 07:38:47 +1300 Subject: [PATCH] Remove ping from introduction section --- content/concepts/fundamentals/protocols.md | 4 ++ .../concepts/introduction/protocols/ping.md | 38 ------------------- 2 files changed, 4 insertions(+), 38 deletions(-) delete mode 100644 content/concepts/introduction/protocols/ping.md diff --git a/content/concepts/fundamentals/protocols.md b/content/concepts/fundamentals/protocols.md index 07ac8b16..27e9778e 100644 --- a/content/concepts/fundamentals/protocols.md +++ b/content/concepts/fundamentals/protocols.md @@ -141,6 +141,10 @@ After the initial protocol negotiation, the dialing peer sends 32 bytes of rando peer echoes the data back, and the dialing peer will verify the response and measure the latency between request and response. +Note that the libp2p ping protocol is different from the ping command line utility +([ICMP ping](https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol)), as it requires an already +established libp2p connection. + ### Identify | **Protocol id** | spec | | | implementations | diff --git a/content/concepts/introduction/protocols/ping.md b/content/concepts/introduction/protocols/ping.md deleted file mode 100644 index e849f98e..00000000 --- a/content/concepts/introduction/protocols/ping.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "Ping" -description: "The ping protocol is a simple request response protocol." -weight: 20 ---- - -## Ping in libp2p - -The libp2p ping protocol is a simple liveness check that peers can use to test -the connectivity and performance between two peers. The libp2p ping protocol -is different from the ping command line utility -([ICMP ping](https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol)), -as it requires an already established libp2p connection. - -> ICMP Ping is a network utility that uses ICMP packets to -> check the connectivity and latency between two networked devices. -> It is typically used to check the reachability of a host on an IP network and -> to measure the round-trip time for messages sent from the originating host to a -> destination host. - -A peer opens a new stream on an existing libp2p connection and sends a ping request with a random 32 byte payload. The receiver echoes these 32 bytes back on the same stream. By measuring the time between the -request and response, the initiator can calculate the round-trip time of the underlying libp2p connection. -The stream can be reused for future pings from the initiator. - -The ping protocol ID is `/ipfs/ping/1.0.0`. - -### Example - -[Kubo](https://github.com/ipfs/kubo) exposes a command line interface to ping other peers, which uses the libp2p ping protocol. - -```shell -ipfs ping /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/ping - -PING /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/ping (QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG) -32 bytes from QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG: time=11.34ms -``` - -{{< alert icon="💡" context="note" text="See the ping technical specification for more details." />}}