Created
August 27, 2015 09:38
-
-
Save genta/3e36e8f76e34eb3989d3 to your computer and use it in GitHub Desktop.
Calculate VXLAN group address (multicast address) from VNI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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