09-28-2012
QOS using tc
Hello all my friends
Please Read to understand my problem
I have 1 MB bandwidth and two networks then i did traffic control on my two internal interfaces i.e eth1(192.168.3.0/24) and eth2(172.16.3.0/24) (internal) and eth0 (outside)
Then i divided my bandwidth using tc command with the help of my friend
On eth1 :---
tc qdisc add dev eth1 root
tc qdisc add dev eth1 root handle 1:0 htb default 10
tc class add dev eth1 parent 1:0 classid 1:10 htb rate 512kbps ceil 640kbps prio 0
tc filter add dev eth1 parent 1:0 prio 0 protocol ip handle 10 fw flowid 1:10
iptables -A OUTPUT -t mangle -p tcp --sport 80 -j MARK --set-mark 10
service iptables save
For eth2: same as above
It is working but i cannot understand why sport is using above in iptables , i mean it is outgoing traffic why dport is not using here
Please any help
Thanks
4 More Discussions You Might Find Interesting
1. IP Networking
My question is such:
I want to control the bandwidth of my users and cap there speed on the network. I was told by a Cisco rep that it is better to police or control the bandwidth at the switch and not via the router. It that the correct place to control bandwidth at the switch or would it be... (0 Replies)
Discussion started by: metallica1973
0 Replies
2. IP Networking
Does anyone know how can I determine which user is UPLOADING via http protocol? Like sending video on youtube?
Or maybe how to throttle multimedia uploads ? Or any uploads?
maybe get packet size? (9 Replies)
Discussion started by: darkman_hr
9 Replies
3. Windows & DOS: Issues & Discussions
hi,
did anyone know how to configure a priority of dns ports (and other ports) on QOS on windows 2003? hard to understand the group policy "explain" tab on 'qos packet scheduler', no elaboration on how to use it.
thanks for any comment you may add.
---------- Post updated at 05:03 PM... (0 Replies)
Discussion started by: itik
0 Replies
4. IP Networking
I'm looking for recommendations for a general problem.
Apparently (that is according to my boss and coworkers) I am responsible for guaranteeing quality of service to our remote MySQL server during the course of the day. They may run a complete database restore for any number of reasons and are... (1 Reply)
Discussion started by: Astrocloud
1 Replies
LEARN ABOUT XFREE86
tc-matchall
Match-all classifier in tc(8) Linux Match-all classifier in tc(8)
NAME
matchall - traffic control filter that matches every packet
SYNOPSIS
tc filter ... matchall [ skip_sw | skip_hw ] [ action ACTION_SPEC ] [ classid CLASSID ]
DESCRIPTION
The matchall filter allows to classify every packet that flows on the port and run a action on it.
OPTIONS
action ACTION_SPEC
Apply an action from the generic actions framework on matching packets.
classid CLASSID
Push matching packets into the class identified by CLASSID.
skip_sw
Do not process filter by software. If hardware has no offload support for this filter, or TC offload is not enabled for the inter-
face, operation will fail.
skip_hw
Do not process filter by hardware.
EXAMPLES
To create ingress mirroring from port eth1 to port eth2:
tc qdisc add dev eth1 handle ffff: ingress
tc filter add dev eth1 parent ffff:
matchall skip_sw
action mirred egress mirror
dev eth2
The first command creats an ingress qdisc with handle ffff: on device eth1 where the second command attaches a matchall filters on it that
mirrors the packets to device eth2.
To create egress mirroring from port eth1 to port eth2:
tc qdisc add dev eth1 handle 1: root prio
tc filter add dev eth1 parent 1:
matchall skip_sw
action mirred egress mirror
dev eth2
The first command creats an egress qdisc with handle 1: that replaces the root qdisc on device eth1 where the second command attaches a
matchall filters on it that mirrors the packets to device eth2.
To sample one of every 100 packets flowing into interface eth0 to psample group 12:
tc qdisc add dev eth0 handle ffff: ingress
tc filter add dev eth0 parent ffff: matchall
action sample rate 100 group 12
SEE ALSO
tc(8),
iproute2 21 Oct 2015 Match-all classifier in tc(8)