Skip to content

Instantly share code, notes, and snippets.

@wido
Created May 6, 2019 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wido/c9bba115c7d48cc44cac9f4effbd419e to your computer and use it in GitHub Desktop.
Save wido/c9bba115c7d48cc44cac9f4effbd419e to your computer and use it in GitHub Desktop.
Create EVPN+VXLAN+BGP VNI on Linux
#!/bin/bash
#
# Author: Wido den Hollander <wido@denhollander.io>
#
# Also see: https://vincent.bernat.ch/en/blog/2017-vxlan-bgp-evpn
VNI=100
LOCAL=10.255.255.5
ip link add vxlan${VNI} type vxlan id ${VNI} dstport 4789 local ${LOCAL} nolearning
brctl addbr br${VNI}
brctl addif br${VNI} vxlan${VNI}
brctl stp br${VNI} off
ip link set up dev br${VNI}
ip link set up dev vxlan${VNI}
sysctl -w net.ipv6.conf.vxlan${VNI}.disable_ipv6=1
sysctl -w net.ipv6.conf.br${VNI}.disable_ipv6=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment