【问题标题】:QoS in OpenWRT dependant on two IP'sOpenWRT 中的 QoS 依赖于两个 IP
【发布时间】:2017-08-31 05:26:51
【问题描述】:

我正在尝试开发一个控制两个 IP 的 QoS 系统。

使用基于 OpenWRT 的路由器固件,我尝试使用 TC,但遇到了不兼容的问题。是否有其他软件包或一组软件包可用于实现此目的?

版本:CHAOS CALMER (15.05, r46767)

我已尝试按照以下 wiki 页面中显示的结果进行跟踪。 https://wiki.openwrt.org/doc/howto/packet.scheduler/packet.scheduler#examples

由于包不兼容,下面文章中显示的示例使用了无效参数“CLASSIFY”。 https://wiki.openwrt.org/doc/howto/packet.scheduler/packet.scheduler.example3

开机结果:

Failed to find ipt_TOS. Maybe it is a built in module ?
Failed to find ipt_tos. Maybe it is a built in module ?
Failed to find ipt_length. Maybe it is a built in module ?
module is already loaded - sch_hfsc
module is already loaded - sch_ingress
Bad argument `CLASSIFY'

非常感谢任何帮助

【问题讨论】:

    标签: bash ip router openwrt qos


    【解决方案1】:
    # Delete qdisc rule
    tc qdisc del dev br-lan root
    
    # Add qdisc rule
    tc qdisc add dev br-lan root handle 1: htb default 10
    
    # Setup parent class
    tc class add dev br-lan parent 1: classid 1:1 htb rate 2000kbit ceil 2000kbit
    
    # Add child classes of parent class 1:
    #Wired
    tc class add dev br-lan parent 1:1 classid 1:10 htb rate 2000kbit ceil 2000kbit
    #Wired2
    tc class add dev br-lan parent 1:1 classid 1:11 htb rate 1000kbit ceil 1000kbit
    #Wireless1
    tc class add dev br-lan parent 1:1 classid 1:12 htb rate 250kbit ceil 150kbit
    
    # Create packet filter rule using parent 1: class, matching to IP (src = outbound traffic, dst = inbound traffic)
    # and assigning child class rule via flowid
    
    tc -s filter show dev br-lan
    
    tc filter add dev br-lan parent 1: protocol ip prio 1 u32 match ip src 192.168.1.35 flowid 1:10
    tc filter add dev br-lan parent 1: protocol ip prio 1 u32 match ip dst 192.168.1.35 flowid 1:10
    tc filter add dev br-lan parent 1: protocol ip prio 1 u32 match ip src 192.168.1.67 flowid 1:11
    tc filter add dev br-lan parent 1: protocol ip prio 1 u32 match ip dst 192.168.1.67 flowid 1:11
    tc filter add dev br-lan parent 1: protocol ip prio 1 u32 match ip src 192.168.1.104 flowid 1:12
    tc filter add dev br-lan parent 1: protocol ip prio 1 u32 match ip dst 192.168.1.104 flowid 1:12
    tc filter add dev br-lan parent 1: protocol ip prio 1 u32 match ip dst 192.168.1.104 flowid 1:12
    
    tc -s filter show dev br-lan
    

    【讨论】:

    • 这最初不适用于上传限制。我必须为我的 wan 接口 tc qdisc del dev eth1.2 root 添加一个额外的 qdisc 规则(eth1.2 是我的 wan 接口)并为此添加一个类和过滤器,然后使用 ip tc filter add dev eth1.2 parent 2: protocol ip prio 1 u32 match ip dst 192.168.1.35 flowid 2:10 定义 tc 过滤器
    猜你喜欢
    • 2013-10-11
    • 2018-01-15
    • 1970-01-01
    • 1970-01-01
    • 2011-09-02
    • 2014-08-18
    • 1970-01-01
    • 2016-12-11
    • 1970-01-01
    相关资源
    最近更新 更多