Traffic Shaping DGA4132

  • 2 Risposte
  • 5083 Visite

0 Utenti e 1 Visitatore stanno visualizzando questo topic.

Offline xMase

  • Nuovo Iscritto
  • *
  • 14
Traffic Shaping DGA4132
« il: 27 Aprile 2019, 17:15 »
Traffic Shaping DGA4132


https://github.com/xMase/Traffic-Shaping-DGA4132

It is a useful script to easily configure traffic shaping on Tim DGA4132 (TimHub)

This script uses qdisc with htb as traffic shaper and sfq as queuing disciplines.

To avoid incompatibility with the technicolor standard QoS it will be disabled once it is installed and re-enabled upon uninstallation.

it is highly recommended to disable ipv6.


Install


From a shell interface run:

Codice: [Seleziona]
wget --no-check-certificate https://github.com/xMase/Traffic-Shaping-DGA4132/releases/latest/download/mShaper.tar.gz -O /tmp/mShaper.tar.gz
mkdir /tmp/mShaper; tar xvzf /tmp/mShaper.tar.gz -C /tmp/mShaper && chmod +x /tmp/mShaper/setup.sh
/tmp/mShaper/setup.sh install


Uninstall


From a shell interface run:

Codice: [Seleziona]
/tmp/mShaper/setup.sh uninstall

Configuration


Change the test configuration located in /etc/config/mshaper.

I remember that:

- eth0 ... eth3 => are the ethernet interfaces
- eth5 => is the 5Ghz wifi interface
- wl0 => is the 2.4Ghz wifi interface

In interface/class section:

- downlink => upload
- uplink => download

An interface can have more class and each class can have multiple ip/mac filters that manage the available bandwidth.

Codice: [Seleziona]
# 5Ghz wifi interface
config interface 'eth5'
    # max interface upload 
    option 'tot_dl' '3000kbit'
    # max interface download
    option 'tot_up' '30000kbit'
    # list of classes added to this interface
    list class '7mb'
    # ...
   
# 2.4Ghz wifi interface same as before
config interface 'wl0' 
    # maximum upload for the filters of this class,
    # this value is optional
    # if not added will take the total upload value of the interface
    option 'tot_dl' '3000kbit'
    # maximum download for the filters of this class,
    # this value is optional
    # if not added will take the total download value of the interface
    option 'tot_up' '30000kbit'
    list class '7mb'
    # ...

# class that limits the filters
config class '7mb'
    option 'dl' '324kbit'
    option 'ul' '7000kbit' 
    # list of filters added to this class
    list filter 'tv'
    list filter 'tablet'
    # ...

# mac based filter
config filter 'tv'     
    option 'mac' '01:01:01:01:01:01'

# ip based filter
config filter 'tablet'
    option 'ip' '192.168.1.25'
    # IPv4 Subnet Calculator
    # https://www.calculator.net/ip-subnet-calculator.html
    option 'subnetmask' '32'


Usage



Default operations:

- /etc/init.d/mshaper enable  => to enable the script on starup
- /etc/init.d/mshaper start => to start the script
- /etc/init.d/mshaper stop => to stop the script
- /etc/init.d/mshaper disable => to disable the script on starup

Debug:

- logread => to read mshaper log


Contribute code


If you have any ideas/solutions/improvements to be included in this project, feel free to submit a pull request.
« Ultima modifica: 27 Aprile 2019, 17:20 da xMase »

Offline ttt666

  • Membro Giovane
  • **
  • 59
Re:Traffic Shaping DGA4132
« Risposta #1 il: 28 Aprile 2019, 10:55 »
Complimenti :clap:

Domande:
Si può installare su DGA4130?
Performance generali rispetto al QoS nativo sul Technicolor?
I pacchetti della fonia ne risentono oppure le telefonate rimangono perfette (o meglio attivare qualche setting particolare)?

Offline xMase

  • Nuovo Iscritto
  • *
  • 14
Re:Traffic Shaping DGA4132
« Risposta #2 il: 29 Aprile 2019, 17:37 »
Io possiedo solamente un DGA4132 (TIMHUB) ma viste le pochissime differenze hardware probabilmente è compatibile.
La prioritizzazione della technicolor viene disabilita e viene rimpiazzata dalla gestione traffico dati, che aiuta a non congestionare la rete.
Se limiti i dispositivi più problematici (es. tv con streaming on demand) ottieni lo stesso effetto in maniera più specifica.
Nel mio caso la prioritizzazione della technicolor non funziona, infatti 2 tv con streaming on demand attivo saturavano totalmente la linea e gli altri dispositivo andavano praticamente offline.
Attraverso il sistema di traffic shaping ho limitato la banda ad 1/4 per ogni tv e la restante banda divisa fra altri dispositivi della rete risolvendo il problema.