Configure the bonding Server Load balancer and mutual backup for the NIC in SkbyiltiyHA

Source: Internet
Author: User
In SkbyiltiyHA, configure the bonding Server Load balancer and mutual backup for the NIC-Linux Enterprise Application-Linux server application information. For more information, see the following. For a RedHat system, you must first delete several Nic configuration files starting with ifcfg in/etc/sysconfig/network-script, because you do not need to set IP information for each Nic When configuring bonding, if it is a SLESt system, delete the ifcfg-eth0-switched file in/etc/sysconfig/network.

Note: Do not delete lo's Nic configuration file

Modify the/etc/init. d/network file and add the following information in sequence:

1. Find the code segment for starting the NIC. The SLES system is about 817 lines, such:
Rc_reset
If [-z "$ INTERFACE"]; then
$ FAKE ifup-route noiface-o rc $ MODE
Rc_status
Test $ FAILED-gt 0 & rc_failed 7
Echo-n "Setting up service network ................"
Rc_status-v
Fi

Reload_firewall not_on_boot
Modprobe bonding mode = balance-rr miimon = 100
Ifconfig bond0 netmask <子网掩码> Broadcast <广播地址>
Ifenslave bond0 eth0
Ifenslave bond0 eth0
;;

Add the following content to the double quotation marks:
Modprobe bonding mode = balance-rr miimon = 100
Ifconfig bond0 netmask <子网掩码> Broadcast <广播地址>
Ifenslave bond0 eth0
Ifenslave bond0 eth1

# Parameters:
# Mode = balance-rr: Server Load balancer
# Mode = active-backup for mutual backup
# If you use the mutual standby mode, you need to add the parameter primary = ethx, for example:
# Modprobe bonding mode = active-backup miimon = 100 primary = eth0
# Eth0 and eth1 are two physical NICs.

2. Add:
About 853 rows
$ FAKE ifdown-dhcp all-o rc
Rc_status
Rm-f $ RUN_FILES_BASE/if -*
Rm-f $ NETWORK_RUNFILE
Echo-n "Shutting down service network ..............."
Rc_status-v
Fi
Ifenslave-d bond0 eth2
Ifenslave-d bond0 eth3
Ifconfig bond0 down
Modprobe-r bonding
;;

3. Restart the network
>/Etc/init. d/network restart

You can use bond0 as the network interface in the HA service configuration.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.