hello. i have following setup: a machine (winChip 200mhz cpu, 32mb ram, linux 2.4.28) acting like a bridge with 2 interfaces (eth0 - to our ISP, eth1 - to our network) machine does not have any IP there is a 802.1q vlan eth0.2 eth0.2 and eth1 are bridged in br0 i have one 4mbit link which i share with my friend, i have 3mbit and he has 1mbit all our IP addresses are public and we have the following setup /sbin/tc qdisc add dev eth1 root handle 1: htb default 2 /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 4mbit ceil 4mbit /sbin/tc class add dev eth1 parent 1:1 classid 1:2 htb rate 3mbit ceil 3mbit /sbin/tc class add dev eth1 parent 1:1 classid 1:3 htb rate 1mbit ceil 1mbit /sbin/tc filter add dev eth1 protocol ip parent 1:0 pref 1 u32 match ip src FRIEDNS_IP flowid 1:3 /sbin/tc filter add dev eth1 protocol ip parent 1:0 pref 1 u32 match ip src MY_IP flowid 1:2 /sbin/tc qdisc add dev eth0.2 root handle 1: htb default 2 /sbin/tc class add dev eth0.2 parent 1: classid 1:1 htb rate 4mbit ceil 4mbit /sbin/tc class add dev eth0.2 parent 1:1 classid 1:2 htb rate 3mbit ceil 3mbit /sbin/tc class add dev eth0.2 parent 1:1 classid 1:3 htb rate 1mbit ceil 1mbit /sbin/tc filter add dev eth0.2 protocol ip parent 1:0 pref 1 u32 match ip dst FRIENDS_IP flowid 1:3 /sbin/tc filter add dev eth0.2 protocol ip parent 1:0 pref 1 u32 match ip dst MY_IP flowid 1:3 but it doesnt work well, my ISP link is stable, but i hardly ever get from my shaped link more 2mbit. where am i making mistake? Thanks. Matis _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> a machine (winChip 200mhz cpu, 32mb ram, linux 2.4.28) acting like a > bridge > with > 2 interfaces (eth0 - to our ISP, eth1 - to our network) > machine does not have any IP > > there is a 802.1q vlan eth0.2 > eth0.2 and eth1 are bridged in br0 > > i have one 4mbit link which i share with my friend, i have 3mbit and he > has > 1mbit > > all our IP addresses are public and we have the following setup > > /sbin/tc qdisc add dev eth1 root handle 1: htb default 2 > /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 4mbit ceil > 4mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:2 htb rate 3mbit ceil > 3mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:3 htb rate 1mbit ceil > 1mbityour filters will not work because of the parent> /sbin/tc filter add dev eth1 protocol ip parent 1:0 pref 1 u32 match ip > src > FRIEDNS_IP flowid 1:3tc filter add dev eth1 prio 7 parent 1: protocol ip u32 match ip dst FRIENDS_IP flowid 1:3> /sbin/tc filter add dev eth1 protocol ip parent 1:0 pref 1 u32 match ip > src > MY_IP flowid 1:2tc filter add dev eth1 prio 7 parent 1: protocol ip u32 match ip dst MY_IP flowid 1:2 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Saturday 01 January 2005 10:45, cvok@bonet.sk wrote:> hello. i have following setup: > > a machine (winChip 200mhz cpu, 32mb ram, linux 2.4.28) acting like a bridge > with > 2 interfaces (eth0 - to our ISP, eth1 - to our network) > machine does not have any IP > > there is a 802.1q vlan eth0.2 > eth0.2 and eth1 are bridged in br0 > > i have one 4mbit link which i share with my friend, i have 3mbit and he has > 1mbit > > all our IP addresses are public and we have the following setup > > /sbin/tc qdisc add dev eth1 root handle 1: htb default 2 > /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 4mbit ceil 4mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:2 htb rate 3mbit ceil > 3mbit /sbin/tc class add dev eth1 parent 1:1 classid 1:3 htb rate 1mbit > ceil 1mbit /sbin/tc filter add dev eth1 protocol ip parent 1:0 pref 1 u32 > match ip src FRIEDNS_IP flowid 1:3 > /sbin/tc filter add dev eth1 protocol ip parent 1:0 pref 1 u32 match ip src > MY_IP flowid 1:2 > > > /sbin/tc qdisc add dev eth0.2 root handle 1: htb default 2 > /sbin/tc class add dev eth0.2 parent 1: classid 1:1 htb rate 4mbit ceil > 4mbit /sbin/tc class add dev eth0.2 parent 1:1 classid 1:2 htb rate 3mbit > ceil 3mbit /sbin/tc class add dev eth0.2 parent 1:1 classid 1:3 htb rate > 1mbit ceil 1mbit /sbin/tc filter add dev eth0.2 protocol ip parent 1:0 pref > 1 u32 match ip dst FRIENDS_IP flowid 1:3 > /sbin/tc filter add dev eth0.2 protocol ip parent 1:0 pref 1 u32 match ip > dst MY_IP flowid 1:3 > > > but it doesnt work well, my ISP link is stable, but i hardly ever get from > my shaped link more 2mbit. where am i making mistake?Some stuff to check out: - are the tc stats changing? - try ceil 3.5mbit so _you_ are the bottleneck - I''m not sure if you can shape on a vlan Oh, your filters are ok. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/