All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rabbitson <rabbit@rabbit.us>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Re: multiple routing tables for internal router programs
Date: Fri, 15 Jun 2007 06:29:43 +0000	[thread overview]
Message-ID: <467231D7.1070105@rabbit.us> (raw)
In-Reply-To: <Pine.LNX.4.64.0706111505070.3751@tigger.tntechs.com>

Salim S I wrote:
> 
>>> NATing is done with MASQUERADE, not SNAT, I use another MARK for it,
> but
>>> in essence it is
>>> -o eth2 -j MASQUEARDE
>>> -o eth3 -j MASQUEARDE
>>>
>>> In addition, there are several other MARKs for policy routing. They
> have
>>> their own routing tables also. But at present, they are all empty.
>>>
>> This is the part I definitely do not like. First of all - wht
>> SNAT/MASQUERADE _all_ traffic? You should do this for forwarder
> traffic
>> only. Like so:
> 
> Yes, in fact, this is what I do. I mentioned I use MARK for
> MASQUERADing, but forgot to elaborate. That particular MARK is set for
> forwarded packets only.
> 
> 
>> Also you mention that there are "other marks" , which means that you
>> might very well be overwriting marks as you go. A packet/connection
> can
>> have only _one_ mark value at any time, no more no less (a 0x0 is
> still
>> a mark)
> 
> 
> I use --or-mark in iptables, so that I can use bitwise masks. The 'ip'
> tool supports bit masks too.
> 

Well then you are certainly ahead of the game. Still I would suggest to 
avoid the complexity of bit mask marks - it is rather error prone and is 
pretty hard to maintain, while the same result can usually be achieved 
by other means (like in my SNAT example). As far as your original 
problem goes - it seems like a mark is getting eaten away or is not set 
somewhere in the first place. I have not had any problems like the ones 
you describe.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

  parent reply	other threads:[~2007-06-15  6:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-11 19:06 [LARTC] Re: multiple routing tables for internal router programs Tom Diehl
2007-06-11 19:23 ` Javier Charne
2007-06-12  7:59 ` Andrea
2007-06-12  8:09 ` Salim S I
2007-06-12  9:01 ` Peter Rabbitson
2007-06-12  9:15 ` Andrea
2007-06-12  9:29 ` Peter Rabbitson
2007-06-12  9:49 ` Salim S I
2007-06-12 10:02 ` Peter Rabbitson
2007-06-12 10:10 ` Andrea
2007-06-12 10:20 ` Salim S I
2007-06-12 11:23 ` Peter Rabbitson
2007-06-13  4:08 ` Salim S I
2007-06-14  3:50 ` Salim S I
2007-06-14  4:23 ` Alex Samad
2007-06-14  7:26 ` Peter Rabbitson
2007-06-14 10:34 ` Salim S I
2007-06-15  3:26 ` Salim S I
2007-06-15  6:00 ` Peter Rabbitson
2007-06-15  6:01 ` Peter Rabbitson
2007-06-15  6:21 ` Salim S I
2007-06-15  6:29 ` Peter Rabbitson [this message]
2007-06-15  9:36 ` Salim S I

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=467231D7.1070105@rabbit.us \
    --to=rabbit@rabbit.us \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.