Initial commit
[ta/infra-ansible.git] / roles / bootstrap-host / templates / osa_interfaces.cfg.j2
1 ## The default networking requires several bridges. These bridges were named to be informative
2 ## however they can be named what ever you like and is adaptable to any network infrastructure
3 ## environment. This file serves as an example of how to setup basic networking and was ONLY
4 ## built for the purpose of being an example and used expressly in the building of an ALL IN
5 ## ONE development environment.
6
7 auto br-mgmt
8 iface br-mgmt inet static
9     bridge_stp off
10     bridge_waitport 0
11     bridge_fd 0
12     # Notice the bridge port is the vlan tagged interface
13     bridge_ports {{ bootstrap_host_bridge_mgmt_ports }}
14     address 172.29.236.100
15     netmask 255.255.252.0
16     offload-sg off
17
18 auto br-vxlan
19 iface br-vxlan inet static
20     bridge_stp off
21     bridge_waitport 0
22     bridge_fd 0
23     bridge_ports {{ bootstrap_host_bridge_vxlan_ports }}
24     address 172.29.240.100
25     netmask 255.255.252.0
26     offload-sg off
27     # To ensure ssh checksum is correct
28     up /sbin/iptables -A POSTROUTING -t mangle -p tcp --dport 22 -j CHECKSUM --checksum-fill
29     down /sbin/iptables -D POSTROUTING -t mangle -p tcp --dport 22 -j CHECKSUM --checksum-fill
30     # To provide internet connectivity to instances
31     up /sbin/iptables -t nat -A POSTROUTING -o {{ bootstrap_host_public_interface }} -j MASQUERADE
32     down /sbin/iptables -t nat -D POSTROUTING -o {{ bootstrap_host_public_interface }} -j MASQUERADE
33
34 auto br-storage
35 iface br-storage inet static
36     bridge_stp off
37     bridge_waitport 0
38     bridge_fd 0
39     bridge_ports {{ bootstrap_host_bridge_storage_ports }}
40     address 172.29.244.100
41     netmask 255.255.252.0
42     offload-sg off
43
44 auto br-vlan
45 iface br-vlan inet static
46     bridge_stp off
47     bridge_waitport 0
48     bridge_fd 0
49     address 172.29.248.100
50     netmask 255.255.252.0
51     offload-sg off
52     # Create veth pair, don't bomb if already exists
53     pre-up ip link add br-vlan-veth type veth peer name eth12 || true
54     # Set both ends UP
55     pre-up ip link set br-vlan-veth up
56     pre-up ip link set eth12 up
57     # Delete veth pair on DOWN
58     post-down ip link del br-vlan-veth || true
59     bridge_ports br-vlan-veth
60
61 # Add an additional address to br-vlan
62 iface br-vlan inet static
63     # Flat network default gateway
64     # -- This needs to exist somewhere for network reachability
65     # -- from the router namespace for floating IP paths.
66     # -- Putting this here is primarily for tempest to work.
67     address 172.29.248.1
68     netmask 255.255.252.0