Portál AbcLinuxu, 6. května 2025 06:27
root@Mozkoun:~$ cat /etc/modules
wl
sch_prio
sch_sfq
cls_fw
root@Mozkoun:~$ cat /etc/init.d/S95custom-user-startup
#!/bin/sh
# place your own startup commands here
#
# REMEMBER: You *MUST* place an '&' after launching programs you
# that are to continue running in the background.
#
# i.e.
# BAD: upnpd
# GOOD: upnpd &
#
# Failure to do this will result in the startup process halting
# on this file and the diagnostic light remaining on (at least
# for WRT54G(s) models).
#
# TRAFFIC SHAPING
# -- br0 -- download
tc qdisc add dev br0 root handle 1:0 prio bands 2 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
tc qdisc add dev br0 parent 1:1 handle 11:0 pfifo
tc qdisc add dev br0 parent 1:2 handle 12:0 sfq perturb 5
# -- vlan1 -- upload
tc qdisc add dev vlan1 root handle 1:0 prio bands 2 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
tc qdisc add dev vlan1 parent 1:1 handle 11:0 pfifo
tc qdisc add dev vlan1 parent 1:2 handle 12:0 sfq perturb 5
# -- br0 - download - filtering --
tc filter add dev br0 parent 1:0 protocol ip handle 1 fw flowid 1:1
# -- vlan1 - upload - filtering --
tc filter add dev vlan1 parent 1:0 protocol ip handle 1 fw flowid 1:1
# -- br0 - download - marking --
iptables -t mangle -A FORWARD -d 192.168.0.33 -o br0 -j MARK --set-mark 1
# -- vlan1 - upload - marking --
iptables -t mangle -A FORWARD -s 192.168.0.33 -o vlan1 -j MARK --set-mark 1
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.