Skip to content
Snippets Groups Projects
Commit 32fdd7dd authored by Rahul Thakur's avatar Rahul Thakur
Browse files

brcm63xx: targets panther and tiger updated

- remove fiber init script from panther, no longer needed
- add sleep to wanconf, it takes time to setup fiber uplink
- add firewall.qos script for panther and tiger. only 4 queues are
  available in downlink so in current form, firewall.qos causes
  network disruption by trying to map packets to non-existant queues.
parent 65309c51
Branches
No related tags found
No related merge requests found
#Queue Name=Priority
q_def_queue=0
q_normal=1
q_medium=2
q_highest=3
# Local generated DNS traffic goes to q_highest
iptables -t mangle -D OUTPUT -p udp -m udp --dport 53 -j MARK --set-xmark 0x$q_highest/0x$q_highest 2>/dev/null
iptables -t mangle -A OUTPUT -p udp -m udp --dport 53 -j MARK --set-xmark 0x$q_highest/0x$q_highest
# Local generated IGMP traffic goes to q_highest
iptables -t mangle -D OUTPUT -p 2 -j MARK --set-xmark 0x$q_highest/0x$q_highest 2>/dev/null
iptables -t mangle -A OUTPUT -p 2 -j MARK --set-xmark 0x$q_highest/0x$q_highest
# Local generated DHCP traffic goes to q_highest
iptables -t mangle -D OUTPUT -p udp -m udp --dport 67:68 -j MARK --set-xmark 0x$q_highest/0x$q_highest 2>/dev/null
iptables -t mangle -A OUTPUT -p udp -m udp --dport 67:68 -j MARK --set-xmark 0x$q_highest/0x$q_highest
# Local generated ICMP traffic goes to q_highest
iptables -t mangle -D OUTPUT -p icmp -j MARK --set-xmark 0x$q_highest/0x$q_highest 2>/dev/null
iptables -t mangle -A OUTPUT -p icmp -j MARK --set-xmark 0x$q_highest/0x$q_highest
# LAN generated ICMP traffic goes to q_normal
iptables -t mangle -D PREROUTING -p icmp -j MARK --set-xmark 0x$q_normal/0x$q_normal 2>/dev/null
iptables -t mangle -A PREROUTING -p icmp -j MARK --set-xmark 0x$q_normal/0x$q_normal
# Prioritize all traffic from a specific port
#ebtables -t broute -D BROUTING -i eth3+ -j mark --mark-or 0x7 2>/dev/null
#ebtables -t broute -A BROUTING -i eth3+ -j mark --mark-or 0x7
# VLAN prio tag -> Queue prio
for i in `seq 1 7`; do
ebtables -t broute -D BROUTING --skbvlan-prio $i -j mark --mark-or 0x$i 2>/dev/null
ebtables -t broute -A BROUTING --skbvlan-prio $i -j mark --mark-or 0x$i
done
# Rest goes to q_def_queue
#!/bin/sh /etc/rc.common
START=60
USE_PROCD=1
start_service() {
wanconf
}
service_triggers()
{
procd_add_reload_trigger network wireless
}
......@@ -4,5 +4,6 @@ START=15
boot() {
wanconf
sleep 5
}
#Queue Name=Priority
q_def_queue=0
q_normal=1
q_medium=2
q_highest=3
# Local generated DNS traffic goes to q_highest
iptables -t mangle -D OUTPUT -p udp -m udp --dport 53 -j MARK --set-xmark 0x$q_highest/0x$q_highest 2>/dev/null
iptables -t mangle -A OUTPUT -p udp -m udp --dport 53 -j MARK --set-xmark 0x$q_highest/0x$q_highest
# Local generated IGMP traffic goes to q_highest
iptables -t mangle -D OUTPUT -p 2 -j MARK --set-xmark 0x$q_highest/0x$q_highest 2>/dev/null
iptables -t mangle -A OUTPUT -p 2 -j MARK --set-xmark 0x$q_highest/0x$q_highest
# Local generated DHCP traffic goes to q_highest
iptables -t mangle -D OUTPUT -p udp -m udp --dport 67:68 -j MARK --set-xmark 0x$q_highest/0x$q_highest 2>/dev/null
iptables -t mangle -A OUTPUT -p udp -m udp --dport 67:68 -j MARK --set-xmark 0x$q_highest/0x$q_highest
# Local generated ICMP traffic goes to q_highest
iptables -t mangle -D OUTPUT -p icmp -j MARK --set-xmark 0x$q_highest/0x$q_highest 2>/dev/null
iptables -t mangle -A OUTPUT -p icmp -j MARK --set-xmark 0x$q_highest/0x$q_highest
# LAN generated ICMP traffic goes to q_normal
iptables -t mangle -D PREROUTING -p icmp -j MARK --set-xmark 0x$q_normal/0x$q_normal 2>/dev/null
iptables -t mangle -A PREROUTING -p icmp -j MARK --set-xmark 0x$q_normal/0x$q_normal
# Prioritize all traffic from a specific port
#ebtables -t broute -D BROUTING -i eth3+ -j mark --mark-or 0x7 2>/dev/null
#ebtables -t broute -A BROUTING -i eth3+ -j mark --mark-or 0x7
# VLAN prio tag -> Queue prio
for i in `seq 1 7`; do
ebtables -t broute -D BROUTING --skbvlan-prio $i -j mark --mark-or 0x$i 2>/dev/null
ebtables -t broute -A BROUTING --skbvlan-prio $i -j mark --mark-or 0x$i
done
# Rest goes to q_def_queue
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment