Route policy preference value
Assuming if I have rules matching the same packet, the one chosen is the lower preference value or the high ?
For example
# ip rule list
....
100 from 192.168.1.0/24 lookup main
200 from all fwmark 5 lookup first
.....
Packet is matching both rules, the one with priority/preference 100 or 200 is selected ?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 5 lines · Ming-Ching Tiew
Assuming if I have rules matching the same packet, the one chosen is the lower preference value or the high ?
Quoted 9 lines
For example
# ip rule list....
100 from 192.168.1.0/24 lookup main
200 from all fwmark 5 lookup first
.....
for what I have understood is the lower, beware as pointed out to me from Martin Brown that failing a matching *route* from rule 100 it will look for the route in next matching *rule*. In my case I didn't defined default route, but packets passed since arrived to get the one defined in main table.
sandro
*:-)
Signature · 6 lines
Sandro Dentella *:-) e-mail: [email protected] http://www.tksql.org TkSQL Home page - My GPL work _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Ming-Ching,
: Assuming if I have rules matching the same packet, the one chosen : is the lower preference value or the high ?
:
: For example
:
: # ip rule list
:
: ....
: 100 from 192.168.1.0/24 lookup main
: 200 from all fwmark 5 lookup first
: .....
:
: Packet is matching both rules, the one with priority/preference : 100 or 200 is selected ?
The first matched rule in the routing policy database (RPDB) is the one chosen. Rules are traversed from 0 to 32767. If a route match is found for a given packet in a specified table, that route is used. If no match is found in a given table, the (sequential) traversal of the RPDB continues.
See also this description:
http://linux-ip.net/html/routing-selection.html#routing-selection-adv
Good luck,
-Martin
--
Martin A. Brown --- SecurePipe, Inc. --- [email protected]
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 5 lines
See also this description:
http://linux-ip.net/html/routing-selection.html#routing-selection-adv
Ghee a simple illustration will explain it much better than such a train of words.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Ming-Ching,
: > http://linux-ip.net/html/routing-selection.html#routing-selection-adv
:
: Ghee a simple illustration will explain it much better than : such a train of words.
Well...in that case...how do you feel about my pseudo-code locomotive?
You may well be right--I sometimes have a tendency to be verbose. I'll see what I can do to imagine an accurate and intuitive diagram.
Thanks for the feedback,
-Martin
Signature · 5 lines
Martin A. Brown --- SecurePipe, Inc. --- [email protected] _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 6 lines
You may well be right--I sometimes have a tendency to be verbose. I'll see what I can do to imagine an accurate and intuitive diagram.
Thanks for the feedback,
It's OK, i think I have figured out the answer. The system will pick smaller no, meaning smaller no, higher preference.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/