From: <tc@bens-house.org.uk>
To: lartc@vger.kernel.org
Subject: [LARTC] ADSL/Ethernet differentiation
Date: Sun, 27 Jan 2002 23:35:26 +0000 [thread overview]
Message-ID: <marc-lartc-101217446519564@msgid-missing> (raw)
Hi all,
I am new to traffic management and I am having some difficulty working out
how to differentiate between my ADSL link and LAN.
Background: I recently purchased an "Audiotron", which is a networked device
that allows me to play MP3's over my LAN and also allows me to listen to
Internet Radio, through my ADSL link (512Kb/s) and then over the LAN.
I discovered, however, that when I am doing large downloads, the Internet
Radio on the Audiotron suffers (no bandwidth), so I have started looking
into traffic shaping.
Seeing as I am doing this, I decided that I would also like to give priority
to web, news and mail, over any other service, so that large FTP downloads
would not affect web browsing speed.
My LAN consists of a Linux box with a USB ADSL modem (ppp) and a 100Mb/s
network card (eth0). The other machines on my network are all 100Mb/s
To sum it up simply: Top priority is Audiotron, which should never take up
ALL of the bandwidth (it should never need to), but I would like it to have
256 Kb/s if needed.
Next up is web, news and mail, which should take priority over everything
else, so I reckon 248Kb/s, leaving 8Kb/s for the rest (which will borrow
from the others alot :)
I have read the documentation and I think that the rules included at the
bottom of this email should work. However, I am not sure whether this would
also restrict the bandwidth between machines, which I would like to remain
at 100Mb/s.
I would appreciate opinions from more experienced people as to how I can
manage this. Also, if there are any flaws (read: stupid mistakes) in my
rules, I would appreciate comments!
Cheers,
Ben
Rules:
# Add HTB as the queue discipline on eth0.
tc qdisc add dev eth0 root handle 1: htb default 20
# Add a root class rated at 512kbit (the speed of my adsl downloads)
tc class add dev eth0 parent 1: classid 1:1 htb rate 512kbit burst 2k
# Add a class with a guaranteed rate of 256kbit and ceiling of 512kbit for
the Audiotron
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 256kbit ceil 512kbit
burst 2k
# Add a class for all web, news and mail traffic, rated at 248kbit with
512kbit ceiling
tc class add dev eth0 parent 1:1 classid 1:15 htb rate 248kbit ceil 512kbit
burst 2k
# Add default class for all other traffic, rated at 8kbit with 512kbit
ceiling
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 8kbit ceil 512kbit
burst 2k
# OK, we have our classes, now add some filters.
# First the Audiotron
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip dst
192.168.0.9/32 flowid 1:10
# Next for Web, News and Mail
# http/https
tc filter add dev eth0 protocol ip parent 1: prio 2 u32 match ip dport 80
0xffff flowid 1:15
tc filter add dev eth0 protocol ip parent 1: prio 2 u32 match ip dport 443
0xffff flowid 1:15
# pop3/smtp
tc filter add dev eth0 protocol ip parent 1: prio 2 u32 match ip dport 25
0xffff flowid 1:15
tc filter add dev eth0 protocol ip parent 1: prio 2 u32 match ip dport 110
0xffff flowid 1:15
# news/home news
tc filter add dev eth0 protocol ip parent 1: prio 2 u32 match ip dport 119
0xffff flowid 1:15
# Everything else comes under the default.
tc filter add dev eth0 protocol ip parent 1: prio 3 flowid 1:20
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
next reply other threads:[~2002-01-27 23:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-27 23:35 tc [this message]
2002-01-28 8:14 ` [LARTC] ADSL/Ethernet differentiation Stef Coene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-101217446519564@msgid-missing \
--to=tc@bens-house.org.uk \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox