Skip to content

Instantly share code, notes, and snippets.

@jdmedeiros
Created December 21, 2020 13:41
Show Gist options
  • Save jdmedeiros/220069b700026105bb7a9c4e185c21f9 to your computer and use it in GitHub Desktop.
Save jdmedeiros/220069b700026105bb7a9c4e185c21f9 to your computer and use it in GitHub Desktop.
GRE encapsulation in Linux: point-to-multipoint tunnels
HUB:
- Create the tunnel interface
tunnels:
mgre0:
mode: gre
remote: 0.0.0.0
local: 172.31.192.10
addresses:
- "192.168.0.100/24"
mtu: 1476
- Let the HUB know about the spokes [one line for each spoke]
ip neigh add x.x.x.x lladdr y.y.y.y dev mgre0
[tunnel address] [public IP address]
SPOKEs:
- Create the tunnel interface
tunnels:
mgre0:
mode: gre
remote: y.y.y.y [public IP address of the HUB]
local: 172.31.193.10
addresses:
- "192.168.0.101/24"
mtu: 1476
- Let the SPOKE know about the HUB
ip neigh add 192.168.0.100 lladdr 54.175.62.164 dev mgre0
[tunnel address of the HUB] [public IP address of the HUB]
Configure routing as appropriate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment