From: Andy Furniss <andy.furniss@dsl.pipex.com>
To: hadi@cyberus.ca
Cc: netdev@oss.sgi.com
Subject: Re: IMQ / new Dummy device post.
Date: Fri, 16 Apr 2004 20:35:11 +0100 [thread overview]
Message-ID: <4080356F.4020609@dsl.pipex.com> (raw)
In-Reply-To: <1082087553.1035.287.camel@jzny.localdomain>
jamal wrote:
> On Thu, 2004-04-15 at 15:35, Andy Furniss wrote:
>
>>jamal wrote:
>
>
>>What I want to know is what state IP packets will be in if I
>
>
> Just to be sure, this is not specific just to IP; it could be ARP, IPX,
> v6 etc.
>
>
>>
>>filter/shape with dummy - In my case I would need them to have been
>>demasqued so I can tell the difference between local and to be forwarded
>>ingress traffic.
>
>
> The packets are grabbed before NAT on the way in and after NAT on the
> way out.
This is what I wanted to know. Is it possible to make an option to get
them after NAT in and pre NAT out?
> Coming from non-local machines before NAT you can redirect to a dummy
> device; and also be able to redirect on their way back to the non-local;
> to use the example i posted earlier:
>
> ----
> $TC qdisc add dev dummy0 root handle 1: prio
> $TC qdisc add dev dummy0 parent 1:1 handle 10: sfq
> $TC qdisc add dev dummy0 parent 1:2 handle 20: tbf rate 20kbit buffer
> 1600 limit
> 3000
> $TC qdisc add dev dummy0 parent 1:3 handle 30:
> sfq
>
> $TC filter add dev dummy0 protocol ip pref 1 parent 1: handle 1 fw
> classid 1:1
> $TC filter add dev dummy0 protocol ip pref 2 parent 1: handle 2 fw
> classid 1:2
>
> ifconfig dummy0 up
>
> #deal with ingress of eth0 first
> $TC qdisc add dev eth0 ingress
>
> # redirect all IP packets arriving from 10.0.0.21/24 in eth0 to dummy0
> # use mark 1 --> puts them onto class 1:1 of dummy
> #
> $TC filter add dev eth0 parent ffff: protocol ip prio 10 u32 \
> match ip src 10.0.0.21/24 flowid 1:1 \
> action ipt -j MARK --set-mark 1 \
> action mirred egress redirect dev dummy0
>
> #deal with egress of eth0
> $TC qdisc add dev eth0 root handle 1: prio
>
> # redirect all IP packets going to 10.0.0.21/24 in eth0 to dummy0
> # use mark 2 --> puts them onto class 1:2 of dummy
> #
> $TC filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
> match ip dst 10.0.0.21/24 flowid 1:1 \
> action ipt -j MARK --set-mark 2 \
> action mirred egress redirect dev dummy0
> -----
>
> I havent tested the above but it should work (sans syntax bugs). If it
> doesnt then we have a bug that needs fixing.
I don't think this applies to my setup Masqerading many local onto one
real address.
>
>
>>Ie. where on the KPTD would dummy be - IMQ appears twice and by using
>>the IMQ nat patch I can use the prerouting one to filter/shape the
>>packets after they are denatted.
>>
>
>
> does the above help?
Yes - Thanks.
Andy.
>
> cheers,
> jamal
>
>
next prev parent reply other threads:[~2004-04-16 19:35 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-15 9:42 IMQ / new Dummy device post Andy Furniss
2004-04-15 12:15 ` jamal
2004-04-15 19:35 ` Andy Furniss
2004-04-16 3:52 ` jamal
2004-04-16 19:35 ` Andy Furniss [this message]
[not found] ` <1082145341.1026.125.camel@jzny.localdomain>
2004-04-17 10:39 ` Andy Furniss
2004-04-17 12:09 ` jamal
2004-04-17 21:56 ` Andy Furniss
2004-04-18 14:28 ` jamal
2004-04-18 16:35 ` Andy Furniss
2004-04-18 20:34 ` Andy Furniss
2004-04-18 21:07 ` jamal
2004-04-18 21:31 ` Andy Furniss
2004-04-18 21:45 ` Andy Furniss
2004-04-18 20:53 ` jamal
2004-04-18 21:23 ` Martin Josefsson
2004-04-18 21:58 ` Andy Furniss
2004-04-19 8:14 ` Martin Josefsson
2004-04-19 12:33 ` syrius.ml
-- strict thread matches above, loose matches on Subject: below --
2004-04-19 14:22 syrius.ml
2004-04-20 2:15 ` jamal
2004-04-21 1:43 ` syrius.ml
2004-04-21 12:49 ` syrius.ml
2004-04-21 20:19 ` syrius.ml
2004-04-22 13:16 ` jamal
2004-04-22 17:43 ` syrius.ml
2004-04-23 11:29 ` jamal
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=4080356F.4020609@dsl.pipex.com \
--to=andy.furniss@dsl.pipex.com \
--cc=hadi@cyberus.ca \
--cc=netdev@oss.sgi.com \
/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.