Tunnel Establishment

Tunnel Establishment is the process of creating a virtual communication path between endpoints (CPEs, clients, Gateways).

Packets entering the tunnel are encapsulated (and usually encrypted) before being transmitted, and then decapsulated and decrypted at the gateway. This allows secure and reliable end-to-end delivery across the public network. 

How Tunnel Establishment Works

  1. Packet capture — When the CPE or MyConnect client detects a packet originating from the LAN or connected devices, it temporarily intercepts the forwarding process to duplicate the packet

  2. Encryption — After the packet is captured, its contents are encrypted and encapsulated into a secure payload for transmission. 

    This step technically is optional (we can just encapsulate packets without encrypting), but Encryption is enabled for most customers.


  3. Encapsulation — The encrypted payload is wrapped inside a new packet with the tunnel headers added. This step is where the identity header is added.

    Default encapsulation includes :

    • 8B header — identifies the tenant endpoint.

      • Endpoint ID (32b) — Identifies which endpoint the packet comes from.

      • Network ID (24b) — Identifies which network the packet belongs to.

    • Standard payload encryption for given identity (e.g., AES-GCM, AES-OFB, ChaCha20Poly1305, etc.) 

      The process of encrypting a packet’s payload so that only authorized devices or users can read it. The encryption is tied to the identity of the endpoint sending the packet, meaning each user or device may have its own encryption key → By combining identity-based encryption with these algorithms, the network ensures that traffic remains isolated, private, and secure.

  4. Transmission (Tunnel forming)
    The encapsulated packets are sent from the CPE → Gateway.

    • In the previous step — Encapsulation, the original packets enter the tunnel and receive the Identity header.
    • In the next step — Decapsulation,  the encapsulation is removed at the gateway.
      Because the packets enter on one side and then exit on the other side, the flow behaves as a virtual tunnel, providing a secure, end-to-end path over the network.

      The CPE can send packets over multiple links (e.g., from different public IPs).
      This allows Seamless Failover — if one link degrades or goes down, traffic can continue on another link without interrupting client sessions.


  5. Decapsulation + Decryption 
    This final step happens at the gateway, where the gateway reverses the Encapsulation and Encryption, recovering the original packet.
  • Decapsulation — The header is removed, including the Identify header.
  • Decryption — If the encryption was applied, the payload is decrypted
    → After these steps, the original packet is fully restored and ready to be forwarded to its destination.

Benefits of Tunnel Establishment

  • Security — When Encryption is enabled, all customer traffic will be protected, even over the public internet. 
  • Reliable Delivery — Provides a stable virtual path (end-to-end delivery) across the public internet.
  • Seamless Failover — With the capacity to send over multiple WAN links, traffic can continue even if one link fails or degrades.
  • Traffic Isolation — Each packet carries identity headers (Endpoint ID and Network ID) within the encapsulation header, associating the traffic with a specific user and network → This enables better control and enhances security.