You can configure a `nwaku` node to use multiple peer discovery mechanisms simultaneously.
:::
## Configure Static Peers
You can provide static peers to a `nwaku` node during startup using the `staticnode` configuration option. To connect to multiple peers on startup, repeat the `staticnode` option:
-`dns-discovery-url`: URL for DNS node list in the format `enrtree://<key>@<fqdn>` where `<fqdn>` is the fully qualified domain name and `<key>` is the base32 encoding of the compressed 32-byte public key that signed the list at that location.
-`dns-discovery-name-server` (optional): DNS name server IPs to query. You can repeat this option to provide multiple DNS name servers.
When Discv5 is enabled and used with [DNS Discovery](#configure-dns-discovery), the `nwaku` node will attempt to bootstrap the Discv5 routing table by extracting `ENRs` from peers discovered through DNS.
To enable [Peer Exchange](/overview/concepts/peer-exchange) in a `nwaku` node, use the following configuration options:
-`peer-exchange`: Enables `Peer Exchange` on the node as a responder (disabled by default).
-`peer-exchange-node` (optional): ENR for bootstrap node that has the peer exchange protocol enabled.
```bash
./build/wakunode2 \
--peer-exchange=true \
--peer-exchange-node=[PEER MULTIADDR WITH EXCHANGE ENABLED]
```
For instance, consider two `nwaku` nodes configured as a `server` (peer exchange responder node) and `client` (node using peer exchange) on the same local host (IP: `0.0.0.0`):
```bash title="Server: Nwaku Node with Peer Exchange Enabled"
./build/wakunode2 --peer-exchange=true
```
```bash title="Client: Nwaku Node Bootstrapping with Peer Exchange"
`nwaku` provides a [`relay-peer-exchange`](/guides/reference/node-config-options#relay-config) option via `libp2p` for peer exchange, allowing network growth through neighboring nodes. However, this feature can compromise security and network robustness, so we recommend only using it in high-trust environments.