Binding mulitiple IP addresses to a single ethernet device

  1. copy ethernet confiuretion files

    1
    cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1
  2. edited configuretions files

    1
    2
    3
    4
    vi /etc/sysconfig/network-scripts/ifcfg-eth0:1
    # change the following:
    DEVICE="eth0:1"
    NAME="System eth0:1"
  3. delete the following lines:

    1
    2
    HWADDR=XX:XX:XX:XX:XX:XX
    UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  4. change you IP

    1
    IPADDR=XXX.XXX.XXX.XXX
  5. save files, restart the network service

    1
    2
    # service network restart
    # ifconfig

Bonding two Ethernet devices

  1. install packages

    1
    # yum -y install bind-utils ethtool
  2. create bond files

    1
    # vi /etc/sysconfig/network-scripts/ifcfg-bond0
  3. add following lines

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    DEVICE="bond0"
    NAME="System bond0"
    NM_CONTROLLED="no"
    USERCTL=no
    ONBOOT=yes
    TYPE=Ethernet
    BOOTPROTO=none
    DEFROUTE=yes
    PEERDNS=no
    PEERROUTES=yes
    IPV4_FAILURE_FATAL=yes
    IPV6INIT=no
    IPADDR=XXX.XXX.XXX.XXX
    NETMASK=XXX.XXX.XXX.XXX
    BROADCAST=XXX.XXX.XXX.XXX
  4. modify eth0 configuration files:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # vi /etc/sysconfig/network-scripts/ifcfg-eth0

    DEVICE="eth0"
    NM_CONTROLLED="no"
    ONBOOT=yes
    HWADDR=XX:XX:XX:XX:XX:XX
    UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
    TYPE=Ethernet
    BOOTPROTO=none
    NAME="System eth0"
    USERCTL=no
    MASTER=bond0
    SLAVE=yes
  5. repeat this step for each Ethernet device

  6. create the bonding module configuration file:

    1
    2
    3
    # vi /etc/modprobe.d/bonding.conf
    alias bond0 bonding
    options bond0 mode=5 miimon=100
  7. save file and register the bonding module

    1
    # modprobe bonding
  8. finally, restart the network service.

    1
    # service network restart