Skip to content

Instantly share code, notes, and snippets.

@cloudnull
Last active March 4, 2017 04:04
Show Gist options
  • Select an option

  • Save cloudnull/08c06b6ab20d37c3e514 to your computer and use it in GitHub Desktop.

Select an option

Save cloudnull/08c06b6ab20d37c3e514 to your computer and use it in GitHub Desktop.

Revisions

  1. Kevin Carter revised this gist Mar 3, 2017. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -13,14 +13,17 @@
    ## 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
    @@ -29,21 +32,25 @@ iface eth0.1293 inet static

    #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
    @@ -59,6 +66,7 @@ iface br-mgmt inet static
    # 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
    @@ -70,6 +78,7 @@ iface br-vxlan inet static
    # Bridge for vlan network
    auto br-vlan
    iface br-vlan inet manual
    mtu 9000
    bridge_stp off
    bridge_waitport 0
    bridge_fd 0
    @@ -88,6 +97,7 @@ iface br-vlan inet manual
    # 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
    @@ -102,6 +112,7 @@ iface br-storage inet static
    # 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
  2. cloudnull created this gist Jun 8, 2015.
    110 changes: 110 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,110 @@
    ## 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

    auto eth1
    iface eth1 inet manual


    ## 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
    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
    vlan-raw-device eth0

    #CONTAINER_NET
    iface eth0.2176 inet manual
    vlan-raw-device eth0

    #OVERLAY_NET
    iface eth1.1998 inet manual
    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
    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
    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
    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
    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
    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