?
Solved

How to shape internet bandwidth on a single interface Linux Server

Posted on 2014-04-01
3
Medium Priority
?
278 Views
Last Modified: 2014-04-06
Hi all!

I have an old mac mini g4 (single ethernet) with debian on it.

I am very happy with it but, being also my download station, I want to be able to limit its bandwidth regarding internet.
Also updates and backups kill my network (main problem in upload).

I've read about wondershaper and similar tools but I don't want my server to be slow on LAN, just on the Internet.
Is there any way to achieve this?
0
Comment
Question by:ltpitt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 39970415
You need to put traffic shaper on your internet router.
0
 
LVL 1

Accepted Solution

by:
ltpitt earned 0 total points
ID: 39970666
No need to do that...

Simply install tc and wondershaper on the server you need to "calm down" and use a similar script:

# clear any existing configuration
wondershaper clear eth0

# root: let's use HTB
tc qdisc add dev eth0 root handle 1: htb default 20
tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit

# the limit for fast, local connections:
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 95mbit burst 60k
# for the rest in teh intarweb (p2p, http ...):
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 30kbit burst 15k

# suggestion from the LARTC howto ...
tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10

#  F I L T E R    local stuff (adapt "192.168.0.0" to your own LAN)
tc filter add dev eth0 parent 1:0 protocol ip prio 0 u32 \
   match ip dst 192.168.0.0/24 flowid 1:10

Open in new window

0
 
LVL 1

Author Closing Comment

by:ltpitt
ID: 39981051
Accurate, detailed, complete solution of the problem
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question