chore(docs): amend port guidance to enable QUIC support (#5029)
* chore(docs): amend port guidance to enable QUIC support
This commit is contained in:
parent
0c3fef59b3
commit
e470596715
@ -40,7 +40,7 @@ drastically and use the (recommended) default.
|
|||||||
|
|
||||||
### NAT Traversal (Port Forwarding)
|
### NAT Traversal (Port Forwarding)
|
||||||
|
|
||||||
Lighthouse, by default, uses port 9000 for both TCP and UDP. Lighthouse will
|
Lighthouse, by default, uses port 9000 for both TCP and UDP. Since v4.5.0, Lighthouse will also attempt to make QUIC connections via UDP port 9001 by default. Lighthouse will
|
||||||
still function if it is behind a NAT without any port mappings. Although
|
still function if it is behind a NAT without any port mappings. Although
|
||||||
Lighthouse still functions, we recommend that some mechanism is used to ensure
|
Lighthouse still functions, we recommend that some mechanism is used to ensure
|
||||||
that your Lighthouse node is publicly accessible. This will typically improve
|
that your Lighthouse node is publicly accessible. This will typically improve
|
||||||
@ -50,8 +50,8 @@ peers for your node and overall improve the Ethereum consensus network.
|
|||||||
Lighthouse currently supports UPnP. If UPnP is enabled on your router,
|
Lighthouse currently supports UPnP. If UPnP is enabled on your router,
|
||||||
Lighthouse will automatically establish the port mappings for you (the beacon
|
Lighthouse will automatically establish the port mappings for you (the beacon
|
||||||
node will inform you of established routes in this case). If UPnP is not
|
node will inform you of established routes in this case). If UPnP is not
|
||||||
enabled, we recommend you to manually set up port mappings to both of Lighthouse's
|
enabled, we recommend you to manually set up port mappings to Lighthouse's
|
||||||
TCP and UDP ports (9000 by default).
|
TCP and UDP ports (9000 TCP/UDP, and 9001 UDP by default).
|
||||||
|
|
||||||
> Note: Lighthouse needs to advertise its publicly accessible ports in
|
> Note: Lighthouse needs to advertise its publicly accessible ports in
|
||||||
> order to inform its peers that it is contactable and how to connect to it.
|
> order to inform its peers that it is contactable and how to connect to it.
|
||||||
@ -80,10 +80,16 @@ The steps to do port forwarding depends on the router, but the general steps are
|
|||||||
- Protocol: select `TCP/UDP` or `BOTH`
|
- Protocol: select `TCP/UDP` or `BOTH`
|
||||||
- External port: `9000`
|
- External port: `9000`
|
||||||
- Internal port: `9000`
|
- Internal port: `9000`
|
||||||
- IP address: Usually there is a dropdown list for you to select the device. Choose the device that is running Lighthouse
|
- IP address: Usually there is a dropdown list for you to select the device. Choose the device that is running Lighthouse.
|
||||||
|
|
||||||
5. To check that you have successfully open the ports, go to [yougetsignal](https://www.yougetsignal.com/tools/open-ports/) and enter `9000` in the `port number`. If it shows "open", then you have successfully set up port forwarding. If it shows "closed", double check your settings, and also check that you have allowed firewall rules on port 9000.
|
Since V4.5.0 port 9001/UDP is also used for QUIC support.
|
||||||
|
|
||||||
|
- Protocol: select `UDP`
|
||||||
|
- External port: `9001`
|
||||||
|
- Internal port: `9001`
|
||||||
|
- IP address: Choose the device that is running Lighthouse.
|
||||||
|
|
||||||
|
5. To check that you have successfully opened the ports, go to [yougetsignal](https://www.yougetsignal.com/tools/open-ports/) and enter `9000` in the `port number`. If it shows "open", then you have successfully set up port forwarding. If it shows "closed", double check your settings, and also check that you have allowed firewall rules on port 9000. Note: this will only confirm if port 9000/TCP is open. You will need to ensure you have correctly setup port forwarding for the UDP ports (`9000` and `9001` by default).
|
||||||
|
|
||||||
### ENR Configuration
|
### ENR Configuration
|
||||||
|
|
||||||
@ -125,6 +131,9 @@ IPv4 only:
|
|||||||
TCP and UDP.
|
TCP and UDP.
|
||||||
- `--listen-address :: --port 9909 --discovery-port 9999` will listen over
|
- `--listen-address :: --port 9909 --discovery-port 9999` will listen over
|
||||||
IPv6 using port `9909` for TCP and port `9999` for UDP.
|
IPv6 using port `9909` for TCP and port `9999` for UDP.
|
||||||
|
- By default, QUIC listens for UDP connections using a port number that is one greater than the specified port.
|
||||||
|
If the specified port is 9909, QUIC will use port 9910 for IPv6 UDP connections.
|
||||||
|
This can be configured with `--quic-port`.
|
||||||
|
|
||||||
To listen over both IPv4 and IPv6:
|
To listen over both IPv4 and IPv6:
|
||||||
- Set two listening addresses using the `--listen-address` flag twice ensuring
|
- Set two listening addresses using the `--listen-address` flag twice ensuring
|
||||||
@ -136,15 +145,35 @@ To listen over both IPv4 and IPv6:
|
|||||||
- If necessary, set the `--discovery-port6` flag to configure the IPv6 UDP
|
- If necessary, set the `--discovery-port6` flag to configure the IPv6 UDP
|
||||||
port. This will default to the value given to `--port6` if not set. This flag
|
port. This will default to the value given to `--port6` if not set. This flag
|
||||||
has no effect when listening over IPv6 only.
|
has no effect when listening over IPv6 only.
|
||||||
|
- If necessary, set the `--quic-port6` flag to configure the port used by QUIC for
|
||||||
|
UDP over IPv6. This will default to the value given to `--port6` + 1. This flag
|
||||||
|
has no effect when listening over IPv6 only.
|
||||||
|
|
||||||
##### Configuration Examples
|
##### Configuration Examples
|
||||||
|
|
||||||
- `--listen-address :: --listen-address 0.0.0.0 --port 9909` will listen
|
> When using `--listen-address :: --listen-address 0.0.0.0 --port 9909`, listening will be set up as follows:
|
||||||
over IPv4 using port `9909` for TCP and UDP. It will also listen over IPv6 but
|
>
|
||||||
using the default value for `--port6` for UDP and TCP (`9090`).
|
> **IPv4**:
|
||||||
- `--listen-address :: --listen-address --port 9909 --discovery-port6 9999`
|
>
|
||||||
will have the same configuration as before except for the IPv6 UDP socket,
|
> It listens on port `9909` for both TCP and UDP.
|
||||||
which will use port `9999`.
|
> QUIC will use the next sequential port `9910` for UDP.
|
||||||
|
>
|
||||||
|
> **IPv6**:
|
||||||
|
>
|
||||||
|
> It listens on the default value of --port6 (`9090`) for both UDP and TCP.
|
||||||
|
> QUIC will use port `9091` for UDP, which is the default `--port6` value (`9090`) + 1.
|
||||||
|
|
||||||
|
> When using `--listen-address :: --listen-address --port 9909 --discovery-port6 9999`, listening will be set up as follows:
|
||||||
|
>
|
||||||
|
> **IPv4**:
|
||||||
|
>
|
||||||
|
> It listens on port `9909` for both TCP and UDP.
|
||||||
|
> QUIC will use the next sequential port `9910` for UDP.
|
||||||
|
>
|
||||||
|
> **IPv6**:
|
||||||
|
>
|
||||||
|
> It listens on the default value of `--port6` (`9090`) for TCP, and port `9999` for UDP.
|
||||||
|
> QUIC will use port `9091` for UDP, which is the default `--port6` value (`9090`) + 1.
|
||||||
|
|
||||||
#### Configuring Lighthouse to advertise IPv6 reachable addresses
|
#### Configuring Lighthouse to advertise IPv6 reachable addresses
|
||||||
Lighthouse supports IPv6 to connect to other nodes both over IPv6 exclusively,
|
Lighthouse supports IPv6 to connect to other nodes both over IPv6 exclusively,
|
||||||
|
@ -112,7 +112,7 @@ docker run lighthouse:local lighthouse --help
|
|||||||
You can run a Docker beacon node with the following command:
|
You can run a Docker beacon node with the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -p 9000:9000/tcp -p 9000:9000/udp -p 127.0.0.1:5052:5052 -v $HOME/.lighthouse:/root/.lighthouse sigp/lighthouse lighthouse --network mainnet beacon --http --http-address 0.0.0.0
|
docker run -p 9000:9000/tcp -p 9000:9000/udp -p 9001:9001/udp -p 127.0.0.1:5052:5052 -v $HOME/.lighthouse:/root/.lighthouse sigp/lighthouse lighthouse --network mainnet beacon --http --http-address 0.0.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
> To join the Goerli testnet, use `--network goerli` instead.
|
> To join the Goerli testnet, use `--network goerli` instead.
|
||||||
@ -135,18 +135,18 @@ docker run -v $HOME/.lighthouse:/root/.lighthouse sigp/lighthouse lighthouse bea
|
|||||||
|
|
||||||
### Ports
|
### Ports
|
||||||
|
|
||||||
In order to be a good peer and serve other peers you should expose port `9000` for both TCP and UDP.
|
In order to be a good peer and serve other peers you should expose port `9000` for both TCP and UDP, and port `9001` for UDP.
|
||||||
Use the `-p` flag to do this:
|
Use the `-p` flag to do this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -p 9000:9000/tcp -p 9000:9000/udp sigp/lighthouse lighthouse beacon
|
docker run -p 9000:9000/tcp -p 9000:9000/udp -p 9001:9001/udp sigp/lighthouse lighthouse beacon
|
||||||
```
|
```
|
||||||
|
|
||||||
If you use the `--http` flag you may also want to expose the HTTP port with `-p
|
If you use the `--http` flag you may also want to expose the HTTP port with `-p
|
||||||
127.0.0.1:5052:5052`.
|
127.0.0.1:5052:5052`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -p 9000:9000/tcp -p 9000:9000/udp -p 127.0.0.1:5052:5052 sigp/lighthouse lighthouse beacon --http --http-address 0.0.0.0
|
docker run -p 9000:9000/tcp -p 9000:9000/udp -p 9001:9001/udp -p 127.0.0.1:5052:5052 sigp/lighthouse lighthouse beacon --http --http-address 0.0.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
[docker_hub]: https://hub.docker.com/repository/docker/sigp/lighthouse/
|
[docker_hub]: https://hub.docker.com/repository/docker/sigp/lighthouse/
|
||||||
|
@ -99,7 +99,7 @@ INFO Downloading historical blocks est_time: --, distance: 4524545 slo
|
|||||||
|
|
||||||
If the same log appears every minute and you do not see progress in downloading historical blocks, you can try one of the followings:
|
If the same log appears every minute and you do not see progress in downloading historical blocks, you can try one of the followings:
|
||||||
|
|
||||||
- Check the number of peers you are connected to. If you have low peers (less than 50), try to do port forwarding on the port 9000 TCP/UDP to increase peer count.
|
- Check the number of peers you are connected to. If you have low peers (less than 50), try to do port forwarding on the ports 9000 TCP/UDP and 9001 UDP to increase peer count.
|
||||||
- Restart the beacon node.
|
- Restart the beacon node.
|
||||||
|
|
||||||
|
|
||||||
@ -435,8 +435,8 @@ For these reasons, we recommend that you make your node publicly accessible.
|
|||||||
Lighthouse supports UPnP. If you are behind a NAT with a router that supports
|
Lighthouse supports UPnP. If you are behind a NAT with a router that supports
|
||||||
UPnP, you can simply ensure UPnP is enabled (Lighthouse will inform you in its
|
UPnP, you can simply ensure UPnP is enabled (Lighthouse will inform you in its
|
||||||
initial logs if a route has been established). You can also manually [set up port mappings/port forwarding](./advanced_networking.md#how-to-open-ports) in your router to your local Lighthouse instance. By default,
|
initial logs if a route has been established). You can also manually [set up port mappings/port forwarding](./advanced_networking.md#how-to-open-ports) in your router to your local Lighthouse instance. By default,
|
||||||
Lighthouse uses port 9000 for both TCP and UDP. Opening both these ports will
|
Lighthouse uses port 9000 for both TCP and UDP, and optionally 9001 UDP for QUIC support.
|
||||||
make your Lighthouse node maximally contactable.
|
Opening these ports will make your Lighthouse node maximally contactable.
|
||||||
|
|
||||||
### <a name="net-monitor"></a> How can I monitor my validators?
|
### <a name="net-monitor"></a> How can I monitor my validators?
|
||||||
|
|
||||||
@ -485,7 +485,9 @@ It is also worth noting that the `--beacon-nodes` flag can also be used for redu
|
|||||||
No. Lighthouse will auto-detect the change and update your Ethereum Node Record (ENR). You just need to make sure you are not manually setting the ENR with `--enr-address` (which, for common use cases, this flag is not used).
|
No. Lighthouse will auto-detect the change and update your Ethereum Node Record (ENR). You just need to make sure you are not manually setting the ENR with `--enr-address` (which, for common use cases, this flag is not used).
|
||||||
|
|
||||||
### <a name="net-port"></a> How to change the TCP/UDP port 9000 that Lighthouse listens on?
|
### <a name="net-port"></a> How to change the TCP/UDP port 9000 that Lighthouse listens on?
|
||||||
Use the flag ```--port <PORT>``` in the beacon node. This flag can be useful when you are running two beacon nodes at the same time. You can leave one beacon node as the default port 9000, and configure the second beacon node to listen on, e.g., ```--port 9001```.
|
Use the flag `--port <PORT>` in the beacon node. This flag can be useful when you are running two beacon nodes at the same time. You can leave one beacon node as the default port 9000, and configure the second beacon node to listen on, e.g., `--port 9100`.
|
||||||
|
Since V4.5.0, Lighthouse supports QUIC and by default will use the value of `--port` + 1 to listen via UDP (default `9001`).
|
||||||
|
This can be configured by using the flag `--quic-port`. Refer to [Advanced Networking](./advanced_networking.md#nat-traversal-port-forwarding) for more information.
|
||||||
|
|
||||||
### <a name="net-subnet"></a> Lighthouse `v4.3.0` introduces a change where a node will subscribe to only 2 subnets in total. I am worried that this will impact my validators return.
|
### <a name="net-subnet"></a> Lighthouse `v4.3.0` introduces a change where a node will subscribe to only 2 subnets in total. I am worried that this will impact my validators return.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user