Skip to contentSkip to conversation

problem w fwmark

LARTC Yury Pimenov 1 participant 1 message Nov 9, 2001

lore
Share & tools
lore
#0 lore raw

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

Signature · 20 lines
Bye

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

  

-- 
Bye

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



_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/