Re: lug-bg: Frame-Relay over LAN
- Subject: Re: lug-bg: Frame-Relay over LAN
- From: vasil@xxxxxxxxxxx (Vasil Kolev)
- Date: Wed, 15 Aug 2001 23:38:50 +0300 (EEST)
Znachi ....
imam edin file /etc/peering_nets, v kojto sa mi mrezhite ot peeringa, vuv
format :
62.176.64.0/255.255.224.0
62.176.76.0/255.255.252.0
62.176.84.0/255.255.254.0
62.176.90.0/255.255.255.0
....
uotvetno ,vuv fajla kojto mi generira ipchains-ovete:
CHAINS="/sbin/ipchains"
$CHAINS -N shp_in
$CHAINS -N peering
#shp_in mi e chain za shape-vane na userite, peering - za peering-a
$CHAINS -A shp_in --source-port 22 -j RETURN -p tcp
$CHAINS -A shp_in --destination-port 22 -j RETURN -p tcp
for i in `cat /etc/acct_ips` ;do
$CHAINS -A shp_in -d $i -m `echo $i |cut -d '.' -f 4` -i eth2
done
for i in `cat /etc/peering_nets.txt`; do
$CHAINS -A peering -s $i -m 1
#prevod - port 22 _NE SE_ shape-va, userite se markirat kakto mi trqbva na
#mene, a peering-a - sled tqh, s mark 1
i vuv fajla za shape-vaneto :
tc qdisc add dev $IF root handle 1: cbq bandwidth 100Mbit avpkt 1000
tc class add dev $IF parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate 100Mbit allot 1514 weight 10Mbit prio 8 maxburst 10 avpkt 1000
# classove za otdelnite mashini:
for i in `cat /etc/acct_ips` ;do
NUM=`echo $i |cut -d '.' -f 4`
tc class add dev $IF parent 1:1 classid 1:$NUM cbq bandwidth 100Mbit rate $PERUSER allot 1514 weight $WGHT prio 5 maxburst 10 avpkt 1000 bounded isolated
tc qdisc add dev $IF parent 1:$NUM red limit 42598 min 16384 max 32768 burst 32 probability 1 avpkt 1000 bandwidth $PERUSER
tc filter add dev $IF protocol ip parent 1:0 prio 1 handle $NUM fw classid 1:$NUM
done
#class za peeringa
tc class add dev $IF parent 1:1 classid 1:2 cbq bandwidth 100Mbit rate 256Kbit allot 1514 weight 25Kbit prio 5 maxburst 10 avpkt 100 bounded isolated
tc qdisc add dev $IF parent 1:2 red limit 42598 min 16384 max 32768 burst 32 probability 1 avpkt 1000 bandwidth 256Kbit
tc filter add dev $IF protocol ip parent 1:0 prio 1 handle 1 fw classid 1:2
Toest, na vseki user ima po 64kbit, sus vuzmozhnost za burstove do 128k,a
peering-a si ima 256kbita, taka che da ne se namesva v liniqta ( cqlata mi
liniq e 384 kbita, i peering-a ne se shape-va kato horata otsreshta, t.e.
mozhe da mi izqde cqlata liniq)
Hope that helps :)
On Wed, 15 Aug 2001, gggg ggg wrote:
> Vasko, ne bih otkazal da hvarlia edno oko.To kakto
> znaesh neshtata sa vinagi elementarni, no slojnia
> podhod kam tiah opropastiava na4inanieto.
>
> georgi
>
> --- Vasil Kolev <vasil@xxxxxxxxxxx> wrote:
> > Dobre de, shto otkrivate koleloto....
> > Ako si na linux, da markirash paketite po AS e...
> > ajde ne nevuzmozhno, no
> > zverski slozhno. Az praqv taka - svalqm si ot
> > www.nat.bg/look/AS/ spisuka
> > s bulgarskite mrezhi, imam edin chain peering v
> > kojto im slagam mark
> > i toq mark minava prez drugi shaperi... tupo, burzo
> > i elemntarno.
> > Dazhe raboti :) Ako ima zhelanie, shte si pratq i
> > scriptchetata deto go
> > pravqt, ama te naistina sa elementarni.
> >
===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora
|