Dual NIC configuration under Redhat system


  •     SPOTO
  • |
  •   Posted on: 2019-11-21
  • |
  •   Views: 48
  • |
  •   Category:
  • Redhat Linux


Premise:

1. Do not configure on the virtual machine. Whether it is vm5 or vm6, I have tried it many times, every time it seems to be successful, but when I use the machine ping to do the network test, I will find the truth;

2. Must use the same brand NIC of the same brand. Two different network cards, after the configuration of the document, even if you ping the external address from the machine, you will find that the network seems to be completely broken;

3. Use service network restart carefully. After the test is successful, avoid performing network restart on the dual NIC machine. Otherwise, you will find that the network is unreachable. Even if you manually execute ifenslave eth0 eth1 again, you can only activate one NIC.


Let's talk about the configuration:

1. NIC configuration

#cd /etc/sysconfig/network-scripts/

#cp ifcfg-eth0 ifcfg-bond0

#vi ifcfg-bond0

Change the first line to 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 configuration of other network cards is as follows:

# cat ifcfg-eth0

DEVICE=eth0

ONBOOT=yes

BOOTPROTO=none

# cat ifcfg-eth1

DEVICE=eth0

ONBOOT=yes

BOOTPROTO=none


More Info

2. Edit the /etc/modules.conf or /etc/moprobe.conf file

Add the following line

Alias bond0 bonding

Options bond0 miimon=100 mode=1


3. Start the configuration

# vi /etc/rc.d/rc.local

Join

Ifenslave bond0 eth0 eth1

After restarting the machine, use ifconfig -a to check the configuration information of the network card. If the mac address and ip address of the three network cards of bond0, eth0, and eth1 are the same, then the description is good.


4. Test verification

Use a machine on the same network segment to do the ping test. Manually remove any network cable from the dual NIC machine (or use ifup eth0&&ifdown eth1). The terminal of the ping machine should have no interrupt information, or there is a "timeout". Quick recovery proves that the test is successful.


Welcome to SPOTO CLUB to get more red hat linux material.

Related products:


Start the discussion...


To Leave a Comment or reply to posts please log in

Leave the first review or rate the article...


To leave a review and rate the article, please log in