Re: MARK and routing issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2004-07-01 at 01:58, Steve Wakelin wrote:

> I am simply ;-( trying to MARK packets and then route them according to
> the mark.
> 
> [root@localhost sysconfig]# ip rule
> 0:      from all lookup local
> 32760:  from all fwmark 0x6 lookup T4
> 32761:  from all fwmark 0x5 lookup T3
> 32762:  from 192.168.252.1 lookup T2
> 32763:  from 192.168.253.1 lookup T1
> 32764:  from 192.168.252.1 lookup T2
> 32765:  from 192.168.253.1 lookup T1
> 32766:  from all lookup main
> 32767:  from all lookup default

I can't see what you're doing wrong, because I don't understand advanced
routing well enough.  However, this works for me:

ip rule add prio 100 fwmark 1 table 100
ip rule add prio 100 fwmark 5 table 5
ip route add local 0/0 dev lo table 100
ip route default via 172.16.6.2 table 5

Obviously, you don't want that "local 0/0" route, but the point is that,
using table (instead of lookup, which I don't know how to use), I get
mark-based routing that works.

Hope that helps.

Ciao,
Sheldon.



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux