Grundlegende System Konfiguration
Dieses Howto beschreibt die grundlegenden Konfigurationsänderungen, welche an Ihrem System vorgenommen werden müssen, bevor es als Mitglied eines Linux Clusters zum Einsatz kommen kann.
Netzwerk anpassen
Kernel-Parameter setzen
Editieren Sie die Datei /etc/sysctl.conf und fügen Sie den folgenden Inhalt an. Sollte der eine oder andere Parameter bereits enthalten sein, dann passen Sie diese bitte entsprechen an.
# Enable configuration of arp_ignore option net.ipv4.conf.all.arp_ignore = 1 # When an arp request is received on eth0, only respond if that address is # configured on eth0. In particular, do not respond if the address is # configured on lo net.ipv4.conf.eth0.arp_ignore = 1 # Dito for eth1, add for all ARPing interfaces #net.ipv4.conf.eth1.arp_ignore = 1 # Enable configuration of arp_announce option net.ipv4.conf.all.arp_announce = 2 # When making an ARP request sent through eth0 Always use an address that # is configured on eth0 as the source address of the ARP request. If this # is not set, and packets are being sent out eth2 for an address that is on # lo, and an arp request is required, then the address on lo will be used. # As the source IP address of arp requests is entered into the ARP cache on # the destination, it has the effect of announcing this address. This is # not desirable in this case as adresses on lo on the real-servers should # be announced only by the linux-director. net.ipv4.conf.eth0.arp_announce = 2 # Dito for eth1, add for all ARPing interfaces #net.ipv4.conf.eth1.arp_announce = 2
Virtuelle Schnittstelle einrichten
Für jede IP-Adresse, unter welcher ein Cluster von aussen ansprechbar sein soll, muss eine Netzwerkschnittstelle definiert werden, welche auf diese IP-Adresse lauscht, und welche wie die Loopback-Schnittstelle nur vom System selbst angesprochen werden kann. In den folgenden Erläuterungen wird eine solche Netzwerkschnittstelle eingerichtet, welche auf die IP-Adresse 192.168.0.100 lauscht.
lo:0 wie er nachfolgend verwendet wird, eindeutig sein muss. Für eine weiter Netzwerkschnittstelle sollten Sie also eine Namen wie etwa lo:1 wählen.
Debian/Ubuntu
Editieren Sie die Datei /etc/network/interfaces und fügen Sie den folgenden Inhalt an.
auto lo:0 iface lo:0 inet static address 192.168.0.100 netmask 255.255.255.255 pre-up sysctl -p > /dev/null
Fedora Core
Legen Sie die Datei /etc/sysconfig/network-scripts/ifcfg-lo:0 an und füegen Sie den folgenden Inhalt ein.
DEVICE=lo:0 IPADDR=192.168.0.100 NETMASK=255.255.255.255 ONBOOT=yes BOOTPROTO=static