<p>Bitcoin Core chooses peers in the P2P network in a few ways:</p>

<ol>
<li>it tries to connect to peers it already knows about, or</li>
<li>it connects to peers it learns about by querying volunteer-run <a href="https://bitcoin.org/en/developer-guide#term-dns-seed" rel="nofollow noreferrer">DNS services</a>, or</li>
<li>it connects to one of a number of hardcoded seeds </li>
</ol>

<p>Once connected to the P2P network, peers rumor possible other nodes they know about, and the node builds a picture of the network using these responses. On a fresh installation there's no known peers, so the discovery begins at the seed nodes.</p>

CC BY-SA 3.0
2017-12-11T16:41:10.810Z
When you say "it tries to connect to peers it already knows about" - how does it "already" know about them?  Is that the same as point #3?
Hannah Vernon
CC BY-SA 3.0
2017-12-11T17:56:57.377Z
It knows about them from earlier runs. Known peers are stored on disk in peers.dat.
Pieter Wuille
CC BY-SA 3.0
2017-12-11T15:01:37.627Z
2017-12-12T01:50:48.557Z
2017-12-12T01:50:48.557Z
Claris
<p>I just installed bitcoin core client (from github) and started the client. It took around 24 hours to install the full block chain. Where did the blockchain come from? How did did my bitcoin core client find its first peer on the network?</p>

<bitcoin-core><seed><dns>
Seed discovery for bitcoin core client
OldStick00001
# Seed discovery for bitcoin core client

(Asked by: username_0 on 2017-12-11)

I just installed bitcoin core client (from github) and started the client. It took around 24 hours to install the full block chain. Where did the blockchain come from? How did did my bitcoin core client find its first peer on the network?

**Tags:** bitcoin-core, seed, dns


---

## 1 answers

### Answer by username_1 on 2017-12-11. Score: 1

Bitcoin Core chooses peers in the P2P network in a few ways:

1. it tries to connect to peers it already knows about, or
2. it connects to peers it learns about by querying volunteer-run [DNS services](https://bitcoin.org/en/developer-guide#term-dns-seed), or
3. it connects to one of a number of hardcoded seeds

Once connected to the P2P network, peers rumor possible other nodes they know about, and the node builds a picture of the network using these responses. On a fresh installation there's no known peers, so the discovery begins at the seed nodes.

> **Comments:**
> **username_2**: When you say "it tries to connect to peers it already knows about" - how does it "already" know about them?  Is that the same as point #3?  
> **username_3**: It knows about them from earlier runs. Known peers are stored on disk in peers.dat.  

---

