Implement dual-nic load balancing in Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. System Environment: RHEL5
Hardware environment: IBM X3650
Ii. Edit the eth0 and eth information files of the original Nic
Make the content as follows:
[Root @ yangwenjun network-scripts] # ifcfg-eth0 more
# Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet
DEVICE = eth0
BOOTPROTO = none
ONBOOT = yes
TYPE = Ethernet
MASTER = bond0
Slave = yes
[Root @ yangwenjun network-scripts] # ifcfg-eth1 more
# Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet
DEVICE = eth1
BOOTPROTO = none
ONBOOT = yes
TYPE = Ethernet
MASTER = bond0
Slave = yes
[Root @ yangwenjun network-scripts] #
3. edit/etc/modprobe. conf and add the following two lines.
[Root @ yangwenjun network-scripts] # vi/etc/modprobe. conf
Alias bond0 bonding
Options bond0 miimon = 100 mode = 1
My modprobe. conf content is as follows:
[Root @ yangwenjun network-scripts] # more/etc/modprobe. conf
Alias eth0 bnx2
Alias eth1 bnx2
Alias scsi_hostadapter aacraid
Alias scsi_hostadapter1 ata_piix
Alias peth0 bnx2
Alias bond0 bonding
Options bond0 miimon = 100 mode = 1
4. Edit the/etc/rc. d/rc. local file and add
Ifenslave bond0 eth0 eth1
After the Server Load balancer instance is restarted, it can work normally. You can use ifconfig to view the specific information.
[Root @ yangwenjun network-scripts] # ifconfig
Bond0 Link encap: Ethernet HWaddr 00: 1A: 64: 6A: 55: 98
Inet addr: 192.168.1.3 Bcast: 192.168.1.255 Mask: 255.255.255.0
Inet6 addr: fe80: 21a: 64ff: fe6a: 5598/64 Scope: Link
Up broadcast running master multicast mtu: 1500 Metric: 1
RX packets: 985369 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 804306 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 148943796 (142.0 MiB) TX bytes: 2097755332 (1.9 GiB)
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