Skip to main content
basectl p2p lets you view and manage the peer connections for both the execution layer (EL) and the consensus layer (CL).

Commands

  • basectl p2p info shows your node’s advertised endpoint and peer count for each layer (plus the CL’s configured maximum peer count when the node reports it).
  • basectl p2p peers lists the connected peers for each layer.
  • basectl p2p reachability <ENODE> asks the Base telemetry service to try connecting to an EL node from the outside, so you can confirm your node is reachable.
  • basectl p2p add-peer <TARGET> connects to one peer. An enode://... address connects an EL peer; an enr:... record or a /.../p2p/<peer-id> address connects a CL peer.
  • basectl p2p remove-peer <TARGET> disconnects one peer. An enode://... address removes an EL peer; any other value is treated as a CL peer ID.
  • basectl p2p ban <TARGET> bans one peer. An enode://... address bans an EL peer; a CL peer ID bans a CL peer. Banning a CL peer also tries to disconnect it right away.
  • basectl p2p unban <TARGET> unbans one EL or CL peer using the same rules. It does not reconnect the peer.
  • basectl p2p unban-all unbans every peer currently banned on the consensus layer.

Flags

Read-only commands and single-peer actions accept: Read-only commands also accept: Commands that ban or remove peers also accept:

Testing reachability

p2p reachability first detects which network your node is on, then asks the hosted Base mainnet or Sepolia telemetry service to connect to the node you name. The command supports --json and exits with an error if the connection doesn’t fully succeed, so you can use it in scripts. The stage field tells you how far the connection got:

What your EL RPC needs to expose

Some P2P actions require an EL RPC with admin methods enabled. When those methods aren’t available, basectl p2p still runs but some fields and actions won’t work.
If your EL RPC doesn’t expose admin methods, peer counts still work, but endpoint details, peer listings, and EL bans do not.
  • Peer counts come from net_peerCount, which works on most RPCs, including restricted or public ones.
  • Endpoint details and peer listings need the EL admin methods admin_nodeInfo and admin_peers. Without them, the peer count still shows, but endpoint fields and peer lists appear as unavailable.
  • EL bans and unbans use admin_banPeer and admin_unbanPeer. In reth, a “trusted” peer can’t be banned until it’s removed from the trusted set; reth silently ignores such bans, so basectl p2p ban checks first and fails clearly if the target is a currently connected trusted peer.
  • CL data and bans use the consensus node’s P2P methods (opp2p_*).
  • unban-all is CL-only, because the EL admin API has no way to list banned peers.

Examples

View peers
Manage peers