QoS Ingress shaping based on IP


#1

Hi Gents,

I’m redirecting the downstream traffic through the IFB interface in order to do an IP-based shaping on the ingress.

I couldn’t get it to work and then I noticed that it seems like I can’t do IP matching on the IFB (when debugging with tcpdump I saw the traffic still encapsulated). Could you please confirm this? As if this is the case, I don’t see many reasons why IFB would be useful…

Thanks.
Bernard


#2

Problem identified.

Seems like redirecting from VLAN interface to ifb0 and combined with an ifb0 out shaping into classes by IP rules doesn’t work due to the following:

tc -s filter show interface ifb0
...
...
filter parent 1: protocol all pref 138 u32 fh 889::800 order 2048 key ht 889 bkt 0 flowid 1:8b  (rule hit 251339 success 0)
  match <ip_in_hex_format>/ffffffff at 16 (success 0)

However using 802.1Q the destination IP doesn’t start at offset 16 (as 802.1Q tagging adds extra 4 octets to the Ethernet frame), it starts with offset 20.

After I realized the above I decided to test it and I did eth0 (no vlan) redirect to ifb0 with IP-based out shaping and it worked.

Could you please guys confirm my theory before I submit a bug report?

Kind regards,
Bernard