LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2013, 12:21 AM   #1
sandeepc04
Member
 
Registered: Jun 2012
Location: India
Posts: 66

Rep: Reputation: Disabled
How to divide internet speed on linux router?


Hi Good Morning Friends,

I need some help on linux router side,

I am planning to divide internet speed by using linux platform, I have Linux RHEL-5 Machine, and We are using 4MBPS speed of internet, and we are having 3 floor of clients,

Now here i wanted to give 1 floor 2MBPS and other 2 floors with 2MBPS speed to use,

Is it possible that we can divide internet speed on RHEL-5 (Any advance technology in routing for this)???

Thanks and Regards,
Sandeep CC
 
Old 04-04-2013, 12:59 AM   #2
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
Hello.
I recommend you use shaping with the iproute package.
You need a 'tc' utility included in it.
Use HTB traffic shaping.
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm

Not easy to understand (to my mind), but after understanding, works fine :)

You may use my script.

0.5 mbit/s was given to 192.168.0.2
3.3 mbit/s was given to 192.168.0.3

Any others had 256 kbit/s.

Code:
#!/bin/bash
shaper_start() {
tc qdisc add dev eth1 root handle 1:0 htb default 254

tc class add dev eth1 parent 1:0 classid 1:1 htb rate 0.5mbit
tc class add dev eth1 parent 1:0 classid 1:2 htb rate 3.3mbit
tc class add dev eth1 parent 1:0 classid 1:254 htb rate 256kbit

tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.2 flowid 1:1
tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.3 flowid 1:2
}

shaper_stop() {
tc qdisc del dev eth1 root
}
shaper_restart() {
shaper_stop
sleep 1
shaper_start
}

case "$1" in
'start')
  shaper_start
  ;;
'stop')
  shaper_stop
  ;;
'restart')
  shaper_restart
  ;;
*)
echo "usage $0 start|stop|restart"
esac

Last edited by Lexus45; 04-04-2013 at 01:02 AM.
 
1 members found this post helpful.
Old 04-09-2013, 01:24 AM   #3
sandeepc04
Member
 
Registered: Jun 2012
Location: India
Posts: 66

Original Poster
Rep: Reputation: Disabled
Hi Lexus45,

Thanks for your reply,

Its true, its not much easy to understand...

Can you explain me in deeply? I am understanding little bit in your script... but i need to understand much more...

My Office Network Setup is like Below,

We are having one lease line (ISP Provided 4Mbps Line), This direct line connected to one UN-managable switch, here we have kept 2 Squid (RHEL5) Proxy server for each floor(172.16.4.xxx & 192.168.5.xxx), Both network made routing so any client can ping each other IP's...

Now here i need to divide internet speed for each floor from main Line (from 4mbps)... planning to divide 2+2mbps or 3+1mbps for each floor...

As per my network diagram what you would suggest to implement this internet speed dividetion ??


Regards,
Sandeep CC

Last edited by sandeepc04; 04-09-2013 at 01:43 AM.
 
Old 04-09-2013, 04:21 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,575

Rep: Reputation: 938Reputation: 938Reputation: 938Reputation: 938Reputation: 938Reputation: 938Reputation: 938Reputation: 938
If you're using RedHat 5 then why not contact RedHat support, that's what you're paying them for.
 
Old 10-03-2013, 07:41 AM   #5
sandeepc04
Member
 
Registered: Jun 2012
Location: India
Posts: 66

Original Poster
Rep: Reputation: Disabled
This speed i have divided by squid proxy...
http://ccsandeep.blogspot.in/2013/09...id-rhel-5.html


Regards,
Sandeep CC
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Router ping speed really taking a speed hit... buccaneere Linux - Networking 6 11-02-2009 06:08 PM
Why is my internet upload speed greater than my download speed? km4hr Linux - Networking 1 05-27-2008 09:33 PM
Using a seperate router to divide network coindood Linux - Networking 4 09-14-2005 12:13 PM
problem with internet speed within my lan after linux router ilovebytes Linux - Networking 6 02-10-2004 12:41 PM
Is there a tool to monitor Internet connection speed and also network speed? xleft4dexy Linux - Networking 4 10-14-2003 11:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration