From: jamal <hadi@cyberus.ca>
To: Julian Anastasov <ja@ssi.bg>
Cc: Donald Becker <becker@scyld.com>,
Ben Greear <greearb@candelatech.com>,
Jeff Garzik <jgarzik@pobox.com>,
Alexandre Cassen <Alexandre.Cassen@wanadoo.fr>,
"" <netdev@oss.sgi.com>
Subject: Re: SIOCADDMULTI for unicast broken
Date: Mon, 6 Jan 2003 08:44:30 -0500 (EST) [thread overview]
Message-ID: <20030105213057.T55522@shell.cyberus.ca> (raw)
In-Reply-To: <Pine.LNX.4.44.0301051242180.1081-100000@u.domain.uli>
On Sun, 5 Jan 2003, Julian Anastasov wrote:
>
> Hello,
>
> On Sat, 4 Jan 2003, jamal wrote:
>
> > > You can do it with arptables (still not sure how) or with
> >
> > I havent seen user-space arptables around.
>
> yes, that is what I mean
>
> > > http://www.ssi.bg/~ja/#iparp
> >
> > I like this concept. This + the patch i posted should resolve the problem
> > of getting multiple VRIDs on a single interface.
> > [Although you could do it in a lot less code, maybe 50%, using
> > some of the tc filter extensions i am working on; also a lot less code
> > than arptables]
>
> I hope there will be support for altering any bit
> in the skb->head - skb->end area, even by using negative offsets
> based on skb->nh.raw - this is needed for eth header manipulations.
> May be sort of: ... alter andmask 0xFF00 xormask 0x0023 at -4 ...
> i.e. syntax similar to ipchains TOS and u32 match.
I wanted to use u32 as the basis; which means u32 type matching is needed.
then use vi/sed type substitution s/OL/V where:
O = offset (from skb->data, could be -ve),
L = length (cant go beyond head or end),
V is a static value configured (its size cant exceed L). V can also
be computed off something example the data at offset O. I am trying to
keep away from situations where L is larger or smaller than sizeof V
so theres no mucking with any of the skb pointers ore reallocing etc. In
the next iteration things could change. Note i havent written this but
will in the near future (so anyone is welcome to hack on it)
I didnt understand your andmask and xormask idea...
>
> As for VRRP I see it in this way. Note that I'm not a VRRP
> fan, I prefer the ARP methods for takeover, Of course, sometimes they
> can not work due to the bad non-Linux ARP stack implementations.
> As Alexandre noted once, the gratuitous ARP should not be slower
> than VRRP talks. Only that there are bad ARP cache implementations.
>
yes, this is a big problem. But also in some complex multi-vlan switches
grat arps are not sufficient.
> 1. if remote hosts asks for lladdr of VRIP tc should modify our
> ARP reply: the SMAC in the eth header (using negative offset) and the
> SMAC in the ARP header. This is analog to:
> ip arp add to VRIP llsrc VMAC
>
I really like the brevity of the above;
equivalent for me would be (my longterm plan to move ingress to below
IP has finaly found an excuse)
tc filter add <DEV x> parent x:y protocol arp prio 10 u32 flowid x:z \
match sip VRIP action edit s/smac/VMAC action edit s/SMAC/VMAC
u32 needs to be taught about ARP so it can understand different
ARP header bits like sip (shouldnt be that difficult)
>
> 2. if our IP stack sends packet with saddr=VRIP that leads to ARP
> probe sent from our host then we should modify the packet in
> the same way as (1). This is analog to:
> ip arp add table output from VRIP llsrc VMAC
>
Dont see the difference between 1) and 2)
> 3. Replace the src MAC with proper VMAC for all IP packets with
> saddr=VRIP. This can be a neighbouring code job but difficult to
> implement there.
tc filter add <DEV x> parent x:y protocol ip prio 10 u32 flowid x:z \
match ip src VRIP action edit s/smac/VMAC
Did i understand this correctly?
>
> 4. Not last: NIC should accept traffic for all VMACs (promisc
> when attached to switched hubs is enough?) and eth_type_trans to maintain
> list of MAC aliases. I'm not sure that such list/hashtable with MACs
> should be attached per device - may be VRRP needs to announce one
> MAC through different interfaces? Also think for the Bridging
> code which calls eth_type_trans too.
I plan to move ingress to below IP just before the bridging and tap
code; experiments shows this works just fine.
So all the filters + edits going there should work fine. Thoughts?
cheers,
jamal
next prev parent reply other threads:[~2003-01-06 13:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-03 21:46 SIOCADDMULTI for unicast broken jamal
2003-01-04 0:07 ` Donald Becker
2003-01-04 1:18 ` Jeff Garzik
2003-01-04 1:39 ` Donald Becker
2003-01-04 1:45 ` Ben Greear
2003-01-04 1:52 ` Jeff Garzik
2003-01-06 15:00 ` Krzysztof Halasa
2003-01-04 2:18 ` Donald Becker
2003-01-04 4:11 ` jamal
2003-01-04 6:33 ` Donald Becker
2003-01-04 17:41 ` jamal
2003-01-04 18:24 ` Donald Becker
2003-01-04 18:55 ` jamal
2003-01-04 18:36 ` Julian Anastasov
2003-01-04 19:04 ` jamal
2003-01-05 11:45 ` Julian Anastasov
2003-01-06 13:44 ` jamal [this message]
2003-01-06 15:00 ` Julian Anastasov
2003-01-06 17:23 ` jamal
2003-01-04 7:32 ` Jeff Garzik
2003-01-04 17:43 ` 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=20030105213057.T55522@shell.cyberus.ca \
--to=hadi@cyberus.ca \
--cc=Alexandre.Cassen@wanadoo.fr \
--cc=becker@scyld.com \
--cc=greearb@candelatech.com \
--cc=ja@ssi.bg \
--cc=jgarzik@pobox.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).