Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
— |
bonding_ubuntu [2015/05/29 20:24] (aktuell) admin angelegt |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== Bonding (Ubuntu) ====== | ||
+ | Mit Bonding lassen sich mehrere physisch getrennte Netzwerkinterfaces zu einem logischen Interface zusammen gefasst. Je nach gewähltem Modus kann man dieses dann nur zur Ausfallsicherheit (active-backup) oder zur Lastverteilung (balance) benutzen. | ||
+ | |||
+ | Für Bonding braucht man die Pakete: | ||
+ | |||
+ | * ifenslave | ||
+ | * ifenslave-2.6 (wird über die Paketabhängigkeit mitinstalliert) | ||
+ | |||
+ | apt-get install ifenslave | ||
+ | |||
+ | Im Anschluß muss noch die Netzwerkkonfiguration angepasst werden. | ||
+ | |||
+ | /etc/network/interfaces | ||
+ | . | ||
+ | . | ||
+ | . | ||
+ | # The primary network interface | ||
+ | auto bond0 | ||
+ | iface bond0 inet static | ||
+ | address 192.168.3.111 | ||
+ | netmask 255.255.255.0 | ||
+ | network 192.168.3.0 | ||
+ | broadcast 192.168.3.255 | ||
+ | gateway 192.168.3.254 | ||
+ | post-up ifenslave bond0 eth0 eth1 | ||
+ | pre-down ifenslave bond0 eth0 eth1 | ||
+ | |||
+ | Bei eingerichtetem Channel auf dem Switch: | ||
+ | |||
+ | /etc/modules | ||
+ | bonding mode=balance-xor miimon=100 | ||
+ | |||
+ | Ohne Channel auf dem Switch: | ||
+ | |||
+ | /etc/modules | ||
+ | bonding mode=active-backup miimon=100 | ||
+ | | ||
+ | ======= Ab Ubuntu 10.04 ======= | ||
+ | <code> | ||
+ | auto bond0 | ||
+ | iface bond0 inet static | ||
+ | address 192.168.2.123 | ||
+ | netmask 255.255.255.0 | ||
+ | gateway 192.168.2.254 | ||
+ | bond-slaves eth0 eth1 | ||
+ | bond_mode active-backup | ||
+ | bond_miimon 100 | ||
+ | |||
+ | </code> | ||
+ | |||
+ | ======= WLAN0 und ETH0 ======= | ||
+ | Zur Bündelung von WLAN0 und ETH0 muss zunächst am Desktop der NetzwerkManager deaktiviert bzw. deinstalliert werden. Danach muss dass Bonding mit den entsprechenden Besonderheiten für das WLAN konfiguriert werden. | ||
+ | <code> | ||
+ | # /etc/network/interfaces | ||
+ | auto lo | ||
+ | iface lo inet loopback | ||
+ | |||
+ | auto bond0 | ||
+ | iface bond0 inet static | ||
+ | address 192.168.5.10 | ||
+ | netmask 255.255.255.0 | ||
+ | broadcast 192.168.5.255 | ||
+ | gateway 192.168.5.1 | ||
+ | wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf | ||
+ | up ifenslave bond0 wlan0 eth0 | ||
+ | post-up wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -bbond0 & | ||
+ | down ifenslave -d bond0 wlan0 eth0 | ||
+ | </code> | ||
+ | |||
+ | Außerdem muss natürlich die ''/etc/wpa_supplicant/wpa_supplicant.conf'' mit den richtigen WLAN-Angaben konfiguriert sein. | ||
+ | <code> | ||
+ | # /etc/wpa_supplicant/wpa_supplicant.conf | ||
+ | ctrl_interface=/var/run/wpa_supplicant | ||
+ | eapol_version=1 | ||
+ | ap_scan=1 | ||
+ | network={ | ||
+ | ssid="name-des-wlan" | ||
+ | scan_ssid=1 | ||
+ | proto=RSN | ||
+ | key_mgmt=WPA-PSK | ||
+ | pairwise=CCMP | ||
+ | group=CCMP | ||
+ | psk="kennwort" | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | Details zur WLAN-Konfiguration gibt es unter: http://wiki.ubuntuusers.de/WLAN/wpa_supplicant | ||
+ | ======= aktive Karte im Bond ändern ======= | ||
+ | Mit folgendem Command kann man die aktive Karte in einem Bond ändern. Im Bespiel wird im Bond0 auf eth2 gewechselt. | ||
+ | <code bash> | ||
+ | ifenslave -c bond0 eth2 | ||
+ | </code> | ||
+ | |||
+ | --- //[[mail@jbackes.de|JB]] 2008/09/08 23:02// |