Skip to content

Instantly share code, notes, and snippets.

@genta
Created August 27, 2015 09:38
Show Gist options
  • Select an option

  • Save genta/3e36e8f76e34eb3989d3 to your computer and use it in GitHub Desktop.

Select an option

Save genta/3e36e8f76e34eb3989d3 to your computer and use it in GitHub Desktop.
Calculate VXLAN group address (multicast address) from VNI
#!/bin/sh
vni=$1
z=`expr $vni % 256`
y=`expr $vni / 256 % 256`
x=`expr $vni / 256 / 256 % 256`
echo 239.$x.$y.$z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment