Hats Network | LogoHats Network
Peering

Peering via Tunnel

Tunnel-based peering with AS203314 using WireGuard, GRE, GRETAP, and VxLAN. No physical presence required - establish BGP sessions via encrypted overlays from any location.

Tunnel peering can connect AS203314 with a network that has no suitable physical interconnection. Layer 2 and Layer 3 options are documented below.

When to Use Tunnel Peering

A tunnel may be appropriate when:

  • You're not co-located with us at any IXP or data center
  • Physical cross-connect is not available or cost-prohibitive
  • You need a temporary peering arrangement before establishing physical connectivity
  • You're in a region where we don't have physical presence

Tunnel Architecture

Tunnel Delivery PathTunnel peering keeps the BGP session off your local metro while landing directly on AS203314 edge.Present L2/L3 interface from your edgeYour RouterGRE, IPsec, or pseudowire over internetTunnel OverlayDecapsulation on AS203314 edgeHats Router

Layer 2 vs Layer 3 Tunneling

Layer 2 tunnels encapsulate Ethernet frames, creating a virtual bridge between networks.

Protocols: GRETAP, VxLAN

Use cases:

  • Carrying VLAN-tagged traffic
  • Running bridging protocols (STP, LLDP)
  • Extending a broadcast domain

Considerations: Higher overhead than Layer 3, not suitable for long-distance peering.

Learn more about Layer 2 tunnels →

Configuration Examples

The examples use placeholders. Replace each one with the values agreed for your session:

# Replace these placeholders with your actual values
your_name: "{tunnel name}"
yourside_ip: "{your public IP}"
ourside_ip: "{our endpoint IP}"
yourside_port: "{your source port (WireGuard)}"
ourside_port: "{our destination port (WireGuard)}"
your_tunnel_ip: "{your tunnel IP address}"
our_tunnel_ip: "{our tunnel IP address}"
tunnel_cidr: "{tunnel subnet CIDR}"
vni: "{VxLAN Network Identifier}"
public_key: "{our WireGuard public key}"
private_key: "{your WireGuard private key}"

Protocol Comparison

ProtocolLayerEncryptionMulti-protocolUse Case
WireGuardL3YesIPv4/IPv6Secure, modern peering
GREL3NoIPv4/IPv6Simple IP tunneling
GRETAPL2NoEthernetBridging, VLANs
VxLANL2NoEthernetData center overlay
SITL3NoIPv6-over-IPv46in4 connectivity
ip6greL3NoIPv6-over-IPv4GRE for IPv6

Next Steps

  1. Choose the appropriate tunnel type for your use case
  2. Follow the configuration examples
  3. Contact us to finalize the peering session

Need help deciding?

Use a Layer 3 tunnel for routed peering unless the handoff requires Ethernet or VLAN transport. Compare GRE and WireGuard based on encapsulation, encryption and endpoint support.

On this page