Skip to main content
added 452 characters in body
Source Link
edgarstack
  • 213
  • 2
  • 7

I just realised that all the iptables rules I have been applying to my open Vswitch interfaces never match.

I am using iptables to mark some packets, and then I use TC (traffic control) filters to put packets into different priority queues depending on the Iptables match. That works for every interface, and even for Linux Bridges (using -m physdev module).

How can I filter packets that go through an ovs interface and put them into different priority queues if I can not mark them with iptables?

Rules (simplified):

iptables -w -t mangle -A POSTROUTING -m physdev --physdev-out interface-name -m ttl --ttl-lt 10 ! -p 89 -j MARK --set-mark 10

tc filter add dev interface-name parent 1:0 protocol all prio 1 handle 10 fw flowid 1:10

Then I am using HTB for the priorities, lets say that there are two queues 1:10 and 1:20. The rule should send all the traffic with ttl < 10 and not OSPF to the first queue 1:10.

I just realised that all the iptables rules I have been applying to my open Vswitch interfaces never match.

I am using iptables to mark some packets, and then I use TC (traffic control) filters to put packets into different priority queues depending on the Iptables match. That works for every interface, and even for Linux Bridges (using -m physdev module).

How can I filter packets that go through an ovs interface and put them into different priority queues if I can not mark them with iptables?

I just realised that all the iptables rules I have been applying to my open Vswitch interfaces never match.

I am using iptables to mark some packets, and then I use TC (traffic control) filters to put packets into different priority queues depending on the Iptables match. That works for every interface, and even for Linux Bridges (using -m physdev module).

How can I filter packets that go through an ovs interface and put them into different priority queues if I can not mark them with iptables?

Rules (simplified):

iptables -w -t mangle -A POSTROUTING -m physdev --physdev-out interface-name -m ttl --ttl-lt 10 ! -p 89 -j MARK --set-mark 10

tc filter add dev interface-name parent 1:0 protocol all prio 1 handle 10 fw flowid 1:10

Then I am using HTB for the priorities, lets say that there are two queues 1:10 and 1:20. The rule should send all the traffic with ttl < 10 and not OSPF to the first queue 1:10.

Source Link
edgarstack
  • 213
  • 2
  • 7

Alternative to Iptables for packet filtering in OVS interfaces

I just realised that all the iptables rules I have been applying to my open Vswitch interfaces never match.

I am using iptables to mark some packets, and then I use TC (traffic control) filters to put packets into different priority queues depending on the Iptables match. That works for every interface, and even for Linux Bridges (using -m physdev module).

How can I filter packets that go through an ovs interface and put them into different priority queues if I can not mark them with iptables?