Linux Link Aggregation: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 58: Zeile 58:
 
         pre-up ifup bond0
 
         pre-up ifup bond0
 
         post-down ifdown bond0
 
         post-down ifdown bond0
 +
 +
=check=
 +
<pre>
 +
xinux@doom:/proc$ cat /proc/net/bonding/bond0
 +
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
 +
 +
Bonding Mode: IEEE 802.3ad Dynamic link aggregation
 +
Transmit Hash Policy: layer2 (0)
 +
MII Status: up
 +
MII Polling Interval (ms): 100
 +
Up Delay (ms): 0
 +
Down Delay (ms): 0
 +
 +
802.3ad info
 +
LACP rate: fast
 +
Min links: 0
 +
Aggregator selection policy (ad_select): stable
 +
Active Aggregator Info:
 +
Aggregator ID: 1
 +
Number of ports: 2
 +
Actor Key: 17
 +
Partner Key: 33
 +
Partner Mac Address: 00:23:eb:b1:07:e6
 +
 +
Slave Interface: eth2
 +
MII Status: up
 +
Speed: 1000 Mbps
 +
Duplex: full
 +
Link Failure Count: 0
 +
Permanent HW addr: 00:15:17:78:68:17
 +
Aggregator ID: 1
 +
Slave queue ID: 0
 +
 +
Slave Interface: eth1
 +
MII Status: up
 +
Speed: 1000 Mbps
 +
Duplex: full
 +
Link Failure Count: 0
 +
Permanent HW addr: 00:15:17:78:68:16
 +
Aggregator ID: 1
 +
Slave queue ID: 0
 +
</pre>
 +
  
 
=bonding-problem=
 
=bonding-problem=

Version vom 17. August 2015, 11:13 Uhr

Installation

apt-get install ifenslave-2.6

Weitere nützliche Tools

sudo apt-get install net-tools ethtool bmon 

=Integrität und Funtkionscheck

root@crank:~# mii-tool
eth4: negotiated 1000baseT-FD flow-control, link ok
eth5: negotiated 1000baseT-FD flow-control, link ok

/etc/network/interfaces

auto bond0
iface bond0 inet static
        address 172.27.233.100
        netmask 255.255.255.0
        bond-mode  802.3ad
        bond-miimon 100
        bond-lacp-rate 1
        bond-slaves none
auto eth4
iface eth4 inet manual
        bond-master bond0   
auto eth5
iface eth5 inet manual
        bond-master bond0 

Link aggregation

Bonding mit Lanbridge

iface bond0 inet manual
        bond-mode  802.3ad
        bond-miimon 100
        bond-lacp-rate 1
        bond-slaves none
        post-up ifup eth1
        post-up ifup eth2

iface eth1 inet manual
        bond-master bond0

iface eth2 inet manual
        bond-master bond0

auto lan
iface lan inet static
        address 192.168.241.180
        netmask 255.255.248.0
        gateway 192.168.240.100
        dns-nameservers 192.168.241.21
        dns-domain xinux
        bridge_ports bond0
        bridge_stp on
        bridge_fd 0
        bridge_maxwait 0
        pre-up ifup bond0
        post-down ifdown bond0

check

xinux@doom:/proc$ cat /proc/net/bonding/bond0 
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
	Aggregator ID: 1
	Number of ports: 2
	Actor Key: 17
	Partner Key: 33
	Partner Mac Address: 00:23:eb:b1:07:e6

Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:17:78:68:17
Aggregator ID: 1
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:15:17:78:68:16
Aggregator ID: 1
Slave queue ID: 0


bonding-problem

Infos

  • Mode0 = balance-rr [Round-Robin-Verfahren -> umso mehr Upload-Gesamtbandbreite, denn diese werden auf die übrigen freien Schnittstellen aufgeteilt]
  • Mode1 = active-backup [Nur eine Schnittstelle ist aktiv, im Fehlerfalle wird eine der anderen im Verbund genutzt]
  • Mode4 = 802.3ad [die Bündelung mehrerer Schnittstellen mit gleichen Übertragungseinstellungen, um eine höhere Bandbreite zu erhalten. Es kann nur ein Switch verwendet werden, dieser muss 802.3ad unterstützen]


  • slaves: Welche Schnittstellen diesem Bond zugehörig sind, "all", falls alle.
  • bond_mode: 0 bis 6 oder Names des Modus, in dem der bonding-Treiber arbeiten soll.
  • bond_miimon: Das bonding-Modul überprüft alle 100ms den Link-Status aller gebündelten Schnittstellen.
  • bond_updelay: Wenn eine Schnittstelle als (wieder) aktiv erkannt wird, werden 200ms abgewartet, ehe der bonding-Treiber das interface wieder in den Verbund integriert, ansonsten sofort.
  • bond_downdelay: Gibt es einen Übertragungsfehler oder Aussetzer, so betrachtet das bonding-Modul die Schnittstelle erst nach 200ms als verloren und entfernt diese aus dem bond, ansonsten sofort.