802.1q priority tagging selected traffic
I am attempting to selectively tag traffic.
As an example I have tried to tag ping traffic by doing the following:
1. use vconfig to create vlan 0.0
vconfig add eth 0 0
ifconfig eth0.0 up 192.168.50.110
2. using ip route create a table (4) with a route via the interface eth0.0
ip route add table 4 192.168.50.0/24 dev eth0.0 src 192.168.50.110
ip route add table 4 default via 192.168.50.1 dev eth0.0
3. using iptables mangle all icmp traffic to be marked (4)
iptables -t mangle -A PREROUTING -p icmp -j MARK --set-mark 4
4. use ip rule to associate the marked traffic with the routing table
ip rule add fwmark 4 table 4
ping'g 192.168.50.xx does not however cause tagged pkts to be generated.
Is this scheme workable, I'm particularly worried about the selection of the correct routing table based on the marking.