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 | + | == Setting up bounding is with RHEL/CentOs v4.4 == |
− | + | **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: | 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: | Append following lines to it: | ||
− | + | *Static IP | |
− | |||
<pre> | <pre> | ||
DEVICE=bond0 | DEVICE=bond0 | ||
Line 35: | Line 33: | ||
Replace above IP data with your actual IP address. Save file and exit to shell prompt. | Replace above IP data with your actual IP address. Save file and exit to shell prompt. | ||
− | + | *DHCP | |
<pre> | <pre> | ||
DEVICE=bond0 | DEVICE=bond0 | ||
Line 42: | Line 40: | ||
</pre> | </pre> | ||
− | + | **Step #2: Modify eth0 and eth1 config files: | |
− | Open both | + | Open both configuration using vi text editor and make sure file read as follows for eth0 interface |
− | + | # vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
<pre> | <pre> | ||
DEVICE=eth0 | DEVICE=eth0 | ||
Line 56: | Line 54: | ||
</pre> | </pre> | ||
− | Open | + | Open eth1 configuration file using vi text editor: |
− | + | # vi /etc/sysconfig/network-scripts/ifcfg-eth1 | |
− | Make sure | + | Make sure file read as follows for eth1 interface: |
<pre> | <pre> | ||
DEVICE=eth1 | DEVICE=eth1 | ||
Line 69: | Line 67: | ||
BOOTPROTO=none | BOOTPROTO=none | ||
</pre> | </pre> | ||
− | Save | + | Save file and exit to shell prompt. |
− | + | **Step # 3: Load bond driver/module | |
− | Make sure | + | Make sure bonding module is loaded when the channel-bonding interface (bond0) is brought up. You need to modify kernel modules configuration file: |
− | + | # vi /etc/modprobe.conf | |
<pre> | <pre> | ||
alias bond0 bonding | alias bond0 bonding | ||
− | options bond0 miimon=100 | + | options bond0 mode=balance-alb miimon=100 |
</pre> | </pre> | ||
− | You can learn more about | + | You can learn more about all bounding options in kernel source documentation file "Documentation/networking/bonding.txt" |
− | + | **Step # 4: Test configuration | |
First, load the bonding module: | First, load the bonding module: | ||
<pre> | <pre> | ||
Line 92: | Line 90: | ||
Check proc info: | Check proc info: | ||
− | + | # cat /proc/net/bonding/bond0 | |
<pre> | <pre> | ||
Ethernet Channel Bonding Driver: v2.6.3 (June 8, 2005) | Ethernet Channel Bonding Driver: v2.6.3 (June 8, 2005) | ||
Line 138: | Line 136: | ||
default via 10.17.0.1 dev bond0 | default via 10.17.0.1 dev bond0 | ||
</pre> | </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> | ||
− | Where is no | + | * Traffic shaping with tc |
+ | Where is no specific here, see:[[Traffic_shaping_with_tc]] | ||
As a result in: | As a result in: | ||
Line 151: | Line 164: | ||
inet 10.17.3.41/16 brd 10.17.255.255 scope global bond0 | inet 10.17.3.41/16 brd 10.17.255.255 scope global bond0 | ||
</pre> | </pre> | ||
− | |||
− | |||
− |