LARTC
[Top] [All Lists]

Example on using fwmark with masks. Please help!!

To: lartc@mailman.ds9a.nl, netfilter@lists.netfilter.org
Subject: Example on using fwmark with masks. Please help!!
From: "ArcosCom Linux User" <linux@arcoscom.com>
Date: Fri, 12 Jan 2007 21:26:30 +0100 (CET)
Cc:
Delivered-to: sp-com-lists@consult.net
Delivered-to: netfilter-list1@securepoint.com
Importance: Normal
List-archive: </pipermail/netfilter>
List-help: <mailto:netfilter-request@lists.netfilter.org?subject=help>
List-id: General discussion and user questions <netfilter.lists.netfilter.org>
List-post: <mailto:netfilter@lists.netfilter.org>
List-subscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=subscribe>
List-unsubscribe: <https://lists.netfilter.org/mailman/listinfo/netfilter>, <mailto:netfilter-request@lists.netfilter.org?subject=unsubscribe>
Reply-to: linux@arcoscom.com
Sender: netfilter-bounces@lists.netfilter.org
User-agent: SquirrelMail/1.4.8-1.3.3
Hi,
   could anyone provides any example about the use of ip route command to
force the use of one route using masks in the mark?

The configuration is:
   1 LAN (zlan0) iface
   N WAN (wan0 ... wanN) ifaces with static IPs and load balanced.
   iptables 1.3.7
   kernel 2.6.19.2
   iproute 2.6.19

I'm yet setting marks into packets for QoS and its working, I now want to
set some bits (OR) at the end of the mark.

For example, I want to use 0x8000 to add another mark to the packet for
routing. The packet is market yet with a QoS mark (--set-mark), 0x5 (for
example).

I need:
   1) The packet been marked with 0x8000 OR 0x0005 = 0x8005
   2) Route the packet with 0x8005 AND 0x8000 = 0x8000 over wan0 (for
example)
   3) Classify the packet with 0x8005 AND 0x0005 into wan0 1:4 class (for
example)

I know how to do this not having sense about MASKs, but ... Could anybody
put here how to do it with them?

Another question: What is the length of the mask? 16bit? 32bit?

Thanks!!






<Prev in Thread] Current Thread [Next in Thread>