In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to use Linux bonding". Friends who are interested might as well take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to use Linux bonding.
Under Linux bonding, it is sometimes necessary to bind multiple IP to a network card. This paper introduces the implementation method in Redhat series (redhat,Fedora Core,Centos) and a method that is generally applicable in other Linux, such as Gentoo.
1. The implementation method of binding multiple IP with single network card in Redhat series.
Assuming that the Nic that needs to bind multiple IP is eth0, create a file called ifcfg-eth0:0 in the / etc/sysconfig/network-scripts directory. The sample content is as follows:
DEVICE= "eth0:0" IPADDR= "192.168.0.2" BROADCAST= "172.168.0.255" NETMASK= "255.255.255.0" ONBOOT= "yes"
Where DEVICE is the name of the device, IPADDR is the IP address of the device, BROADCAST is the broadcast address, NETMASK is the subnet mask, and ONBOOT means to start automatically when the system starts. If you need to bind another IP address, just add the file name and the eth0:x in the DEVICE in the file. LINUX can support up to 255IP aliases
2. A generally applicable implementation method of binding multiple IP to a single network card.
Ifconfig eth0:1 192.168.0.3 broadcast 192.168.0.255 netmask 255.255.255.0 can add the above command to the boot self-run file, which is / etc/conf.d/local.start under Gentoo, while some versions of Linux are / etc/rc.d/rc.local.
3. The realization method of sharing single IP with multiple network cards.
Use multiple network cards to become a virtual network card with the same IP address. This technology already exists in sun and cisco, called Trunking and etherchannel technology, respectively, and in Linux bonding, it is called Linux bonding. Because Linux bonding is already included in kernel 2.4.x, you only need to select Bonding driver support in the network device options at compile time.
Then, recompile the core, restart the computer, and execute the following command:
Ismod bonding ifconfig eth0 down ifconfig eth2 down ifconfig bond0 ipaddress ifenslave bond0 eth0 ifenslave bond0 eth2
Now the two network cards are working as one, which can improve the data transmission between the cluster nodes. You * write these sentences into a script and then call them by / etc/rc.d/rc.local or / etc/conf.d/local.start to take effect as soon as you boot.
Linux bonding is a good choice for servers. When there is no gigabit network card, using two or three 100 megabit network cards as Linux bonding can greatly increase the bandwidth between the server and the switch. However, you need to set up on the switch that the two ports connected to the Linux bonding Nic are mapped to the same virtual interface.
At this point, I believe you have a deeper understanding of "how to use Linux bonding". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.