[LARTC] problem w fwmark

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello lartc,

I have such configuration

        [        ]               [              ]
== eth0 - Shaper - eth1 ======== - 192.168.0.10 ]
        [        ]               [              ]

And I running this script, but it doesn't work until I uncomment last
2 lines. After I do this, I fill shaper does work. So how you think
what I did wrong?
Note: I loaded all of needed modules and no warnings or errors printed when I run
the script. Kernel 2.4.12.
        
#!/bin/bash
iptables -t mangle -A PREROUTING -s 192.168.0.10 -j MARK --set-mark 1
iptables -t mangle -A PREROUTING -d 192.168.0.10 -j MARK --set-mark 1

# eth0
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 10Mbit avpkt 1000 cell 8
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate 10Mbit weight 1Mbit prio 8 allot 1514 cell 8 maxburst
20 avpkt 1000
tc class add dev eth0 parent 1:1 classid 1:28 cbq bandwidth 10Mbit rate 128Kbit weight 2Kbit prio 5 allot 1514 cell 8
maxburs
t 20 avpkt 1000 bounded

# eth1
tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 10Mbit avpkt 1000 cell 8
tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate 10Mbit weight 1Mbit prio 8 allot 1514 cell 8 maxburst
20 avpkt 1000
tc class add dev eth1 parent 1:1 classid 1:128 cbq bandwidth 10Mbit rate 28Kbit weight 2Kbit prio 5 allot 1514 cell 8
maxburs
t 20 avpkt 1000 bounded

tc filter add dev eth1 protocol ip parent 1:0 prio 100 handle 0x1 fw classid 1:128
tc filter add dev eth0 protocol ip parent 1:0 prio 100 handle 0x1 fw classid 1:28
#tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.0.10 flowid 1:128
#tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.0.10 flowid 1:28


-- 
Bye

  --------------------------
  Q: Want to find more?
  A: Try http://ftpsearch.lv

  

-- 
Bye

  --------------------------
  Q: Want to find more?
  A: Try http://ftpsearch.lv





[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux