Skip to content

Tunnels start outside what they carry ​

A GRE or VXLAN tunnel starts from an address outside every route you announce through that tunnel.

Why ​

The far end reaches your end of the tunnel over the internet. If you announce a route through the tunnel that covers that address, the far end learns a more specific route to it: through the tunnel itself. The tunnel's own packets then go into the tunnel, and nothing arrives. The tunnel and its BGP session go down, and the route goes with them. Then the tunnel comes back up, and falls again. It keeps flapping.

In Circuit ​

tunnels_outside_offered: true in circuit.ts turns on the check. For each GRE and VXLAN tunnel, it finds the BGP neighbors whose address is on the tunnel. It stops when the tunnel's local_address is inside a prefix or a prefix_set that their export accepts.

Start the tunnel from the address you reach the far end through, such as your end of the transit link. Here Netflix is sent 198.51.100.0/24 through the tunnel, and the tunnel starts from 203.0.113.2, outside it:

ts
interfaces: {
    gre: {
        netflix: {
            description: "Netflix",
            local_address: "203.0.113.2",
            remote_address: "203.0.113.200",
            addresses: ["203.0.113.253/30"],
        },
    },
},
routing: {
    bgp: {
        neighbors: {
            netflix: {
                address: "203.0.113.254",
                remote_as: 2906,
                role: "customer",
                import_policy: "netflix-import",
                export_policy: "netflix-export",
            },
        },
    },
    policies: {
        "netflix-export": [
            { description: "Our own space", if: { prefix: "198.51.100.0/24" }, then: "accept" },
            { description: "Nothing else", then: "reject" },
        ],
    },
},

Started from a loopback at 198.51.100.1 instead, the tunnel stops validate:

text
  error  edge-01: interfaces.gre.netflix is sourced from 198.51.100.1, inside 198.51.100.0/24, which routing.bgp.neighbors.netflix is offered

Separate networks on one shows tunnels in Circuit, and Checks lists every built-in check.

Discussion

Stuck, or found a mistake? Ask here. You sign in with GitHub.

Released under the Business Source License 1.1.