In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Linux dual network card binding system environment description: linux 6.5 Em1 network card interface is connected to the main switch. The interface of the Em2 network card is connected to the standby switch. Modify the configuration file: Vi / etc/modprobe.d/dist.conf adds the following two lines of alias bond0 bonding options bonding mode=1 miimon=100 normal usage. In the production environment, I still prefer to use the active / standby mode, which is more conservative. Mode=1 represents the active / standby mode. Mode=0, balanced cycle mode. Mode=6, load balancing mode. Configure the network card file [root@testdb network-scripts] # cat ifcfg-em1 DEVICE=em1 TYPE=Ethernet ONBOOT=yes BOOTPROTO=static MASTER=bond0 SLAVE=yes [root@testdb network-scripts] # cat ifcfg-em2 DEVICE=em2 TYPE=Ethernet ONBOOT=yes BOOTPROTO=static MASTER=bond0 SLAVE=yes [root@testdb network-scripts] # cat ifcfg-bond0 DEVICE=bond0 BOOTPROTO=static IPADDR=192.168.88.101 NETMASK=255.255.255.0 GATEWAY=192.168.88.1 ONBOOT=yes TYPE=Ethernet NM_CONTROLLED=no-this parameter determines the mac address. It is best to keep the two network cards the same. Otherwise, the router recognition fails. Stop the NetworkManager service: chkconfig NetworkManager off service NetworkManager stop modprobe bonding service network restart had better restart the system. Verify whether Ifconfig-a bond0 Link encap:Ethernet HWaddr 44:A8:42:06:E1:C1 inet addr:192.168.88.101 Bcast:15.21.72.255 Mask:255.255.255.0 inet6 addr: fe80::46a8:42ff:fe06:e1c1/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:185 errors:0 dropped:0 overruns:0 frame:0 TX packets:162 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen: 0 RX bytes:19774 (19.3 KiB) TX bytes:48110 (46.9 KiB) em1 Link encap:Ethernet HWaddr 44:A8:42:06:E1:C1 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:156 errors:0 dropped:0 overruns:0 frame:0 TX packets:162 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:16596 (16.2 KiB) TX bytes:48110 (46.9 KiB) Interrupt:35 em2 Link encap:Ethernet HWaddr 44:A8: 42:06:E1:C1 UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:29 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3178 (3.1KiB) TX bytes:0 (0.0b) Interrupt:38 where the three mac addresses are the same. [root@testdb ~] # cat / proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.6.0 (September 26 2009) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: em1 MII Status: up MII Polling Interval (ms): 100Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: em1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 44:a8:42:06:e1:c1 Slave queue ID: 0 Slave Interface: em2 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 44:a8:42:06: E1:c2 Slave queue ID: 0 test whether it is feasible to unplug the first interface See if you can switch automatically, then plug it back in, unplug the second wire, and see if you can switch back and forth successfully.
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.