Forum » Omrežja in internet » bandwidth controll
bandwidth controll
Blisk ::
Ali obstaja kakšen program za linux, s katerim lahko uporabnikom omejuješ dostop do interneta, ter gledaš statistiko, glede njihovega dostopa do interneta, kam dostopajo in koliko Mb prenesjo itd.
fahrenGONE ::
www.softpedia.com/get/Network-Tools/Bandwidth-Tools/ ... upam da dobis kaksnega cool, ker zdaj nimam casa iskat.
Blisk ::
hvala za link, tuki je samo en mali problemček.
Vse to je za windows, jst pa rabim za linux.
Vse to je za windows, jst pa rabim za linux.
fahrenGONE ::
rshaper ( cvs ) ali pa morda Wonder Shaper ... lahko tudi HTB ... drugace pa poglej na freshmeat.net ali sf.net
urarrr ::
jo
ce ti grel linux, probaj mal opnBSD...je že vse integrurano v samem sistemu, sicer se da tudi v linuxu nastavit sam boš rabu dosti cajta..k je treba jedro spreminjat in svašta..
v bsd vpišeš v pocket filter 3 vrstice in stvar špila
mal poglej...tukaj je del mojega pocket filtra...tudi prioritete paketov kot tudi vpisi kako dosežeš na ADSL liniji hkrati 90% upload s tem da ti dela skoraj 100% dol in seveda omejitve uporabnikov, katere imam razdeljene %...zato da izkoriščajo max možno prosto hitrost
# =====================================================================
# altq section
# =====================================================================
# queue packets that go out of tun0 to internet (upload for server and lan users)
altq on $ext_if priq bandwidth 400Kb queue { def_out ftp_out www_out ssh_out dns_out mail_out tcp_ack}
queue tcp_ack priority 7
queue dns_out priority 6
queue ssh_out priority 5 priq(red)
queue mail_out priority 2 priq(red)
queue www_out priority 4 priq(red)
queue ftp_out priority 3 priq(red)
queue def_out priority 1 priq(default)
# queue packets that go out of vr0 to server (download for server, lan users unlimited)
altq on $srv_if priq bandwidth 100Mb queue { tcp_acks ftp_in dns_in ssh_in mail_in www_in def_in }
queue tcp_acks priority 7
queue dns_in priority 6
queue ssh_in priority 5 priq(red)
queue mail_in priority 2
queue www_in priority 4 priq(red)
queue ftp_in priority 3 priq(red)
queue def_in priority 1 priq(default)
# queue packets that go out of rl0 -download for internal users
# altq on $lan_if hfsc bandwidth 100% queue {users other}
# queue users bandwidth 3500Kb hfsc(realtime 20% linkshare 100%)
# queue other hfsc(default)
altq on $lan_if hfsc bandwidth 3500Kb queue {user1 user2 user3 user4 user5 user6 user7 user8 user9}
#queue user1 bandwidth 900Kb hfsc (default upperlimit 1000Kb )
queue user1 bandwidth 30% hfsc(default)
queue user2 bandwidth 12%
queue user3 bandwidth 18%
queue user4 bandwidth 13%
queue user5 bandwidth 13%
queue user6 bandwidth 5%
queue user7 bandwidth 1%
queue user8 bandwidth 4%
queue user9 bandwidth 4%
# primercki:
# queue user3 bandwidth 200Kb priority 1 hfsc(realtime 300Kb upperlimit 1000Kb)
# queue user6 bandwidth 80Kb priority 1 hfsc(realtime 80Kb)
# queue userX bandwidth 5Kb priority 1 hfsc(realtime 10Kb upperlimit (15Kb 15000 25Kb))
# queue userY bandwidth 15Kb priority 2 hfsc(realtime 10Kb upperlimit (15Kb 15000 25Kb))
# queue userZ bandwidth 10% hfsc(red realtime 10Kb upperlimit (15Kb 15000 25Kb))
# realtime je minimalna garantirana hitrost (skupaj vse ne smejo presegati maximalne mozne)
# uperlimit je maximalna mozna
# (10Kb 15000 25Kb) pomeni da za dano omejevanje prvih 15 sekund dela s hitrostjo 10 kilobitov, nato naprej s 25 kilobitov
# ce je tam se priority < cifra > potem imajo paketi za to omejevanje vecjo prioriteto
#tukaj definiraš za vsakega userja svoj ip
pass in log on $lan_if from 192.168.X.Xto any keep state queue user1
pass in log on $lan_if from 192.168.xxx to any keep state queue user2
pass in log on $lan_if from 192.168.xxx to any keep state queue user3
pass in log on $lan_if from 192.168.xxx to any keep state queue user4
pass in log on $lan_if from 192.168.xxx to any keep state queue user5
pass in log on $lan_if from 192.168.xxx to any keep state queue user6
pass in log on $lan_if from 192.168.xxx to any keep state queue user7
pass in log on $lan_if from 192.168.xxx to any keep state queue user8
pass in log on $lan_if from 192.168.0.118 to any keep state queue user9
upam da kaj štekaš
ce ti grel linux, probaj mal opnBSD...je že vse integrurano v samem sistemu, sicer se da tudi v linuxu nastavit sam boš rabu dosti cajta..k je treba jedro spreminjat in svašta..
v bsd vpišeš v pocket filter 3 vrstice in stvar špila
mal poglej...tukaj je del mojega pocket filtra...tudi prioritete paketov kot tudi vpisi kako dosežeš na ADSL liniji hkrati 90% upload s tem da ti dela skoraj 100% dol in seveda omejitve uporabnikov, katere imam razdeljene %...zato da izkoriščajo max možno prosto hitrost
# =====================================================================
# altq section
# =====================================================================
# queue packets that go out of tun0 to internet (upload for server and lan users)
altq on $ext_if priq bandwidth 400Kb queue { def_out ftp_out www_out ssh_out dns_out mail_out tcp_ack}
queue tcp_ack priority 7
queue dns_out priority 6
queue ssh_out priority 5 priq(red)
queue mail_out priority 2 priq(red)
queue www_out priority 4 priq(red)
queue ftp_out priority 3 priq(red)
queue def_out priority 1 priq(default)
# queue packets that go out of vr0 to server (download for server, lan users unlimited)
altq on $srv_if priq bandwidth 100Mb queue { tcp_acks ftp_in dns_in ssh_in mail_in www_in def_in }
queue tcp_acks priority 7
queue dns_in priority 6
queue ssh_in priority 5 priq(red)
queue mail_in priority 2
queue www_in priority 4 priq(red)
queue ftp_in priority 3 priq(red)
queue def_in priority 1 priq(default)
# queue packets that go out of rl0 -download for internal users
# altq on $lan_if hfsc bandwidth 100% queue {users other}
# queue users bandwidth 3500Kb hfsc(realtime 20% linkshare 100%)
# queue other hfsc(default)
altq on $lan_if hfsc bandwidth 3500Kb queue {user1 user2 user3 user4 user5 user6 user7 user8 user9}
#queue user1 bandwidth 900Kb hfsc (default upperlimit 1000Kb )
queue user1 bandwidth 30% hfsc(default)
queue user2 bandwidth 12%
queue user3 bandwidth 18%
queue user4 bandwidth 13%
queue user5 bandwidth 13%
queue user6 bandwidth 5%
queue user7 bandwidth 1%
queue user8 bandwidth 4%
queue user9 bandwidth 4%
# primercki:
# queue user3 bandwidth 200Kb priority 1 hfsc(realtime 300Kb upperlimit 1000Kb)
# queue user6 bandwidth 80Kb priority 1 hfsc(realtime 80Kb)
# queue userX bandwidth 5Kb priority 1 hfsc(realtime 10Kb upperlimit (15Kb 15000 25Kb))
# queue userY bandwidth 15Kb priority 2 hfsc(realtime 10Kb upperlimit (15Kb 15000 25Kb))
# queue userZ bandwidth 10% hfsc(red realtime 10Kb upperlimit (15Kb 15000 25Kb))
# realtime je minimalna garantirana hitrost (skupaj vse ne smejo presegati maximalne mozne)
# uperlimit je maximalna mozna
# (10Kb 15000 25Kb) pomeni da za dano omejevanje prvih 15 sekund dela s hitrostjo 10 kilobitov, nato naprej s 25 kilobitov
# ce je tam se priority < cifra > potem imajo paketi za to omejevanje vecjo prioriteto
#tukaj definiraš za vsakega userja svoj ip
pass in log on $lan_if from 192.168.X.Xto any keep state queue user1
pass in log on $lan_if from 192.168.xxx to any keep state queue user2
pass in log on $lan_if from 192.168.xxx to any keep state queue user3
pass in log on $lan_if from 192.168.xxx to any keep state queue user4
pass in log on $lan_if from 192.168.xxx to any keep state queue user5
pass in log on $lan_if from 192.168.xxx to any keep state queue user6
pass in log on $lan_if from 192.168.xxx to any keep state queue user7
pass in log on $lan_if from 192.168.xxx to any keep state queue user8
pass in log on $lan_if from 192.168.0.118 to any keep state queue user9
upam da kaj štekaš
LP Urarrr
urarrr ::
aja..
to se ti lohk tud logira...
kam dostopijo ...
pfctl -ss|grep 192.168.0.113|grep ESTABLISHED
all tcp 80.136.245.123:1664 - > 192.168.0.113:4662 ESTABLISHED:ESTABLISHED
all tcp 200.138.33.124:4678 - > 192.168.0.113:4662 ESTABLISHED:CLOSING
all tcp 200.138.33.124:4278 - > 192.168.0.113:4662 ESTABLISHED:CLOSING
all tcp 82.250.182.145:3832 - > 192.168.0.113:4662 ESTABLISHED:SYN_SENT
all tcp 81.172.51.151:4662 < - 192.168.0.113:2311 ESTABLISHED:ESTABLISHED
all tcp 81.43.77.157:4944 - > 192.168.0.113:4662 ESTABLISHED:CLOSING
all tcp 217.130.54.173:3270 - > 192.168.0.113:4662 ESTABLISHED:ESTABLISHED
all tcp 195.134.93.189:26701 < - 192.168.0.113:1030 ESTABLISHED:ESTABLISHED
kolk porabijo
pfctl -vvsq
queue root_rl1 bandwidth 3.50Mb priority 0 {user1, user2, user3, user4, user5, user6, user7, user8, user9}
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user1 bandwidth 1.05Mb hfsc( default )
[ pkts: 62998 bytes: 27060750 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 11.33 b/s ]
queue user2 bandwidth 420Kb
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user3 bandwidth 630Kb
[ pkts: 1149977 bytes: 1121459048 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 2.4 packets/s, 8.35Kb/s ]
queue user4 bandwidth 455Kb
[ pkts: 4065296 bytes: 2120972244 dropped pkts: 16 bytes: 21708 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user5 bandwidth 455Kb
[ pkts: 20328617 bytes: 9559486807 dropped pkts: 445 bytes: 434626 ]
[ qlength: 0/ 50 ]
[ measured: 9.4 packets/s, 5.38Kb/s ]
queue user6 bandwidth 175Kb
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user7 bandwidth 35Kb
[ pkts: 4764 bytes: 4563854 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user8 bandwidth 140Kb
[ pkts: 2942072 bytes: 1582554997 dropped pkts: 12 bytes: 17928 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user9 bandwidth 140Kb
[ pkts: 501278 bytes: 141644877 dropped pkts: 4 bytes: 4563 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
to se ti lohk tud logira...
kam dostopijo ...
pfctl -ss|grep 192.168.0.113|grep ESTABLISHED
all tcp 80.136.245.123:1664 - > 192.168.0.113:4662 ESTABLISHED:ESTABLISHED
all tcp 200.138.33.124:4678 - > 192.168.0.113:4662 ESTABLISHED:CLOSING
all tcp 200.138.33.124:4278 - > 192.168.0.113:4662 ESTABLISHED:CLOSING
all tcp 82.250.182.145:3832 - > 192.168.0.113:4662 ESTABLISHED:SYN_SENT
all tcp 81.172.51.151:4662 < - 192.168.0.113:2311 ESTABLISHED:ESTABLISHED
all tcp 81.43.77.157:4944 - > 192.168.0.113:4662 ESTABLISHED:CLOSING
all tcp 217.130.54.173:3270 - > 192.168.0.113:4662 ESTABLISHED:ESTABLISHED
all tcp 195.134.93.189:26701 < - 192.168.0.113:1030 ESTABLISHED:ESTABLISHED
kolk porabijo
pfctl -vvsq
queue root_rl1 bandwidth 3.50Mb priority 0 {user1, user2, user3, user4, user5, user6, user7, user8, user9}
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user1 bandwidth 1.05Mb hfsc( default )
[ pkts: 62998 bytes: 27060750 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 11.33 b/s ]
queue user2 bandwidth 420Kb
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user3 bandwidth 630Kb
[ pkts: 1149977 bytes: 1121459048 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 2.4 packets/s, 8.35Kb/s ]
queue user4 bandwidth 455Kb
[ pkts: 4065296 bytes: 2120972244 dropped pkts: 16 bytes: 21708 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user5 bandwidth 455Kb
[ pkts: 20328617 bytes: 9559486807 dropped pkts: 445 bytes: 434626 ]
[ qlength: 0/ 50 ]
[ measured: 9.4 packets/s, 5.38Kb/s ]
queue user6 bandwidth 175Kb
[ pkts: 0 bytes: 0 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user7 bandwidth 35Kb
[ pkts: 4764 bytes: 4563854 dropped pkts: 0 bytes: 0 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user8 bandwidth 140Kb
[ pkts: 2942072 bytes: 1582554997 dropped pkts: 12 bytes: 17928 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
queue user9 bandwidth 140Kb
[ pkts: 501278 bytes: 141644877 dropped pkts: 4 bytes: 4563 ]
[ qlength: 0/ 50 ]
[ measured: 0.0 packets/s, 0 b/s ]
LP Urarrr
fahrenGONE ::
Se splaca imet BSD server namesto Linux? Nekako mi je bolj vsec BSD ampak me malo skrbi kako je z updati, novim softwerom ipd...
das ::
@urarr
Vidim, da se spoznaš na OBSD. Tudi sam ga imam doma postavljenega za router, web in mail strežnik. Z altq kontroliram promet, ampak imam en problem/vprašanje. P2P promet preko Azureusa mi ni uspelo nikakor zajet v p2p_in queue. Azureus imam nastavljen na port 62500, vendar se ta port uporablja samo pri upload-u, pri downloadu pa naključni local port in remote port. Zato me zanima, če poznaš kakšno metodo omejevanja bandwidtha na application-levelu? Ker to bi bilo idealno. Sem sam iskal, ampak nič uporabnega še do sedaj ni bilo.
Ali pa mogoče še kakšna rešitev??
Lp
Vidim, da se spoznaš na OBSD. Tudi sam ga imam doma postavljenega za router, web in mail strežnik. Z altq kontroliram promet, ampak imam en problem/vprašanje. P2P promet preko Azureusa mi ni uspelo nikakor zajet v p2p_in queue. Azureus imam nastavljen na port 62500, vendar se ta port uporablja samo pri upload-u, pri downloadu pa naključni local port in remote port. Zato me zanima, če poznaš kakšno metodo omejevanja bandwidtha na application-levelu? Ker to bi bilo idealno. Sem sam iskal, ampak nič uporabnega še do sedaj ni bilo.
Ali pa mogoče še kakšna rešitev??
Lp
Blisk ::
Jst rabim zadevo za Debina 3.1
Probal sem neke zadeve pa ne deluje, zato bi rabil od koga, ki ima zadevo nameščeno in da dela.
Probal sem neke zadeve pa ne deluje, zato bi rabil od koga, ki ima zadevo nameščeno in da dela.
urarrr ::
jo..
zakaj na aplikacijo, pa saj omijš cel IP naslov, pa sploh ni važno čez katir port gre.
zakaj na aplikacijo, pa saj omijš cel IP naslov, pa sploh ni važno čez katir port gre.
LP Urarrr
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | Vzpostavitev strežnika (ubuntu)Oddelek: Omrežja in internet | 6947 (6148) | s6c-gEL |
» | iptables restartOddelek: Omrežja in internet | 1758 (1581) | BRBR |
» | Kratek uvod v FreeBSD (strani: 1 2 3 4 … 8 9 10 11 )Oddelek: Operacijski sistemi | 65717 (29455) | Prospekt |
» | Cisco 831 MAC addressOddelek: Omrežja in internet | 1126 (1070) | marjanX |
» | DEBIAN problemOddelek: Omrežja in internet | 1825 (1635) | AirBladE |