Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Skapa en närverkskanalbindning i Linux

Summary: Den här artikeln innehåller information om hur du skapar en NIC-kanalbindning i RHEL 5.x\6.x.

This article applies to   This article does not apply to 

Symptoms

 

Cause

 

Resolution

Miljö: RHEL 5.x/6.x

Genom att följa exemplet nedan skapas en NIC-kanalbindning med eth0, eth1 och resursallokeringsprincip för feltolerans och belastningsutjämning:

  1. Som root skapar du en Bond0-konfigurationsfil: # vi /etc/sysconfig/network-scripts/ifcfg-bond0
     
  2. Lägg till följande rader i Bond0-konfigurationsfilen:

    DEVICE=bond0
    IPADDR=192.168.1.10
    NETWORK=192.168.1.0
    NETMASK=255.255.255.0
    USERCTL=no
    BOOTPROTO=none
    ONBOOT=yes
    BONDING_OPTS="mode=0 miimon=100"
Obs! Ersätt inställningarna för IP-adress, nätverk och nätmask i enlighet med detta.
Obs! En detaljerad beskrivning av bindningsalternativen finns i Red Hats distributionsguide.
  1. Öppna konfigurationsfilen för eth0:

    # vi /etc/sysconfig/network-scripts/ifcfg-eth0

     
  2. Redigera eth0-konfigurationsfilen genom att lägga till parametrarna "MASTER" och "SLAVE":

    DEVICE=eth0
    USERCTL=no
    ONBOOT=yes MASTER=bond0

    SLAVE=yes
    BOOTPROTO=none

     
  3. Upprepa steg #3 och #4 för eth1.
     
  4. Öppna konfigurationsfilen för kernelmoduler:

    RHEL5 # vi /etc/modprobe.conf

    RHEL6 # vi /etc/modprobe.d/modprobe.conf
     
Obs! modprobe.conf-filen finns inte på RHEL6. Efter steget ovan kommer filen att skapas.
  1. Lägg till följande rad i modprobe.conf-filen:

    Alias Bond0 bindningsalternativ
    bond0 läge = balans-RR MIIMON = 100

     
  2. Ladda bindningsmodulen:

    # modprobe bindning

     
  3.  Starta om nätverkstjänsten:

    # Omstart av servicenätverk

     
  4. Kontrollera om bindningsgränssnittet har skapats genom att titta på utdata från ifconfig-kommandot:

    # ifconfig

     
Utdata bör lista bond0 igång som master och eth0\eth1 igång som slavar.

  

Affected Products

Servers, PowerEdge, Red Hat Enterprise Linux Version 5, Red Hat Enterprise Linux Version 6
Article Properties
Article Number: 000177048
Article Type: Solution
Last Modified: 08 Oct 2021
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.
Article Properties
Article Number: 000177048
Article Type: Solution
Last Modified: 08 Oct 2021
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.