Skip to content
Snippets Groups Projects
Commit 06d4da2d authored by Tóth Miklós Tibor's avatar Tóth Miklós Tibor :shrug:
Browse files

Switch to Open vSwitch

parent a0843f2d
No related branches found
No related tags found
No related merge requests found
---
- hosts: all
tags: net
vars_files:
- vars/net.yml
tasks:
- name: Set up network
import_tasks: tasks/net.yml
......
---
- name: Ensure packages are installed for SDN
- name: Ensure packages are installed for SDN and Open vSwitch
apt:
name:
- ifupdown2
- libpve-network-perl
- openvswitch-switch
- name: Template network config
template:
......
......@@ -35,49 +35,47 @@ iface enp4s0f1 inet manual
#Középső
auto bond0
iface bond0 inet static
address {{ admin_ip }}
bond-slaves enp3s0f0 enp3s0f1 enp4s0f0 enp4s0f1
bond-miimon 100
bond-mode balance-xor
bond-xmit-hash-policy layer2
mtu 9000
iface bond0 inet manual
ovs_bonds enp3s0f0 enp3s0f1 enp4s0f0 enp4s0f1
ovs_type OVSBond
ovs_bridge vmbr0
ovs_mtu 9000
ovs_options bond_mode=balance-slb
#Main bond
auto bond0.151
iface bond0.151 inet manual
mtu 9000
#Internal with :80 and :443 NAT
auto vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports bond0 vlan10 vlan151 vlan420
ovs_mtu 9000
#Main vSwitch
auto bond0.420
iface bond0.420 inet static
address {{ cluster_ip }}
mtu 9000
#Cluster network
auto vmbr151
iface vmbr151 inet static
auto vlan10
iface vlan10 inet static
address {{ admin_ip }}
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_mtu 9000
#AdminLAN
auto vlan151
iface vlan151 inet static
address {{ internal_ip }}
gateway 10.151.255.254
bridge-ports bond0.151
bridge-stp off
bridge-fd 0
mtu 9000
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_mtu 9000
ovs_options tag=151
#Internal with :80 and :443 NAT
{% for vlan in vlans %}
auto bond0.{{ vlan.tag }}
iface bond0.{{ vlan.tag }} inet manual
mtu 9000
#{{ vlan.name }}
auto vmbr{{ vlan.tag }}
iface vmbr{{ vlan.tag }} inet manual
bridge-ports bond0.{{ vlan.tag }}
bridge-stp off
bridge-fd 0
mtu 9000
#{{ vlan.name }}
{% endfor %}
auto vlan420
iface vlan420 inet static
address {{ cluster_ip }}
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_mtu 9000
ovs_options tag=420
#Cluster network
source /etc/network/interfaces.d/*
vlans:
- tag: 112
name: MosógépSCH
- tag: 152
name: SCH Internal
- tag: 208
name: KSZK fontos
- tag: 209
name: KSZK belső
- tag: 211
name: Salgó
- tag: 2110
name: Salgó management
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment