Chyba ruszyło:
root@Gargoyle:/lib/modules# modprobe sch_netem
root@Gargoyle:/lib/modules# lsmod | grep sch_netem
sch_netem 7264 0
Chyba ruszyło, teraz polecenie tc qdisc add dev eth0 root netem delay 100ms
nie wyrzuciło braku pliku
.
Sam znalazłem tylko:
The netem kernel component is enabled under:
Networking -->
Networking Options -->
QoS and/or fair queuing -->
Network emulator
Netem is controlled by the command line tool 'tc' which is part of the iproute2 package of tools. The tc command uses shared libraries and data files in the /usr/lib/tc directory.
Speed test w telefonie pokazał ping 130, pasmo 100Mbit też jest ścięte o połowę, ale nie ma tragedii, działa, dzięki, teraz potestuje inne opcje, opcje, losowanie ping i będę się uczył obsługi cron.
No przy drugim teście już zostało tylko 10% pasma choć ping 116, to w sumie zwiększa opóźnienie pakietu wyjściowego i głównie pasmo wyjściowe zostaje ścięte, film z Youtub leci OK przy pingu 500+/-499.
tc qdisc replace dev eth0 root netem delay 500ms 499ms
Tak to wygląda z punktu widzenia routera:
64 bytes from 108.157.4.32: seq=342 ttl=240 time=70.750 ms
64 bytes from 108.157.4.32: seq=343 ttl=240 time=316.797 ms
64 bytes from 108.157.4.32: seq=344 ttl=240 time=100.625 ms
64 bytes from 108.157.4.32: seq=345 ttl=240 time=130.901 ms
64 bytes from 108.157.4.32: seq=346 ttl=240 time=120.648 ms
64 bytes from 108.157.4.32: seq=347 ttl=240 time=281.727 ms
64 bytes from 108.157.4.32: seq=348 ttl=240 time=214.578 ms
64 bytes from 108.157.4.32: seq=349 ttl=240 time=294.600 ms
64 bytes from 108.157.4.32: seq=350 ttl=240 time=161.676 ms
64 bytes from 108.157.4.32: seq=351 ttl=240 time=113.407 ms
64 bytes from 108.157.4.32: seq=352 ttl=240 time=235.054 ms
64 bytes from 108.157.4.32: seq=353 ttl=240 time=85.764 ms
64 bytes from 108.157.4.32: seq=354 ttl=240 time=82.982 ms
64 bytes from 108.157.4.32: seq=355 ttl=240 time=407.001 ms
64 bytes from 108.157.4.32: seq=356 ttl=240 time=206.052 ms
64 bytes from 108.157.4.32: seq=357 ttl=240 time=303.914 ms
64 bytes from 108.157.4.32: seq=358 ttl=240 time=213.082 ms
64 bytes from 108.157.4.32: seq=359 ttl=240 time=330.111 ms
64 bytes from 108.157.4.32: seq=360 ttl=240 time=313.933 ms
64 bytes from 108.157.4.32: seq=361 ttl=240 time=342.941 ms
64 bytes from 108.157.4.32: seq=362 ttl=240 time=294.710 ms
64 bytes from 108.157.4.32: seq=363 ttl=240 time=137.754 ms
64 bytes from 108.157.4.32: seq=364 ttl=240 time=390.914 ms
64 bytes from 108.157.4.32: seq=368 ttl=240 time=162.509 ms
64 bytes from 108.157.4.32: seq=369 ttl=240 time=408.424 ms
372 packets transmitted, 371 packets received, 0% packet loss
round-trip min/avg/max = 37.538/236.470/432.371 ms
A więc chodziło o modprobe - dodaje i usuwa moduły z jądra Linux.
Dzięki wielkie.
Dodatkowe pytanie. Można to dodać do jądra na stałe czy trzeba przy uruchomieniu odpalać, bo po restarcie niestety znikło?
W sumie nieważne, dopisałem linijkę 'modprobe sch_netem' do pliku /etc/rc.local,
a poleceniem crontab -e:
4 23 * * * tc qdisc add dev eth0 root netem delay 200ms 199ms
59 23 * * * tc qdisc replace dev eth0 root netem delay 400ms 399ms
0 6 * * * tc qdisc del dev eth0 root
zostawię sobie tu jako ściągę.
Polecenia z tutoriala cron - start, restart, enable nie działają, ale sprawdziłem i zaraz po zapisaniu w crontable wszystko jest gotowe do działania.