wtorek, 19 kwietnia 2016

CenOS 7 i bonding

Setup: /etc/modules-load.d/bonding.conf:
bonding
/etc/modprobe.d/bonding.conf:
options bonding max_bonds=0
/etc/sysconfig/network-scripts/ifcfg-host0:
NAME="host0"
DEVICE="host0"
NM_CONTROLLED=no
ONBOOT=yes
USERCTL=no
TYPE=Ethernet
BOOTPROTO=none
BONDING_OPTS="mode=802.3ad lacp_rate=slow miimon=250 xmit_hash_policy=layer2+3"
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPADDR=192.168.1.1
PREFIX=31
GATEWAY=192.168.1.0
/etc/sysconfig/network-scripts/ifcfg-eno1:
NAME=eno1
DEVICE=eno1
TYPE=Ethernet
USERCTL=no
SLAVE=yes
MASTER=host0
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
/etc/sysconfig/network-scripts/ifcfg-eno2:
NAME=eno2
DEVICE=eno2
TYPE=Ethernet
USERCTL=no
SLAVE=yes
MASTER=host0
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no

sobota, 16 kwietnia 2016

Debian i bonding

Setup:
apt-get install vlan ifensalve
/etc/modules:
bonding
/etc/modprobe.d/bonding.conf:
options bonding max_bonds=0
/etc/network/interfaces:
auto host0
iface host0 inet static
        address 192.168.1.2
        netmask 255.255.255.248
        gateway 192.168.1.1
        bond-slaves eno1 eno2
        bond-mode 802.3ad
        bond-miimon 250
        bond-xmit-hash-policy layer2+3

iproute2 vlan

ip link add link eth0 name eth0.100 type vlan id 100
ip link delete eth0.100

Bonding przez sysfs

modprobe bonding max_bonds=0
echo +host0 > /sys/class/net/bonding_masters
echo 802.3ad > /sys/class/net/host0/bonding/mode
echo +eno1 > /sys/class/net/host0/bonding/slaves
echo +eno2 > /sys/class/net/host0/bonding/slaves