* [LARTC] Ingress qdisc bypassed on SNAT'ed traffic?
@ 2006-11-06 3:46 EKC
2006-11-06 4:17 ` Mohan Sundaram
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: EKC @ 2006-11-06 3:46 UTC (permalink / raw)
To: lartc
Hello,
I am using the following iptables POSTROUTING rule to NAT some RFC
1918 addresses:
iptables -t nat -A POSTROUTING -s 192.168.19.23 !
192.168.0.0/255.255.0.0 -p tcp --dport 80 -j SNAT --to-source
10.32.4.2
(I am using SNAT instead of MASQUERADE for performance reasons).
I have several addresses on the 192.168.0.0/16 subnet that I am
SNAT'ing similarly.
Problem is, 'tc -s filter show parent ffff: dev bond0' is reporting
that the ingress qdisc rule's for each of these RFC1918 addresses are
being bypassed:
tc qdisc add dev bond0 ingress
tc filter add dev bond0 parent ffff: protocol ip prio 10 u32 match ip
dst 192.168.19.23/32 flowid 1:1 action police rate 100kbps burst 200kb
drop
However, the same lartc ingress filter rules work fine when run on the
NAT gateway address (10.32.4.2).
I suppose this means that the ingress filter is being run too early in
the PREROUTING chain to catch the NAT'ed destination address. Is there
a patch to change this behaviour?
I've also tried using connmark to no avail.
I would rather avoid using IMQ since my ingress QOS needs are pretty simple.
Any suggestions?
Thanks!
Eser Chamoglu
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] Ingress qdisc bypassed on SNAT'ed traffic?
2006-11-06 3:46 [LARTC] Ingress qdisc bypassed on SNAT'ed traffic? EKC
@ 2006-11-06 4:17 ` Mohan Sundaram
2006-11-06 4:24 ` EKC
2006-11-11 12:23 ` Andy Furniss
2 siblings, 0 replies; 4+ messages in thread
From: Mohan Sundaram @ 2006-11-06 4:17 UTC (permalink / raw)
To: lartc
EKC wrote:
> Hello,
> However, the same lartc ingress filter rules work fine when run on the
> NAT gateway address (10.32.4.2).
The QoS processing is done just before the device queue for egress or
immediately after ingress from the device. Thus using the 192.168.x.x
addresses for tc filters will not work. Using the gateway address works
as that is the IP on the incoming packet's header.
>
> I suppose this means that the ingress filter is being run too early in
> the PREROUTING chain to catch the NAT'ed destination address. Is there
> a patch to change this behaviour?
I've not seen one.
>
> I've also tried using connmark to no avail.
Ingress QoS works much before packet hits all this stuff.
>
> I would rather avoid using IMQ since my ingress QOS needs are pretty
> simple.
AFAIK, there is no other choice/way here.
>
> Any suggestions?
One wa of doing this is to use one NAT IP per subnet and shape based on
that NAT IP for ingress. However, this assumes you have as many
addresses on the gateway as the subnet. I'm using you do as the NAT'ted
IP is also a RFC1918 address. That leads to a more basic question - why
NAT when both are RFC1918 addresses?
Mohan
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] Ingress qdisc bypassed on SNAT'ed traffic?
2006-11-06 3:46 [LARTC] Ingress qdisc bypassed on SNAT'ed traffic? EKC
2006-11-06 4:17 ` Mohan Sundaram
@ 2006-11-06 4:24 ` EKC
2006-11-11 12:23 ` Andy Furniss
2 siblings, 0 replies; 4+ messages in thread
From: EKC @ 2006-11-06 4:24 UTC (permalink / raw)
To: lartc
Unfortunately, that NAT gateway address should have been a routable
address (I'm debugging this in vmware at the moment).
Considering that, it looks like I'm going to have to play around with IMQ.
On 11/5/06, Mohan Sundaram <mohan.tux@gmail.com> wrote:
> EKC wrote:
> > Hello,
>
> > However, the same lartc ingress filter rules work fine when run on the
> > NAT gateway address (10.32.4.2).
> The QoS processing is done just before the device queue for egress or
> immediately after ingress from the device. Thus using the 192.168.x.x
> addresses for tc filters will not work. Using the gateway address works
> as that is the IP on the incoming packet's header.
> >
> > I suppose this means that the ingress filter is being run too early in
> > the PREROUTING chain to catch the NAT'ed destination address. Is there
> > a patch to change this behaviour?
> I've not seen one.
> >
> > I've also tried using connmark to no avail.
> Ingress QoS works much before packet hits all this stuff.
> >
> > I would rather avoid using IMQ since my ingress QOS needs are pretty
> > simple.
> AFAIK, there is no other choice/way here.
> >
> > Any suggestions?
> One wa of doing this is to use one NAT IP per subnet and shape based on
> that NAT IP for ingress. However, this assumes you have as many
> addresses on the gateway as the subnet. I'm using you do as the NAT'ted
> IP is also a RFC1918 address. That leads to a more basic question - why
> NAT when both are RFC1918 addresses?
>
> Mohan
>
>
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] Ingress qdisc bypassed on SNAT'ed traffic?
2006-11-06 3:46 [LARTC] Ingress qdisc bypassed on SNAT'ed traffic? EKC
2006-11-06 4:17 ` Mohan Sundaram
2006-11-06 4:24 ` EKC
@ 2006-11-11 12:23 ` Andy Furniss
2 siblings, 0 replies; 4+ messages in thread
From: Andy Furniss @ 2006-11-11 12:23 UTC (permalink / raw)
To: lartc
EKC wrote:
> Unfortunately, that NAT gateway address should have been a routable
> address (I'm debugging this in vmware at the moment).
>
> Considering that, it looks like I'm going to have to play around with IMQ.
If you say no to packet action in kernel config then you get to choose
the old policer - which does hook after deNAT.
Andy.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-11 12:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-06 3:46 [LARTC] Ingress qdisc bypassed on SNAT'ed traffic? EKC
2006-11-06 4:17 ` Mohan Sundaram
2006-11-06 4:24 ` EKC
2006-11-11 12:23 ` Andy Furniss
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.