In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about the network card Teaming under rhel7.3. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
For the server, binding multiple network cards (link aggregation) is a very common requirement. Linux supports bonding in the earlier version of kernel. The network connections of multiple Ethernet ports can be aggregated through bonding, which can provide greater network bandwidth on the one hand and better reliability and port redundancy guarantee on the other.
There are seven modes of Bonding configuration (from bond0 to bond6), which provide different packet sending and receiving methods and port redundancy mechanisms. There are also different requirements for uplink switch configuration and network card, which need to be selected according to different application scenarios.
There are three commonly used ones:
Mode=0: load balancing mode, with automatic backup, but requires "Switch" support and setting.
Mode=1: automatic backup mode. If one line is disconnected, the other lines will be backed up automatically.
Mode=6: load balancing mode, automatic backup, no need for "Switch" support and setting.
There are two failover mechanisms for Bonding interfaces, one is called MII monitor, which only monitors the status of the port, and the other is ARP monitor, which tests the network connection status by sending arp. The MII monitor method is relatively simple, but there is a problem of inaccurate state detection. For example, for optical port network cards, if one of the two optical fibers is interrupted, for the network cards that receive light normally and the light is broken, the change of the link state can not be detected. ARP monitor uses sending arp query to test IP connectivity to see if it has received arp reply. You can also configure multiple Target to test, which is more accurate than MII monitor.
Double Nic binding technology is used in rhel6/centos6, while teaming technology is used in rhel7.3. In fact, dual Nic binding in rhel7.3 can use both teaming and bonding. Here, teaming technology is recommended to facilitate viewing and monitoring.
The function of Teaming is mainly composed of team driver in kernel, libteam lib used as communication interface and teamd of userspace. Teaming also supports different working modes. Compared with bonding, there is less support for balance-xor and balance-alb, in which balance-xor can be completely replaced by lacp, and another balance-alb function is said to be supported by teaming in the future.
Broadcast (data is transmitted over all ports)
Roundrobin (data is transmitted over all ports in turn)
Activebackup (one port or link is used while others are kept as a backup)
Loadbalance (with active Tx load balancing and BPF-based Tx port selectors)
Lacp (implements the 802.3ad Link Aggregation Control Protocol)
In essence, the purpose of teaming is to remove the functions bound to the network card from kernel, put these functions into userspace to solve, keep kernel concise, and let it only do what kernel should do.
The two most common dual Nic binding modes of rhel7.3 are introduced in this article:
(1) activebackup-active / standby mode
One network card is active, the other is in the backup state, and all traffic is processed on the main link. When the active network card down is down, the backup network card is enabled.
(2) roundrobin-polling mode
All links are in a state of load balancing, which increases bandwidth and supports fault tolerance.
Take activebackup-active / standby mode as an example to do the following example configuration:
1. Enter the system and check the configuration of the server network card.
As shown in the above figure, there are ens3 and ens8 network cards with a total of 4 ports. It is decided to configure dual Nic binding for the two network segments, two ports of ens3f0 and ens8f0 for the service network and two ports of ens3f1 and ens8f1 for the private network.
2. We can use the nmcli command to bind the ENI, as shown below:
Configure the main interface team0 of the business network, and set the mode to activebackup
Nmcli con add type team con-name team0 ifname team0 config' {"runner": {"name": "activebackup"}'
Set IP address, subnet mask, gateway
Nmcli con mod team0 ipv4.addresses 11.11.205.145/28ipv4.gateway 11.11.205.158 ipv4.method manual connectio.autoconnect yes
Add port ens3f0 bound to team0
Nmcli con add type team-slave con-name team0-port1 ifname ens3f0 master team0
Add port ens8f0 bound to team0
Nmcli con add type team-slave con-name team0-port2 ifname ens8f0 master team0
Reload connection configuration
Nmcli con reload
Start team0
Nmcli con up team0
3. Check the status and use the teamdctl command to verify
4. It is found that all the conditions are normal.
5. If you need to try to change to roundrobin mode, you can go to the configuration files of team0 and team1 and change the mode to roundrobin. Other configurations remain unchanged.
Tip: when binding a network card, if you find that the physical network card cannot always be bound to team0, please check whether the physical network card is in up state.
The above is what the network card Teaming under rhel7.3 is like. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.