Linux system under the two-card configuration Practice Summary _ Networking Tutorials
Source: Internet
Author: User
Premise:
1. Do not configure on the virtual machine. Whether it is VM5 or VM6, I have tried many times, each is seemingly successful, but the machine ping do break the network test will find the truth;
2. Must use the same brand with the model card. Two different network cards, according to the document configured, even from the local ping external address, you will find that the network seems to be completely broken;
3. Use service network restart carefully. After the completion of the test, avoid the operation of network restart on the dual NIC machine, otherwise you will find that the network is not working, even if you manually perform Ifenslave eth0 eth1 can only activate a network card.
Let's say the configuration:
1. Network card Configuration
#cd/etc/sysconfig/network-scripts/
#cp Ifcfg-eth0 ifcfg-bond0
#vi ifcfg-bond0
Change the first line into device=bond0
# Cat Ifcfg-bond0
Device=bond0
Bootproto=static
ipaddr=192.168.1.100
netmask=255.255.255.0
broadcast=192.168.1.255
Onboot=yes
Type=ethernet
The other network adapters are configured as follows:
# Cat Ifcfg-eth0
Device=eth0
Onboot=yes
Bootproto=none
# Cat Ifcfg-eth1
Device=eth0
Onboot=yes
Bootproto=none
2. Module configuration
Edit/etc/modules.conf or/etc/moprobe.conf files
Join the following line
Alias Bond0 Bonding
Options Bond0 miimon=100 mode=1
3. Start configuration
# vi/etc/rc.d/rc.local
Join
Ifenslave bond0 eth0 eth1
Restart the machine, use IFCONFIG-A to view the network card configuration information, if found bond0,eth0,eth1 three network card MAC address and IP address are the same, then the description is good.
4. Test verification
With the outside of the same network segment of a machine to ping test, the dual network card machine manually unplug any of them (or use ifup eth0&&ifdown eth1), ping machine terminal should not interrupt information, or have a "timeout" Soon after the recovery, the test proved successful
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