Настройка интерфейсов с bonding с LACP и VLAN на OVS на узле¶
Важно
Прочитайте статью до конца. В конце будет крайне полезная информация!
Задача:
- Настроить на ноде lacp.
- Настроить интерфейс
openvswitch(в нашем случае vlan2027).
РЕШЕНИЕ ЗАДАЧИ 1. Настроить на ноде lacp:
$sudo apt-get install ifenslave
В файл /etc/network/interfaces добавить (отредактировать):
auto eth0
iface eth0 inet manual
auto eth1
iface eth1 inet manual
auto bond0
iface bond0 inet static
address 10.193.28.136 #свои адреса
gateway 10.193.28.129
netmask 255.255.255.128
dns-nameservers 10.193.28.130
dns-search accentos.loc
slaves eth0 eth1
bond-mode 802.3ad #This mode creates aggregation groups that share the same speed and duplex settings, and it requires a switch that supports an IEEE 802.3ad dynamic link. Mode 4 uses all interfaces in the active aggregation group. For example, you can aggregate three 1 GB per second (GBPS) ports into a 3 GBPS trunk port. This is equivalent to having one interface with 3 GBPS speed. It provides fault tolerance and load balancing.
bond-lacp-rate slow
Перезагрузить ноду.
Должен быть ping до 10.193.28.136.
РЕШЕНИЕ ЗАДАЧИ 2. Настроить интерфейс openvswitch (в нашем случае vlan2027).
Файл /etc/network/interfaces должен иметь вид:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
allow-ovs br-ex
iface br-ex inet manual
ovs_type OVSBridge
ovs_ports bond0
auto vlan2027
allow-br-ex vlan2027
iface vlan2027 inet static
ovs_type OVSIntPort
ovs_bridge br-ex
# ovs_options tag=2027
address 10.193.28.136/25
gateway 10.193.28.129
auto bond0
allow-br-ex bond0
iface bond0 inet manual
bond-slaves eth0 eth1
bond-mode 802.3ad
bond-miimon 100 # MII Polling Interval (ms)
bond-lacp-rate slow
bond-xmit-hash-policy layer3+4
ovs_bridge br-ex
ovs_type OVSPort
auto eth0
allow-bond0 eth0
iface eth0 inet manual
auto eth1
allow-bond0 eth1
iface eth1 inet manual
dns-nameservers 10.193.28.130
dns-search accentos.loc
Перезагрузить ноду.
Должен быть ping до 10.193.28.136.
Примечание
tag=2027 закомментирован, так как на коммутаторе на порту во время проведения работ не был настроен режим trunk.
Важно
Так как к ноде физического доступа нет, то настоятельно рекомендую перед редактировнием сетевых параметров убедиться, что есть доступ по консоли ipmi к ноде!