Sep 10 2005, 05:27 AM
Post
#1
|
|
|
Its GNU/Linuxhelp.net ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Support Specialist Posts: 1,420 Joined: 3-January 04 From: Serbia and Montenegro (SCG) Member No.: 2,069 |
Hello everyone,
This is going to be a Badwidth Arbitrator (ver 8.63) install guide on RH9. First of all you will need to download Red Hat 9 cd1,cd2,cd3 from here http://www.linuxiso.org/distro.php?distro=7. Note about the computer I used for my network of 110~ computers and a 256kbit/s down, and 128kbit/s up cable modem line : CPU : Intel Celeron 2Ghz RAM : 256 MB DDR HDD : 4GB Western Digital (some really old model, probably older then me) ETHERNET : 2x Realtek 100Mbps (RTL8193too) STEP 1 Put in cd1 into your computer and boot up with it, choose custom installation and select only kernel development tools and make sure you install gcc , its under compilers near the kernel development tools. Once installation has finished download kernel-2.4.19 (it only works with this kernel without any need to touch the code , or some hacking...so if you just want it to work for the first time , get this kernel) from here ftp://ftp.kernel.org/pub/linux/kernel/v2....x-2.4.19.tar.gz to for example /home like this. CODE cd /home wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.19.tar.gz This will take some time to download it is aprox 30MB in size. Once the kernel has been downloaded go to /usr/src and do the following. CODE cd /usr/src rm linux rm linux-2.4 tar zxfv /home/linux-2.4.19.tar.gz ln -s linux-2.4.19 linux ln -s linux-2.4.19 linux-2.4 So what we did was removed the old symbolic links to the 2.4.20-8 kernel , and created a new symbolic link that points to kernel 2.4.19. Okay enough chit-chat let's start recompiling the kernel so that bridge-utils will work. CODE cd /usr/src/linux make mrproper cp /boot/config-2.4.20-8 ./.config make oldconfig wget http://www.bandwidtharbitrator.com/bridge-nf-0.0.7-against-2.4.19.diff patch -p1 < bridge-nf-0.0.7-against-2.4.19.diff make menuconfig WARNING: If you used for example realtek cards when you install rh9 it detected them and it is working, but if you look at Network Devices and 100mbps ethernet in menuconfig you'll see that they are compiled in as modules only, now this will be a problem , since rh9 will no longer see the realtek cards once you reboot to the 2.4.19 kernel, so instead of using the rtl8139 as module you must compile it in , change that M in front of it to a * . After your done, you only need to make sure that the ethernet device you are using is compiled in , and not used as a module. You can continue with the following steps, wich will take some time, even on my 2Ghz machine it took me 2hrs~. CODE make dep make clean make make bzImage make modules make modules_install make install Once done , reboot the system. CODE reboot At the grub boot menu choose 2.4.19 kernel. STEP 2 Preparing the bridge utils : CODE cd /home wget http://www.bandwidtharbitrator.com/bridge-utils-0.9.5.tar mkdir /bridge CD /bridge tar -xvf /home/bridge-utils-0.9.5.tar CD bridge-utils make STEP 3 Setting up the Arbitrator : CODE cd /home wget http://www.bandwidtharbitrator.com/downloads/arbitrator8.63.tar.gz mkdir /art cd / tar zxfv /home/arbitrator8.63.tar.gz cd arbitrator8.63 ./install.sh Just answer Y to everything. Then we will recompile the modified kernel again , so that it will work properly with the Arbitrator. CODE cd /usr/src/linux vi .config CONFIG_BRIDGE_NF in /usr/src/linux/.config nneds to be toggled on if you plan to use the arbitrator co-resident with a firewall. Look for CONFIG_BRIDGE_NF and modify it to CONFIG_BRIDGE_NF = Y Then do the following (this will take another few minutes... 1hrs~) : CODE make dep make clean make make bzImage make modules make modules_install make install Then we recompile the bridge-utils : CODE cd /bridge/bridge-utils make Then we copy the brctl and brctld files into the correct locations : CODE cd /bridge/brctl cp brctl /usr/local/sbin chmod 700 /usr/local/sbin/brctl cp brctld /usr/local/sbin chmod 700 /usr/local/sbin/brctld Now let's make sure eth0 and eth1 wont come up automaticaly : CODE cd /etc/sysconfig/network-scripts Using your favorite editor modify both ifcfg-eth0 and ifcfg-eth1 file , changing the following line in both. ONBOOT=no Once done with this, we will make the kernel-2.4.19 the default one , do the following : CODE cd /boot/grub Using your favorite editor modift the file @menu.lst And change the following line : default = 1 to default = 0 Then we make sure that upon the next reboot our Arbitrator will be up and running : CODE cd /etc/rc.d/ Add the following lines to rc.local file (to the end of it): /usr/local/sbin/brctl addbr my /usr/local/sbin/brctl addif my eth0 /usr/local/sbin/brctl addif my eth1 /sbin/ifconfig eth0 0.0.0.0 /sbin/ifconfig eth1 0.0.0.0 /sbin/ifconfig my 192.168.10.3 netmask 255.255.255.0 up /sbin/route add default gw 192.168.10.1 /etc/init.d/arbitrate start You will offcourse use a different IP address for my , and will probably use a different gateway as well, this changes from network to network. Let's do some basic configuration of the Arbitrator : CODE cd /etc Using your favorite editor modify the file arbdefault.conf : BRIDGEIP should be the same ip you used for my above BRIDGENETMASK should be the same netmask you used above for my BRIDGEROUTE should be the same route you used above for my For the rest of the config , you need to tune youreself, once I understand and test things out more , I will post aditional info on how to configure Arbitrator for different networks/needs. What config options to use. So we are finally done, reboot and behold! CODE reboot once it's up and running, don't get nervous, it takes a few seconds for the bridge to come up, so it wont work imediately ... after a 1 min everything should be working okay. CODE cd /tmp cat arblog and you will see something like this : CODE 09/10/05 12:20:35 Traffic up: 28648 Traffic down: 7436 SUBNET 255.255.255.255 09/10/05 12:20:36 INCREASE PENALTY IP: 192.168.1.195 212.99.255.41 BUFF: 120 DELAY: 21 09/10/05 12:20:50 PENALTY DECREASE: 192.168.1.195 212.99.255.41 to 14 09/10/05 12:20:52 INCREASE PENALTY IP: 192.168.1.195 212.99.255.41 BUFF: 120 DELAY: 21 09/10/05 12:20:54 PENALTY REMOVE: 192.168.1.195 83.193.209.186 09/10/05 12:20:56 Traffic up: 24181 Traffic down: 10765 SUBNET 255.255.255.255 09/10/05 12:21:07 PENALTY DECREASE: 192.168.1.195 212.99.255.41 to 14 09/10/05 12:21:11 PENALTY DECREASE: 192.168.1.195 212.99.255.41 to 7 09/10/05 12:21:13 INCREASE PENALTY IP: 192.168.1.195 212.99.255.41 BUFF: 120 DELAY: 14 09/10/05 12:21:15 PENALTY IP : 192.168.1.195 83.193.209.186 LPEAK: 6138 WAVG: 8009 BUFF: 122 DELAY: 7 09/10/05 12:21:16 Traffic up: 25865 Traffic down: 6376 SUBNET 255.255.255.255 09/10/05 12:21:20 INCREASE PENALTY IP: 192.168.1.195 212.99.255.41 BUFF: 120 DELAY: 21 You should put the arbitrator somewhere between the clients and your internet connection , like this : LAN1----| LAN2----| LAN3----| ROUTER |---Bandwidth Arbitrator---FIREWALL---INTERNET LAN4----| LAN5----| Visit http://www.bandwidtharbitrator.com/ for the manual, and aditional addon software . And if you got it working, and have a webpage put up a link to www.bandwidtharbitrator.com to support this nice piece of free software. Sincerely Robert B -------------------- Robert Becskei
robert83@linuxhelp.net -------------------- May the source be with us! -------------------- AMD X2-3800 @ 2400Mhz 2048MB DDR 400Mhz DFI Lanparty UT4 NF4 ULTRA-D GeForce 7800GT 250GB+250GB Pioneer DVD-RW 17inch Samsung Syncmaster 757NF WinXP Pro (SP2)/ CentOS 4.3 -------------------- |
|
|
|
Robert83 Bandwidth Arbitrator Sep 10 2005, 05:27 AM
Robert83 I've been playing with this software for a few... Sep 12 2005, 09:17 AM![]() ![]() |
|
Lo-Fi Version | Time is now: 9th September 2010 - 10:23 PM |