Linux performance optimization 16th: network card binding: linux performance optimization 15th: common network parameter sorting http://www.2cto.com/os/201307/230155.html In the production environment, preventing single point of failure (SPOF) is a frequent concern, such as remote backup of databases and hot cluster scheduling... linux performance optimization 16th: network card binding: linux performance optimization 15th: common network parameter sorting http://www.2cto.com/os/201307/230155.html In the production environment, preventing single point of failure is a frequent consideration, such as remote database backup, hot backup at the cluster scheduling end, multi-channel mounting of storage, and redundancy of routers. Most of the data is copied and synchronized to the mobile segment. Data transmission links should also be considered. multiplexing is one of them. Generally, multiple links are used to prevent single point of failure when servers are connected to vswitches, routers, and storage. in linux, Nic binding can be used, nic binding abstracts two or more physical NICs into a logical Nic like bond0. the administrator no longer considers physical NICs like ethN! However, this binding can not only work in the round robin mode, but also in the master/slave mode.> For Linux Ethernet binding, the common working mode 0 (balanced round robin)-round robin policy is used for all interfaces. The round robin method is used to transmit packets in all Slave; any Slave can receive packets. Mode 1 (active backup)-fault tolerance. Only one Slave interface can be used at a time, but if this interface fails, the other Slave will replace it. Mode 3 (broadcast)-fault tolerance. All packets are broadcast through all Slave interfaces. For more information about Nic binding, see: http://www.2cto.com/os/201307/230470.html The following is a simple configuration Method: 1. vi/etc/sysconfig/network-scripts/ifcfg-bond0 # logical interface to be used by the user later, configure dns, gateway is working on this interface. DEVICE = "bond0" BOOTPROTO = "none" ONBOOT = "yes" IPADDR = 192.168.0.60 NETMASK = 255.255.255.0 USERCTL = no BONDING_OPTS = "mode = 1 miimon = 50" # select the working mode, detection interval 2. vi/etc/sysconfig/network-scripts/ifcfg-eth0 # eth0, eth1 belongs to bond0, after the configuration is bound, the user no longer worried about its configuration, DEVICE = "eth0" # you only need to replace the new Nic when a fault occurs! BOOTPROTO = "none" ONBOOT = "yes" MASTER = bond0 SLAVE = yes USERCTL = no 3. vi/etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE = "eth1" BOOTPROTO = "none" ONBOOT = "yes" MASTER = bond0 SLAVE = yes USERCTL = no 4. configure the system to load the binding module: vi/etc/modprobe. d/bonding. conf alias bond0 bonding 5. attach the Slave interface to bond0: vi/etc/rc. d/rc. local ifenslave bond0 eth0 eth1 6. test host restart: cat/proc/net/bonding/bond0 disable the active Nic, and then cat/proc/net/bonding/bond0
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.