No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Huawei Server Maintenance Manual 09

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Bonding NICs on the SUSE OS

Bonding NICs on the SUSE OS

Software and Hardware Preparations

  • SUSE installation CD-ROM of a version later than SLES 10 SP1
  • Network interface card (NIC) testing tool Netperf
  • One RH2285 and two client hosts
  • One S5328C switch
  • One DVD-ROM drive and several network cables

Procedure

The following uses the SLES 11 SP1 operating system (OS) as an example.

  1. Install the driver.

    The bonding driver exists in the OS as a module, but it is not automatically installed. Run modprobe bonding to install the driver.

  2. Create a configuration file for a network port.

    1. On the command-line interface (CLI), run system-config-network to enable Dynamic Host Configuration Protocol (DHCP) startup for network ports eth0 and eth1, and then save the configuration and exit.
    2. Run cd to switch to the /etc/sysconfig/network/ directory and locate the configuration file titled ifcfg-eth* (ifcfg-id-xx:xx:xx:xx:xx:xx on the SUSE 10sp3). Run cat to display information in the ifcfg-eth0 file, as shown in Figure 4-2.
      Figure 4-2 Network port configuration file
    3. Modify parameters.

      Modify the following parameters:

      BOOTPROTO='none'

      STARTMODE='off'

      NOTE:

      Configuration files of SUSE OSs of different versions provide different configuration items. You only need to modify the preceding two configuration items.

      Figure 4-3 shows the new settings.

      Figure 4-3 New settings

      Modify the configuration file ifcfg-eth1 of network port eth1 in the same way.

    4. Create the bond0 configuration file.

      Create the ifcfg-bond0 file in the /etc/sysconfig/network directory, as shown in Figure 4-4.

      Figure 4-4 ifcfg-bond0 file

      Set BROADCAST, IPADDR, NETMASK, and NETWORK according to actual situations.

      The working mode of bonded network ports is set to load balancing: mode = 2 (balance-xor). To use the redundancy mode, set mode to 1 (active-backup). For details about the working modes, see Reference Information.

    5. Run network restart to make the configuration take effect.
      # /etc/init.d/network restart
    NOTE:
    • STARTMODE: specifies when network port bonding takes effect. This parameter can be set to the following values:
    • onboot: specifies that network port bonding automatically takes effect upon system startup.
    • manual: specifies that network port bonding takes effect after the ifup command is run.
    • hotplug: specifies that network port bonding takes effect when a hot plug event occurs.
    • off or ignore: specifies that network port bonding does not take effect.
    • BONDING_MODULE_OPTS
    • miimon: checks links. If miimon is set to 100, the system checks link connection status every 100 ms. If a link fails, the system uses the other link.
    • mode: specifies a working mode. The value ranges from 0 to 6. When mode is set to 2, the load balancing mode is used, which also can be set by setting mode to balance-xor. For details, see Reference Information.
    • BONDING_SLAVEn

      Specifies the active and standby network ports. If the OS is SLES 10 SP1, you can specify active and standby network ports by using Mac addresses. For other OS, you can specify active and standby network ports by using network port names, such as eth0, eth1, and ethx, or other device names. You can also use the bus ID, such as bus-pci-0000:06:08.1. The bus ID is more reliable than the network port name because the bus ID of a network port will not be changed. The value of n in BONDING_SLAVEn increases with the number of bonded network ports.

    • You can create multiple bonding devices and name them as bond0, bond1, and so on. For details, see Reference Information.

Verifying the Bonding

  1. Run ifconfig on the command-line interface (CLI).

    In the command output, the Media Access Control (MAC) address of bond0 is the same as those of network ports eth0 and eth1, and bond0 and network ports eth0 and eth1 share IP address 192.168.18.10, as shown in Figure 4-5.

    Figure 4-5 Querying the MAC address and IP address

  2. Run cat /proc/net/bonding/bond0 to query the bond0 status, as shown in Figure 4-6.

    Figure 4-6 Querying bond0 status

    NOTE:

    To delete network port bonding, uninstall the bonding driver by running the rmmod drivername command, delete the bonding configuration file, and restart the network.

Translation
Download
Updated: 2019-02-25

Document ID: EDOC1000041338

Views: 69163

Downloads: 3767

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next