Differences

This shows you the differences between two versions of the page.

Link to this comparison view

rb:ethernetbonding [10/10/2013 14:21] (current)
Line 1: Line 1:
 +====== Ethernet Bonding ======
  
 +====== Linux Network ======
 +
 +
 +===== Ethernet Bonding =====
 +
 +The bonding driver needs to be passed some parameters in modprobe.conf. ​
 +
 +  [root@gy-asp-db03 network-scripts]#​ cat /​etc/​modprobe.conf
 +  alias eth0 bnx2
 +  alias eth2 bnx2
 +  alias bond0 bonding
 +  options bond0 mode=1 miimon=100 max_bonds=2
 +  alias bond1 bonding
 +  options bond1 mode=1 miimon=100
 +
 +The ''​mode=1''​ tells it to use active/​passive,​ ''​miimon''​ sets the interval to check the mii interface to detect a failed link, and ''​max_bonds''​ sets the required number of bonding interfaces, default is 1.
 +
 +
 +  [root@gy-asp-db03 network-scripts]#​ pwd
 +  /​etc/​sysconfig/​network-scripts
 +  [root@gy-asp-db03 network-scripts]#​ cat ifcfg-bond0
 +  DEVICE=bond0
 +  IPADDR=172.27.206.93
 +  NETMASK=255.255.255.0
 +  NETWORK=172.27.206.0
 +  ONBOOT=yes
 +  BOOTPROTO=none
 +  USERCTL=no
 +  ​
 +  [root@gy-asp-db03 network-scripts]#​ cat ifcfg-eth0
 +  # Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet
 +  DEVICE=eth0
 +  HWADDR=1C:​C1:​DE:​07:​BB:​F0
 +  BOOTPROTO=none
 +  ONBOOT=yes
 +  MASTER=bond0
 +  SLAVE=yes
 +  USERCTL=no
 +  ​
 +  [root@gy-asp-db03 network-scripts]#​ cat ifcfg-eth2
 +  # Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet
 +  DEVICE=eth2
 +  HWADDR=D4:​85:​64:​68:​AA:​32
 +  BOOTPROTO=none
 +  ONBOOT=yes
 +  HOTPLUG=no
 +  MASTER=bond0
 +  SLAVE=yes
 +  USERCTL=no
 +  ​
 + 
 +===== IP routing =====
 +
 +Persistent routes can be set in ''/​etc/​sysconfig/​network-scripts''​ with a separate file for each interface:-
 +
 +  [root@gy-asp-db03 network-scripts]#​ cat route-bond0 ​
 +  GATEWAY0=172.27.206.1
 +  NETMASK0=255.255.255.0
 +  ADDRESS0=172.27.205.0
 +  ​
 +  #.207 network not currently in use (was for ringo)
 +  #​GATEWAY1=172.27.206.1
 +  #​NETMASK1=255.255.255.0
 +  #​ADDRESS1=172.27.207.0
 +  ​
 +This gives the following (edited) output:-
 +
 +  [root@gy-asp-db03 network-scripts]#​ route
 +  Kernel IP routing table
 +  Destination ​    ​Gateway ​        ​Genmask ​        Flags Metric Ref    Use Iface
 +  .....
 +  172.27.205.0 ​   172.27.206.1 ​   255.255.255.0 ​  ​UG ​   0      0        0 bond0
 +  .....
 +  default ​        ​172.27.201.1 ​   0.0.0.0 ​        ​UG ​   0      0        0 bond1
 +  [root@gy-asp-db03 network-scripts]#​
 +
 + 

rb/ethernetbonding.txt ยท Last modified: 10/10/2013 14:21 (external edit)