Skip to content

Instantly share code, notes, and snippets.

@cloudnull
Last active March 4, 2017 04:04
Show Gist options
  • Save cloudnull/08c06b6ab20d37c3e514 to your computer and use it in GitHub Desktop.
Save cloudnull/08c06b6ab20d37c3e514 to your computer and use it in GitHub Desktop.
OSAD - example network config without bonding.
## The default networking requires several bridges. These bridges were named to be informative
## however they can be named what ever you like and is adaptable to any network infrastructure
## environment. This file serves as an example of how to setup basic networking and was ONLY
## built for the purpose of being an example.
# EXAMPLE INTERFACE FILE
# 1293 - HOST_NET (Ignore This. It's the native VLAN.)
# 2176 - CONTAINER_NET
# 1998 - OVERLAY_NET
# 2144 - STORAGE_NET
# 2146 - GATEWAY_NET (VM Provider Network. Ignore this. OpenStack will tag for us.)
## Physical interface, could be bond. This only needs to be set once for the physical device
auto eth0
iface eth0 inet manual
mtu 9000
auto eth1
iface eth1 inet manual
mtu 9000
## Vlan tagged interface, this should be physical interface along with the vlan tag
# The vlan tag number should reflect your already setup vlans.
iface eth0.1293 inet static
mtu 9000
vlan-raw-device eth0
address 10.240.0.100
netmask 255.255.252.0
gateway 10.240.0.1
dns-nameservers 69.20.0.164 69.20.0.196
#STORAGE_NET
iface eth0.2144 inet manual
mtu 9000
vlan-raw-device eth0
#CONTAINER_NET
iface eth0.2176 inet manual
mtu 9000
vlan-raw-device eth0
#OVERLAY_NET
iface eth1.1998 inet manual
mtu 9000
vlan-raw-device eth1
## Required network bridges; br-vlan, br-vxlan, br-mgmt.
# Bridge for management network
auto br-mgmt
iface br-mgmt inet static
mtu 9000
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Notice the bridge port is the vlan tagged interface
bridge_ports eth0.2176
address 172.29.236.100
netmask 255.255.252.0
dns-nameservers 69.20.0.164 69.20.0.196
# Bridge for vxlan network
# Only the COMPUTE nodes will have an IP on this bridge!
# When used by infra nodes, IPs exist in the containers and inet should be set to manual.
auto br-vxlan
iface br-vxlan inet static
mtu 9000
bridge_stp off
bridge_waitport 0
bridge_fd 0
bridge_ports eth1.1998
address 172.29.240.100
netmask 255.255.252.0
# Bridge for vlan network
auto br-vlan
iface br-vlan inet manual
mtu 9000
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Notice this bridge port is an Untagged host interface
bridge_ports eth1 br-vlan-veth
# Create veth pair, don't bomb if already exists
pre-up ip link add br-vlan-veth type veth peer name eth12 || true
# Set both ends UP
pre-up ip link set br-vlan-veth up
pre-up ip link set eth12 up
# Delete veth pair on DOWN
post-down ip link del br-vlan-veth || true
# Bridge for storage network
# Only the COMPUTE nodes will have an IP on this bridge!
# When used by infra nodes, IPs exist in the containers and inet should be set to manual.
auto br-storage
iface br-storage inet static
mtu 9000
bridge_stp off
bridge_waitport 0
bridge_fd 0
bridge_ports eth0.2144
address 172.29.244.100
netmask 255.255.252.0
# Bridge for servicenet network
# ALL nodes will have an IP on this bridge. If fact, it's the same IP.
# !! DO NOT PUT A PHYSICAL INTERFACE IN THIS BRIDGE ON THE HOST !!
# Will ue an iptables MASQUERADE rule to NAT traffic
auto br-snet
iface br-snet inet static
mtu 9000
bridge_stp off
bridge_waitport 0
bridge_fd 0
# Notice there is NO physical interface in this bridge!
address 172.29.248.1
netmask 255.255.252.0
@geneliu
Copy link

geneliu commented Jun 18, 2015

Hi Kevin,

This is something I have been wondered a while.

When used by infra nodes, IPs exist in the containers and inet should be set to manual.

So for infra nodes (non-compute nodes), what is the br-vxlan setup?
Something like this?

auto br-vxlan
iface br-vxlan inet manual
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    bridge_ports eth1.1998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment