Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Bonding

343 bytes removed, 20:45, 4 August 2012
m
Reverted edits by StevenCook (talk) to last revision by 93.97.250.90
Additionally, link integrity monitoring may be performed.
== Setting up bounding is with bonding on a RHEL/CentOs v4.CentOS 4 or 5 system ==**Step #1: ===Create a bond0 configuration file===
Red Hat Linux stores network configuration in /etc/sysconfig/network-scripts/ directory. First, you need to create bond0 config file:
# vi /etc/sysconfig/network-scripts/ifcfg-bond0
Append following lines to it:
*Static ====In case of static IP====
<pre>
DEVICE=bond0
Replace above IP data with your actual IP address. Save file and exit to shell prompt.
*====In case of DHCP ====
<pre>
DEVICE=bond0
</pre>
**Step #2: ===Modify eth0 and eth1 config files:===
Open both configuration configurations using vi (text editor ) and make sure the file read reads as follows for interface eth0 interface
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
<pre>
DEVICE=eth0
</pre>
Open the eth1 configuration file using vi text editor:
# vi /etc/sysconfig/network-scripts/ifcfg-eth1
Make sure the file read reads as follows for interface eth1 interface:
<pre>
DEVICE=eth1
BOOTPROTO=none
</pre>
Save the file and exit to shell prompt.
**Step # 3: === Load bond driver/module===Make sure the bonding module is loaded when before the channel-bonding interface (bond0) is brought up. You need to modify the kernel modules configuration file:
# vi /etc/modprobe.conf
<pre>
alias bond0 bonding
options bond0 mode=balance-alb miimon=100
</pre>
You can learn more about all bounding bonding options in the kernel source documentation file "Documentation/networking/bonding.txt"
**Step # 4: === Test the configuration===
First, load the bonding module:
<pre>
Check proc info:
# cat /proc/net/bonding/bond0
<pre>
Ethernet Channel Bonding Driver: v2.6.3 (June 8, 2005)
default via 10.17.0.1 dev bond0
</pre>
 
== 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 tcWhere is no specific specifics here, see:[[Traffic_shaping_with_tcTraffic shaping with tc]].
As a result in: