Skip to contentSkip to conversation

share bandwith between vpns

LARTC Denis Kot 2 participants 3 messages Nov 16, 2004

lore
Share & tools
lore

Denis Kot

author
#0 lore raw

I have clients, which connectin to Internet through vpn. I want to dynamically share bandwith between vpn connections, so if there few connections, then they get all bandwith, if more then they get their minimal guaranteed bandwith. my idea is:
ip-up.local:

tc class add dev $DEV parent 1:1 classid 1:2${1/ppp/} htb rate $[$RATEUP/$VPNS]kbit ceil ${RATEUP}kbps
tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src $5 flowid 1:2${1/ppp/}

ip-down.local:
tc class del dev $DEV parent 1:1 classid 1:2${1/ppp/} htb rate $[$RATEUP/$VPNS]kbit ceil ${RATEUP}kbps
tc filter del dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src $5 flowid 1:2${1/ppp/}

where $DEV is server's outgoing interface, $RATEUP is outgoing bandwith and $VPNS is maximum possible vpn connections.

maybe there is more better method? and what to do with incomming traffic? reroute it on imq?

and as I understand there is can't be a transparent proxy?

please help

p.s. sorry for my english.... Smile

Signature · 7 lines
Denis Kot
denis?jabber.org.by
ICQ: 13680126
Mobil: +375 29 6-1234-78
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
author
#1 lore raw

I have clients, which connectin to Internet through vpn. I want to dynamically share bandwith between vpn connections, so if there few connections, then they get all bandwith, if more then they get their minimal guaranteed bandwith. my idea is:
ip-up.local:

tc class add dev $DEV parent 1:1 classid 1:2${1/ppp/} htb rate $[$RATEUP/$VPNS]kbit ceil ${RATEUP}kbps
tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src $5 flowid 1:2${1/ppp/}

ip-down.local:
tc class del dev $DEV parent 1:1 classid 1:2${1/ppp/} htb rate $[$RATEUP/$VPNS]kbit ceil ${RATEUP}kbps
tc filter del dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src $5 flowid 1:2${1/ppp/}

where $DEV is server's outgoing interface, $RATEUP is outgoing bandwith and $VPNS is maximum possible vpn connections.

maybe there is more better method? and what to do with incomming traffic? reroute it on imq?

and as I understand there is can't be a transparent proxy?

please help

p.s. sorry for my english.... Smile

Signature · 7 lines
Denis Kot
denis?jabber.org.by
ICQ: 13680126
Mobil: +375 29 6-1234-78
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to Denis Kot

Hello Denis,

Tuesday, November 16, 2004, 5:48:06 PM, you wrote:

DK> maybe there is more better method? and what to do with incomming DK> traffic? reroute it on imq?

use IMQ [ http://www.linuximq.net/ ] device for this.
Make traffic from all of your ppp interfaces to go through the imq devices and make static shaping rules for all client ips. With IMQ you can also shape outgoing traffic not only incoming stream.

This work nice for me HTB+IMQ+PPP(vpn)

Signature · 7 lines
Best regards,
 Maxim           mailto:[email protected]


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