Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: tc&ip


  • Subject: Re: lug-bg: tc&ip
  • From: stuckoff@xxxxxxxxxxxx (Stoian Mishev)
  • Date: Fri, 8 Feb 2002 17:24:24 +0200



On 07 02 2002 17:22, you wrote:
> edeqta - da shape trafik idvasto ot free.techno-link.com
>
> izpulnenieto:
>
> tc="/usr/local/sbin/tc"
>
> ######################## qdisc
> ###############################################
> tc qdisc add dev eth0 root handle 1: htb default 20
>
> ######################## classes
> #############################################
> tc class add dev eth0 parent 1: classid 1:1 htb rate 36kbit burst 10k
> tc class add dev eth0 parent 1:1 classid 1:10 htb rate 10kbit burst 4k
>
> tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
>
> ######################## filter
> ##############################################
>
> U32="tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32"
> $U32 match ip src 212.36.2.182 flowid 1:10
>
> rezulatata : nulev :)
> vyprosa : zasto :))

zashto izpolzwash htb ? az polzwam cbq i bachka bez problem...

eto ti primeren script
-------------------------------------------------rc.cbq
#!/bin/bash
TC=/sbin/tc
IP=/sbin/ip

# Remove the disciplines for eth0
$TC qdisc del dev eth0 root

# Configuring the root 'queueing discipline' of eth0
$TC qdisc add dev eth0 root handle 10: cbq bandwidth 10Mbit avpkt 1000        

# Generating the root class 10:                       
$TC class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate \   
10Mbit allot 1514 weight 1Mbit prio 8 maxburst 20 avpkt 1000                  

# The class for queueing                                                      
$TC class add dev eth0 parent 10:1 classid 10:100 cbq bandwidth 10Mbit rate \ 
20Kbit allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 bounded          

# Installing the SFQ discipline for filtering in the kernel
$TC qdisc add dev eth1 parent 10:100 sfq quantum 1514b perturb 15             

# the filters
$TC filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip src \  
212.36.2.182 flowid 10:100

echo Done!
----------------------------------------------------------------------
probwaj go ... moje da byrkam nqkyde ... az weche ne go polzwam prawen e po 
primer ot Advanced-Routing-HOWTO.
preporychwam ti da polzwash cbq.init (http://uf.kadan.cz/cbq/cbq.init-v0.6.4) 
za nego file-a s configa shte e :
-------------cbq-10.free-techno------------
DEVICE=eth0,10Mbit,1Mbit
RATE=10Kbit
WEIGHT=1Kbit
PRIO=5
RULE=212.36.2.182,192.168.0.0/24
------------------------------------------------
eth0 e izhodiashtia interface kym wytreshnata LAN
preporychwa se prio 5
192.168.0.0/24 e LAN-a ti ... 


-- 
Stoian Mishev
Internet Administraror, Dolphin-3 BG.
e-mail: stuckoff@xxxxxxxxxxxx
ICQ #: 5079105
GSM: +359-88-435168

===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora



  • Относно:
    • lug-bg: tc&ip
      • Изпратено от: t.yankov@xxxxxxxxxxxxx (Tosho Yankov)

 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.