# Relay

In order to provide 100% connectivity between all peers in all networks, Managed Nebula includes support for relaying traffic between two peers through a third peer, called a relay. As long as there is connectivity between all peers and the relay, we can achieve 100% connectivity for all peers through this relay.

A relay is a special kind of [host](/docs/glossary/host/) in the Managed Nebula network that forwards traffic for two other hosts which cannot communicate directly with each other. Traffic flowing through the relay is end-to-end encrypted and authenticated, so the relay itself is not able to inspect or change this traffic, it only knows where it needs to be sent. To ensure 100% connectivity to the relay, the relay should be deployed like a [lighthouse](/docs/glossary/lighthouse/), with a public internet IP and with appropriate firewall rules in place.

By default, a network's [lighthouses](/docs/glossary/lighthouse/) also act as relays, which is the `lighthousesAsRelays` network setting. On a network using the [managed lighthouse](/docs/glossary/managed-lighthouse/), this means traffic between hosts that cannot connect directly may be forwarded through Defined Networking's infrastructure.
