UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > VPS Hosting - Virtual Private Servers

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 22-11-2006, 00:00
Senior System Administrator
 
Join Date: Oct 2006
Posts: 153
Thumbs up OpenVZ / Virtuozzo -- Setting up bounding on a RHEL / CentOS 4 system

The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical "bonded" interface. The behavior of the bonded interfaces depends upon the mode; generally speaking, modes provide either hot standby or load balancing services. Additionally, link integrity monitoring may be performed.

Setting up bounding on a RHEL/CentOS 4 system

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:
Quote:
# vi /etc/sysconfig/network-scripts/ifcfg-bond0
Append following lines to it:

In case of static IP

Quote:
DEVICE=bond0
IPADDR=x.x.x.x
NETWORK=y.y.y.y
NETMASK=z.z.z.z
BOOTPROTO=none
ONBOOT=yes
x.x.x.x is an IP address of HW.
y.y.y.y is an Network address of HW.
z.z.z.z is an net mask address of HW (usually 255.255.255.0).

Replace above IP data with your actual IP address. Save file and exit to shell prompt.

In case of DHCP
Quote:
DEVICE=bond0
BOOTPROTO=dhcp
ONBOOT=yes
Modify eth0 and eth1 config files

Open both configuration using vi text editor and make sure file read as follows for eth0 interface

Quote:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Quote:
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
Open eth1 configuration file using vi text editor:

Quote:
vi /etc/sysconfig/network-scripts/ifcfg-eth1
Make sure file read as follows for eth1 interface:
Quote:
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
Save file and exit to shell prompt.

Load bond driver/module

Make sure bonding module is loaded when the channel-bonding interface (bond0) is brought up. You need to modify kernel modules configuration file:

Quote:
# vi /etc/modprobe.conf
Quote:
alias bond0 bonding
options bond0 miimon=100
You can learn more about all bounding options in kernel source documentation file "Documentation/networking/bonding.txt"

Test the configuration

First, load the bonding module:

Quote:
# modprobe bonding
Restart networking service in order to up bond0 interface:

Quote:
# service network restart
Check proc info:

Quote:
# cat /proc/net/bonding/bond0
Quote:
Ethernet Channel Bonding Driver: v2.6.3 (June 8, 2005)

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:07:d4:c3

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:07:d4:cd
List all interfaces:

Quote:
#ip a

2: lo: mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
4: bond0: mtu 1500 qdisc noqueue
link/ether 00:0c:29:73:26:19 brd ff:ff:ff:ff:ff:ff
inet 10.17.3.25/16 brd 10.17.255.255 scope global bond0
6: eth0: mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
link/ether 00:0c:29:73:26:19 brd ff:ff:ff:ff:ff:ff
8: eth1: mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
link/ether 00:0c:29:73:26:19 brd ff:ff:ff:ff:ff:ff
1: venet0: mtu 1500 qdisc noqueue
link/void
Route:

Quote:
# ip r

10.17.0.0/16 dev bond0 proto kernel scope link src 10.17.3.25
169.254.0.0/16 dev bond0 scope link
default via 10.17.0.1 dev bond0

Traffic shaping

Virtuozzo traffic shaping tools

Just replace old netdev to new bonding device (bond0)

vi /etc/sysconfig/vz

Quote:
## Network traffic parameters
TRAFFIC_SHAPING=yes
BANDWIDTH="bond0:102400"
TOTALRATE="bond0:1:4096"
RATE="bond0:1:8"
and do the rest as usuall

Quote:
# vzctl set $veid --ratebound $bound --rate $rif:$class:$rate --save
Traffic shaping with tc

Where is no specifics here, see Traffic shaping with tc.

As a result in:

Quote:
# ip a s bond0
4: bond0: mtu 1500 qdisc cbq
##NOTE:Class Based Queueing tc was added ^^^^^^^^^^
link/ether 00:0c:29:07:d4:c3 brd ff:ff:ff:ff:ff:ff
inet 10.17.3.41/16 brd 10.17.255.255 scope global bond0
------------------------
Best Regards,
UKShane
http://www.eukhost.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:47.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles

Web Hosting
Web Hosting Service