Open main menu

OpenVZ Virtuozzo Containers Wiki β

Editing Bonding

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 8: Line 8:
 
Additionally, link integrity monitoring may be performed.
 
Additionally, link integrity monitoring may be performed.
  
== Setting up bonding on a RHEL/CentOS 4 or 5 system ==
+
== Setting up bounding on a RHEL/CentOS 4 system ==
  
 
===Create a bond0 configuration file===
 
===Create a bond0 configuration file===
Line 44: Line 44:
 
===Modify eth0 and eth1 config files===
 
===Modify eth0 and eth1 config files===
  
Open both configurations using vi (text editor) and make sure the file reads as follows for interface eth0
+
Open both configuration using vi text editor and make sure file read as follows for eth0 interface
  
 
  # vi /etc/sysconfig/network-scripts/ifcfg-eth0
 
  # vi /etc/sysconfig/network-scripts/ifcfg-eth0
Line 56: Line 56:
 
</pre>
 
</pre>
  
Open the eth1 configuration file using vi :
+
Open eth1 configuration file using vi text editor:
  
 
  vi /etc/sysconfig/network-scripts/ifcfg-eth1
 
  vi /etc/sysconfig/network-scripts/ifcfg-eth1
  
Make sure the file reads as follows for interface eth1:
+
Make sure file read as follows for eth1 interface:
 
<pre>
 
<pre>
 
DEVICE=eth1
 
DEVICE=eth1
Line 69: Line 69:
 
BOOTPROTO=none
 
BOOTPROTO=none
 
</pre>
 
</pre>
Save the file and exit to shell prompt.
+
Save file and exit to shell prompt.
  
 
=== Load bond driver/module ===
 
=== Load bond driver/module ===
Make sure the bonding module is loaded before the channel-bonding interface (bond0) is brought up. You need to modify the kernel modules configuration file:
+
Make sure the bonding module is loaded when the channel-bonding interface (bond0) is brought up. You need to modify the kernel modules configuration file:
  
 
  # vi /etc/modprobe.conf
 
  # vi /etc/modprobe.conf
Line 79: Line 79:
 
options bond0 miimon=100
 
options bond0 miimon=100
 
</pre>
 
</pre>
You can learn more about bonding options in the kernel source documentation file  "Documentation/networking/bonding.txt"
+
You can learn more about all bonding options in the kernel source documentation file  "Documentation/networking/bonding.txt"
  
 
=== Test the configuration ===
 
=== Test the configuration ===
Line 140: Line 140:
  
 
==  Traffic shaping ==
 
==  Traffic shaping ==
 +
=== Virtuozzo traffic shaping tools ===
 +
Just replace old netdev to new bonding device (bond0) 
  
 +
vi /etc/sysconfig/vz
 +
<pre>
 +
## Network traffic parameters
 +
TRAFFIC_SHAPING=yes
 +
BANDWIDTH="bond0:102400"
 +
TOTALRATE="bond0:1:4096"
 +
RATE="bond0:1:8"
 +
</pre>
 +
and do the rest as usuall
 +
<pre>
 +
# vzctl set $veid --ratebound $bound --rate $rif:$class:$rate --save
 +
</pre>
 +
 +
=== Traffic shaping with tc ===
 
Where is no specifics here, see [[Traffic shaping with tc]].
 
Where is no specifics here, see [[Traffic shaping with tc]].
  

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)