Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Network interface configuration bonding

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Bonding binds multiple NICs to the same Ip address to provide services, which can achieve high availability or load balancing. It is not possible to directly set the same IP address to two network cards. Through bonding, a virtual network card provides external connection, and the physical network card is modified to the same MAC address Bonding working mode Mode 0 (balance-rr).

Round-robin strategy: packets are sent on each slave interface sequentially from beginning to end. This model provides load balancing and fault tolerance capability Mode 1 (active-backup)

Active-backup (active / standby) policy: only one slave is activated, and other slave is activated if and only if the active slave interface fails. In order to avoid switch confusion, the MAC address bound at this time is only

Mode 3 (broadcast) is visible on an external port

Broadcast strategy: all messages are sent on all slave interfaces, providing fault tolerance active-backup, balance-tlb and balance-alb modes do not require any special configuration of the switch. Other binding modes require the switch to be configured to integrate links. For example, Cisco switches need to use EtherChannel in modes 0, 2 and 3, but LACP and EtherChannel configurations / etc/sysconfig/network-scripts/ifcfg-bond0 are required in mode 4

DEVICE=bond0

BOOTPROTO=none

BONDING_OPTS= "miimon=100 mode=0" / etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

USERCTL=no View bond0 status

/ proc/net/bonding/bond0

Delete bond0

Ifconfig bond0 down

Rmmod bonding

Configure Bonding by modifying files to create configuration files for bonding devices

Miimon is used for link monitoring. If miimon=100, then the system monitors the link connection status every 100ms, and if one line fails, it is transferred to another line.

Mode is used to specify the operating mode of Bonding

View the status of bond0

Bond0 creation completed

Uninstall bond0

Perform ifconfig bond0 down before uninstalling to take the bond0 device offline

Find the state information of the modules of bond that have been loaded into the kernel, and execute the rmmod command to delete bond0

Recover the original file information and restart the network service

Nmcli implements bonding to add bonding interface

   nmcli con add type bond con-name mybond0 ifname bond0 mode active-backup add Slave Interface

   nmcli con add type bond-slave ifname ens7 master bond0

For    nmcli con add type bond-slave ifname ens3 master bond0 to start binding, you must first start the slave interface

   nmcli con up bond-slave-eth0

   nmcli con up bond-slave-eth2 starts binding

   nmcli con up mybond0

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report