P2P Connection Across Subnets / VLANs? #1801

Open
opened 2025-11-20 06:07:02 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @1nerdyguy on GitHub (Apr 9, 2025).

I have a site that has multiple subnets behind the same public IP address, isolated via vlans. These subnets/vlans are routed via Layer 3 switches, like you'd find in most enterprise environments.

Currently, if I have clients on the same subnet, with netbird, they will connect P2P, which is solid and I love it.

However, if a client is on a different subnet, it gets relayed.

Example:

Host A has a Local IP of 192.168.1.100/24 Gateway 192.168.1.1 Public IP 174.11.11.1/32

Host B Has a local ip of 192.168.2.100/24 Gateway 192.168.2.1 Public IP 174.11.11.1/32

Host A can ping Host B via the 192.168.x.x IP's just fine, sub 1ms latency, we're happy. No firewall exists between, no Nat, nothing.

If I install Netbird on both hosts, put them in the same group, login and do a netbird up, Host A can see Host B via it's Netbird Address, however it is reporting as Relayed.

Even more so, in the output of Netbird Status -d the relayed hosts report:

CLIENTA.netbird.selfhosted:
NetBird IP: 100.108.190.14
Public key: oxSWCOjV2/C9T1GtQIKV8UY2BQHoAikCpMC05qI3xlc=
Status: Connected
-- detail --
Connection type: Relayed
ICE candidate (Local/Remote): -/-
ICE candidate endpoints (Local/Remote): -/-
Relay server address: rel://anon-A65NJ.domain:33080

While the non-replayed hosts report:

CLIENTB.netbird.selfhosted:
NetBird IP: 100.108.229.81
Public key: Cj+Zp/t5Ej+Zs53GcwmnrtNBjhnYtIbasoNax7oubXA=
Status: Connected
-- detail --
Connection type: P2P
ICE candidate (Local/Remote): host/host
ICE candidate endpoints (Local/Remote): 192.168.1.100:51820/192.168.1.101:51820
Relay server address: rel://anon-A65NJ.domain:33080

Originally created by @1nerdyguy on GitHub (Apr 9, 2025). I have a site that has multiple subnets behind the same public IP address, isolated via vlans. These subnets/vlans are routed via Layer 3 switches, like you'd find in most enterprise environments. Currently, if I have clients on the same subnet, with netbird, they will connect P2P, which is solid and I love it. However, if a client is on a different subnet, it gets relayed. Example: Host A has a Local IP of 192.168.1.100/24 Gateway 192.168.1.1 Public IP 174.11.11.1/32 Host B Has a local ip of 192.168.2.100/24 Gateway 192.168.2.1 Public IP 174.11.11.1/32 Host A can ping Host B via the 192.168.x.x IP's just fine, sub 1ms latency, we're happy. No firewall exists between, no Nat, nothing. If I install Netbird on both hosts, put them in the same group, login and do a netbird up, Host A can see Host B via it's Netbird Address, however it is reporting as Relayed. Even more so, in the output of Netbird Status -d the relayed hosts report: CLIENTA.netbird.selfhosted: NetBird IP: 100.108.190.14 Public key: oxSWCOjV2/C9T1GtQIKV8UY2BQHoAikCpMC05qI3xlc= Status: Connected -- detail -- Connection type: Relayed ICE candidate (Local/Remote): -/- ICE candidate endpoints (Local/Remote): -/- Relay server address: rel://anon-A65NJ.domain:33080 While the non-replayed hosts report: CLIENTB.netbird.selfhosted: NetBird IP: 100.108.229.81 Public key: Cj+Zp/t5Ej+Zs53GcwmnrtNBjhnYtIbasoNax7oubXA= Status: Connected -- detail -- Connection type: P2P ICE candidate (Local/Remote): host/host ICE candidate endpoints (Local/Remote): 192.168.1.100:51820/192.168.1.101:51820 Relay server address: rel://anon-A65NJ.domain:33080
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1801