1 Şubat 2018 Perşembe

Red Hat Enterprise Linux 5.x/6.x bonding ayarlamak

2009 yılındaki çalışma notumu biraz güncelleyerek burada da olsun istedim.

"RHEL 5.3 uzerinde bonding (Bonding Mode: fault-tolerance (active-backup) )" - Remzi AKYUZ - (2009-08-27 06:01:00)

1. /etc/modprobe.d/bonding.conf dosyasına

alias bond0 bonding
options bonding mode=1 miimon=100

satırı ilave edilir.

2. /etc/sysconfig/network-scripts/ifcfg-bond0 dosyası oluşturulur ve içerisine
DEVICE=bond0
TYPE=bond
ONBOOT=yes
HOTPLUG=no
BOOTPROTO=none
USERCTL=no
NM_CONTROLLED=no
BONDING_OPTS="mode=1 miimon=100"
BROADCAST=192.168.1.255
IPADDR=192.168.1.100
NETMASK=255.255.255.0
NETWORK=192.168.1.0


satırı ilave edilir.

3. bondingde kullanılacak ethernetler ayarlanır. eth1 ve eth2 yi kullanacağız

/etc/sysconfig/network-scripts/ifcfg-eth1 icerisinde aşağıdaki satırlar olmalı.

DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
HOTPLUG=no

/etc/sysconfig/network-scripts/ifcfg-eth2 içerisinde aşağıdaki satırlar

DEVICE=eth2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
HOTPLUG=no

4. Kontrol için
[root@localhost ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth1
MII Status: down
Link Failure Count: 0
Permanent HW addr: 08:00:27:5c:33:61

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 08:00:27:a5:24:6a

Son olarakta fiziksel olarak(kablolar sökülüp takılarak test edilir.
Loglardada aşağıdakileri görebiliriz.

#
grep bond /var/log/messages
Aug 27 05:33:55 localhost kernel: bonding: Warning: either miimon or arp_interval and arp_ip_target module parameters must be specified, otherwise bonding will not detect link failures! see bonding.txt for details.
Aug 27 05:33:55 localhost kernel: bonding: bond0: setting mode to active-backup (1).
Aug 27 05:33:55 localhost kernel: bonding: bond0: Setting MII monitoring interval to 100.
Aug 27 05:33:55 localhost kernel: bonding: bond0: Adding slave eth1.
Aug 27 05:33:55 localhost kernel: bonding: bond0: enslaving eth1 as a backup interface with a down link.
Aug 27 05:33:55 localhost kernel: bonding: bond0: Adding slave eth2.
Aug 27 05:33:55 localhost kernel: bonding: bond0: making interface eth2 the new active one.
Aug 27 05:33:55 localhost kernel: bonding: bond0: first active interface up!
Aug 27 05:33:55 localhost kernel: bonding: bond0: enslaving eth2 as an active interface with an up link.
Aug 27 05:37:18 localhost kernel: bonding: bond0: link status definitely up for interface eth1.
Aug 27 05:37:46 localhost kernel: bonding: bond0: link status definitely down for interface eth2, disabling it
Aug 27 05:37:46 localhost kernel: bonding: bond0: making interface eth1 the new active one.


Detaylı bilgi için: https://access.redhat.com/articles/172483

Hiç yorum yok:

Yorum Gönder