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

You cannot pick the interface of a packet after it arrives on the server, (time travel and cyber telepathy?) but you can when it leaves, where the source port is 80 and the dport is a client random high port.

Hello DGPickett

dport will be destination (for internal LAN )in OUTPUT chain , this mean it is outgoing traffic.

i cannot understand your answer , please clear your answer with some explanation

Thanks

If you have a web server on a host, and you want to divert web traffic to the b network path, you key on source port 80, which is the packets from the web service.