<p>When you connect to a node in the lightning network, you are opening a network connection to that node. You begin exchanging messages about the lightning network and can gather information such as other open channels, other nodes that can be connected to, etc. This information can help you build a better channel graph and decide whether you want to open a channel with this node or with some other node.</p>

<p>Once you have connected to a node, you can open a channel with it. Opening a channel requires creating a Bitcoin transaction, broadcasting it to the Bitcoin network, and waiting for it to become confirmed. When you open a channel, you must also be connected to the other node as you need to send information about the channel, such as channel updates, to that node.</p>

CC BY-SA 4.0
2019-01-18T16:39:41.680Z
2019-01-18T16:39:41.680Z
Ava Chow
<p>In Simple Terms:</p>

<ol>
<li><p>Before opening a channel, you want to make sure that you can securely communicate with each other.</p>

<ul>
<li>With the <code>lnd</code> implementation you do this with: <code>lncli connect &lt;PUBKEY&gt;@&lt;HOST&gt;:&lt;PORT&gt;</code></li>
</ul></li>
</ol>

<p>This only tries to establish a stable connection with your <code>peer</code>.</p>

<ol start="2">
<li><p>Then you can open a <code>channel</code> with your <code>peer</code>. You can specify a local amount you want to commit to the channel.</p>

<ul>
<li>With the <code>lnd</code>implementation you do this with: <code>lncli openchannel --node_key=&lt;ID_PUBKEY&gt; --local_amt=&lt;AMOUNT&gt;</code></li>
</ul></li>
<li><p>After opening a channel, you will have to wait for a number of confirmations. The reason for this is that by opening a channel you make a transaction on the bitcoin network.</p>

<ul>
<li>With the <code>lnd</code>implementation you can set the number of blocks with the flag: <code>--block</code></li>
</ul></li>
</ol>

<p>Hope this answers your question. </p>

CC BY-SA 4.0
2019-01-20T11:00:12.693Z
2019-01-20T11:00:12.693Z
dvg
<p>What is the difference between connecting to a node and opening a channel with a node in the lightning network? What are the events happen when I just connect to a node?</p>

<lightning-network><micropaymentchannels>
Connecting to a node and opening a channel
sk_58
# Connecting to a node and opening a channel

(Asked by: username_0 on 2019-01-18)

What is the difference between connecting to a node and opening a channel with a node in the lightning network? What are the events happen when I just connect to a node?

**Tags:** lightning-network, micropaymentchannels


---

## 2 answers

### Answer by username_1 on 2019-01-18. Score: 0 | Accepted answer

When you connect to a node in the lightning network, you are opening a network connection to that node. You begin exchanging messages about the lightning network and can gather information such as other open channels, other nodes that can be connected to, etc. This information can help you build a better channel graph and decide whether you want to open a channel with this node or with some other node.

Once you have connected to a node, you can open a channel with it. Opening a channel requires creating a Bitcoin transaction, broadcasting it to the Bitcoin network, and waiting for it to become confirmed. When you open a channel, you must also be connected to the other node as you need to send information about the channel, such as channel updates, to that node.


---

### Answer by username_2 on 2019-01-20. Score: 0

In Simple Terms:

1. Before opening a channel, you want to make sure that you can securely communicate with each other.

   * With the `lnd` implementation you do this with: `lncli connect <PUBKEY>@<HOST>:<PORT>`

This only tries to establish a stable connection with your `peer`.

2. Then you can open a `channel` with your `peer`. You can specify a local amount you want to commit to the channel.

   * With the `lnd`implementation you do this with: `lncli openchannel --node_key=<ID_PUBKEY> --local_amt=<AMOUNT>`
3. After opening a channel, you will have to wait for a number of confirmations. The reason for this is that by opening a channel you make a transaction on the bitcoin network.

   * With the `lnd`implementation you can set the number of blocks with the flag: `--block`

Hope this answers your question.


---

