CentOS Network Basics: (5) set up multi-NIC binding IP

Source: Internet
Author: User
Tags failover

Action Example: Bind eth01/eth02 to an IP

(1) In modifying kernel module configuration file/etc/modprobe.conf, add the following content:

###### Bonding Start ##### #alias bond0 bondingoptions Bonding max_bonds = 1###### Bonding End ########

(2) Establish bonding network card file/ETC/SYSCONFIG/NETWORK-SCRIPTS/IFCFG-BOND0, configured as follows:

Device=bond0onboot=yesbootproto=staticipaddr=192.168.100.21netmask=255.255.255.0userctl=nobonding_opts= "mode=1 miimon=100 primary=eth01 "

*bonding_opts parameter reference:

parm:           max_bonds:max number of  bonded devices  (int) parm:           tx_queues :max number of transmit queues  (default = 16)   (int) parm:            num_grat_arp:number of gratuitous arp  packets to send on failover event  (int) parm:            num_unsol_na:Number of unsolicited IPv6 Neighbor  advertisements packets to send on failover event  (int) parm:            miimon:Link check interval in  milliseconds  (int) parm:           updelay:delay  before considering link up, in milliseconds  (int) parm:            downdelay:delay before considering link down, in milliseconds   (int) parm:           use_carrier:use netif_ carrier_ok  (VS MII IOCTLS)  in miimon; 0 for off, 1 for  on  (default)   (int) Parm:           mode:mode  of operation; 0 for balance-rr, 1 for active-backup, 2 for  balance-xor, 3 for broadcast, 4 for 802.3ad, 5 for  balance-tlb, 6 for balance-alb  (CHARP) parm:            primary:Primary network device to use  (CHARP) parm:            primary_reselect:reselect primary slave once it comes  up; 0 for always  (default), 1 for only if speed of  primary is better, 2 for only on active slave failure  (Charp ) parm:           lacp_rate:lacpdu tx rate  to request from 802.3ad partner; 0 for slow, 1 for  fast  (CHARP) parm:           ad_select:803.ad  aggregation selection logic; 0 for stable  (default), 1 for  bandwidth, 2 for count  (CHARP) parm:            xmit_hash_policy:balance-xor and 802.3ad hashing method; 0 for  layer 2  (default), 1 for layer 3+4, 2 for layer 2+3  (CHARP) parm:            arp_interval:arp interval in milliseconds  (int) Parm:           arp_ip_target:arp targets  in n.n.n.n form  (ARRAY OF CHARP) parm:            arp_validate:validate src/dst of ARP probes; 0 for  none  (default), 1 for active, 2 for backup, 3 for all  ( CHARP) parm:           fail_over_mac:for  Active-backup, do not set all slaves to the same mac; 0  for none  (default), 1 for active, 2 for follow  (CHARP) Parm:            all_slaves_active:keep all frames received on an  interfaceby setting active flag for all slaves; 0 for never   (default), 1 for always.  (int) parm:            resend_igmp:number of igmp membership reports to send on  link failure  (int)

(3) Modify the ETH01 network card configuration file:

Device=eth01master=bond0slave=yeshwaddr=54:22:22:00:7a:37:ceonboot=yes

To modify the NIC configuration file for eth02:

Device=eth02master=bond0slave=yeshwaddr=54:22:22:00:7a:37:ceonboot=yes

(4) Import bonding drive, restart Network Service after the effective

>modprobe-i Bonding Max_bonds=1>service Network restart



This article is from the "Margin with Wish" blog, please be sure to keep this source http://281816327.blog.51cto.com/907015/1615281

CentOS Network Basics: (5) set up multi-NIC binding IP

Related Article

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.