Skip to content

Instantly share code, notes, and snippets.

@odyssey4me
Created August 22, 2016 08:51
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 odyssey4me/da7174126b2b390ea75ccd25a49bf45d to your computer and use it in GitHub Desktop.
Save odyssey4me/da7174126b2b390ea75ccd25a49bf45d to your computer and use it in GitHub Desktop.
Setup vxlan tunneling between multiple AIO's - warning, this is old and was purpose specific
###
### adjust the AIO config for a standalone Keystone deployment
###
# change the network configuration to suit the needs of an identity-only deployment
for i in $(awk '/^iface/ {print $2}' /etc/network/interfaces.d/aio_interfaces.cfg); do
/sbin/ifdown $i || true
done
rm -f /etc/network/interfaces.d/aio_interfaces.cfg
BR_INTERFACE=$(ip addr list | awk '/192.168.4/ {print $7}')
IDENT_NUMBER=$(ip addr list | awk '/192.168.4/ {print $2}' | cut -d/ -f1 | cut -d. -f4)
MGMT_ADDRESS="172.29.236.${IDENT_NUMBER}"
PUBLIC_INTERFACE=$(ip route show | awk '/default/ { print $NF }')
PUBLIC_ADDRESS=$(ip -o -4 addr show dev ${PUBLIC_INTERFACE} | awk -F '[ /]+' '/global/ {print $4}')
cat > /etc/network/interfaces.d/openstack.cfg <<EOF
auto vxlan
iface vxlan inet manual
pre-up ip link add vxlan type vxlan id 2 group 239.0.0.16 ttl 4 dev ${BR_INTERFACE}
up ip link set vxlan up
down ip link set vxlan down
auto br-mgmt
iface br-mgmt inet static
address ${MGMT_ADDRESS}
netmask 255.255.252.0
bridge_ports vxlan
EOF
ifup -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment