Potential methods for discovering peers include:
- Distributed hash tables Distributed Hash Table (DHT) - Kademlia
- Local network broadcasts
- Exchanging peer lists with existing peers
- Centralized trackers or rendezvous points
- Lists of bootstrap peers
Ethereum Network
Networks like ethereum use a small hardcoded list of nodes during bootstrap to start the discovery process. So basically, every new node have addresses of other nodes that (as a client), it can found immediately and connect.
These nodes which have their address hardcoded into every client are called “bootstrap nodes”, and only exist to introduce a new node to a set of peers (this is their sole purpose.
The protocol used for the node-bootnode interacitons is a modified form o Kademlia.
https://ethereum.org/en/developers/docs/networking-layer/