PDA

View Full Version : Limitare velocità in upload


iron84
25-01-2008, 18:01
Ho 2 pc collegati ad internet tramite router.
Entrambi hanno su linux (uno debian e l'altro ubuntu)
Siccome sul pc con debian ho messo su un serverino, avrei bisogno che sia sempre disponibile della banda in upload.
Si può limitare in ubuntu la velocità massima di up, in modo tale che se dovessi inviare grossi allegati per email, non vada a saturarmi l'intera banda?

Devil!
25-01-2008, 18:21
Lo puoi fare con traffic control (http://lartc.org/)

altri link:

Linux Advanced Routing & Traffic Control HOWTO - http://lartc.org/lartc.html

traffic shaping with Linux - http://www.knowplace.org/pages/howtos/traffic_shaping_with_linux.php

ADSL Bandwidth Management HOWTO - http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/ADSL-Bandwidth-Management-HOWTO.html

Linux 2.2 Packet Shaping HOWTO - http://svana.org/kleptog/Packet-Shaping-HOWTO.txt

Quality of Service Networking - http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/qos.htm

HTB home - http://luxik.cdi.cz/~devik/qos/htb/

HTB Linux queuing discipline manual - user guide - http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm

HTB performance compared - http://luxik.cdi.cz/~devik/qos/htb/htb3perf/cbqhtb3perf.htm

Traffic Control using tcng and HTB HOWTO - http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Traffic-Control-tcng-HTB-HOWTO.html

The Netfilter project (http://www.netfilter.org/) - netfilter/iptables project home

Iptables Tutorial - http://iptables-tutorial.frozentux.net/chunkyhtml/index.html

Iptables connection tracking explained (http://www.cs.princeton.edu/~jns/security/iptables/iptables_conntrack.html)

Linux Networking-concepts HOWTO (http://netfilter.samba.org/unreliable-guides/networking-concepts-HOWTO/index.html)

RFC 1340 (http://andrew2.andrew.cmu.edu/rfc/rfc1340.html) - contains assigned numbers such as IP protocol number or well known port numbers

ICMP type-code summary (http://www.iana.org/assignments/icmp-parameters)

TCP/IP refresher http://www.cs.wright.edu/~pmateti/Courses/499/TCPIP/

An Internet Encyclopedia http://packetderm.cotse.com/CIE/Topics/index.htm

Three-Way Handshake via TCP/IP http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q172983&LN=EN-US

TCP Protocol Layers Explained http://www.onlamp.com/lpt/a/681

TCP window size http://www.ncsa.uiuc.edu/People/vwelch/net_perf/tcp_windows.html

Tcpdump Repository - http://www.tcpdump.org/

Tcpdump Techniques Tutorial - http://www.owlriver.com/tips/tcpdump-tech/

Tcpflow Tutorial - http://www.owlriver.com/tips/tcpflow-tutorial/

Tcpdump Tutorial - http://www.firetower.com/forum/tcpdump.html

pchar: A Tool for Measuring Internet Path Characteristics - http://www.employees.org/~bmah/Software/pchar/

peer-to-peer (P2P) data in IP traffic - http://www.ipp2p.org/

classifier for Linux's Netfilter - http://l7-filter.sourceforge.net/

network traffic shaper - http://www.mastershaper.org/

Traffic-Control-tcng-HTB-HOWTO - http://www.faqs.org/docs/Linux-HOWTO/Traffic-Control-tcng-HTB-HOWTO.html

Bonding - http://linux-net.osdl.org/index.php/Bonding

Bandwidth-Limiting-HOWTO - http://www.pluto.it/files/ildp/HOWTO/Bandwidth-Limiting-HOWTO/index.html

document for Lartc HOWTO - http://www.docum.org/docum.org/

Bandwidth limiting howto* with Gentoo - http://forums.gentoo.org/viewtopic-t-225863d.html

iron84
14-02-2008, 20:27
Grazie. Molto ben fatta e "relativamente semplice" la guida sul forum di gentoo.
Funzionare funziona ma.... non ho pensato che io uso anche il device eth0 per scambiare dati nella rete locale.
Il problema è che inserendo quelle classi mi limita l'upload dal device eth0 indipendentemente che si tratti di web o che si tratti di Lan.
Come si può fare in modo che il traffico verso gli indirizzi della mia lan (10.0.0.x) non rientri nelle classi limitate dell'up?

Oppure: devo impostare come classe madre, invece che i 120 kbits dell'esempio della guida, un valore alto in modo da non "bloccare" di default nulla e creare le classi sottostanti limitate in modo da inserire il traffico che voglio limitare, in quelle classi limitate?

Devil!
14-02-2008, 22:13
Crea 2 sottoclassi con limite differente e marca di conseguenza i pacchetti con iptables.

In pratica devi settare la root, poi creare una root class e poi le varie sottoclassi della root class