Comment on page
Lesson: Find Peers on the Network
This lesson shows how to find and examine the peers you connect to on the IPFS network. You will use the
ipfs idtools for this purpose. The swarm is the component that opens, listens for, and maintains connections to other IPFS peers. You can also examine connected peers and the network using the Web UI.
To do the steps in this lesson you must:
- Be running the
After doing this Lesson you will be able to
- Find and examine peers on the IPFS network
Start the IPFS daemon by running
$ ipfs daemon
You can use the command
ipfs swarm peersto examine for connected peers:
$ ipfs swarm peers
You will use the
ipfs id <hash>command to examine a connected peer:
$ ipfs id Qmf1...mx36
Note: The "ID" field shown above is the Peer's ID, and this was also the hash that was shown when you ran
ipfs swarm peers. Peers are identified on the network directly by their Peer ID.
The IPFS daemon also serves up a modern Web UI that you are able to open in a browser. Did you notice when you started the daemon that there was the following?
Open the link above in your browser. You will see the Web UI displayed with sections on Status, Files, Explore, Peers, and Settings. Click on the Peers section and you will see a world map indicating the location of connected peers. Scroll down the page to see information on each of the peers, their country/city location, network latency, Peer ID, etc. Spend some time looking at the other different sections of the Web UI.
Once you have connected to the IPFS network by running the daemon, other IPFS nodes (peers) will begin to connect and communicate with your node. Using the commands
ipfs idallows you to examine the connected nodes. The Web UI also shows in-depth information about peers.