netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: hadi@cyberus.ca
Cc: "'netdev@oss.sgi.com'" <netdev@oss.sgi.com>
Subject: Re: RFC:  Redirect-Device
Date: Thu, 31 Mar 2005 14:22:11 -0800	[thread overview]
Message-ID: <424C7813.4000101@candelatech.com> (raw)
In-Reply-To: <1112306031.1073.109.camel@jzny.localdomain>

jamal wrote:
> On Thu, 2005-03-31 at 16:26, Ben Greear wrote:

> You can configure actions using sockets (netlink sockets).
> Thats what tc does for example. As a matter of fact you already have a
> "language" - its what tc is, sample BNF grammar of the language:
> 
> ---
> [root@jzny root]# tc
> Usage: tc [ OPTIONS ] OBJECT { COMMAND | help }
> where  OBJECT := { qdisc | class | filter }
>        OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -b[atch] file
> }

My personal opinion is that netlink sockets are a pain in the ass to deal
with, and there is no way I want to try to programatically parse the tc
input or output.

And probably not so easy to manipulate from a kernel module.

And BNF cannot be more powerful than a c/c++ program with a byte-buffer
representing the entire ethernet frame.

>>I can also create a nice little set of virtual interfaces
>>and connections  rdd0 <-> rdd1  |bridge|  rdd2 <-> rdd3.  I can then send traffic
>>from rdd0 to rdd3 across the bridge, etc.  Now, this last bit is fairly
>>contrived, but it happens to help me with some testing on my laptop which
>>lacks a lot of external ethernet interfaces :)
> 
> So your goal is to define a path that the packet takes inside the kernel
> across multiple devices? i.e some form of loose source routing?

Well, I have already hacked the kernel to allow sending traffic from eth0 to
eth3 across a loopback cable.  In my example above, you can think of
rdd0 - rdd3 as eth0 - eth3:  eth0 has an IP 10.1.1.2, connected to
eth1 with a loopback cable.  eth1 has NO ip and is bridged to eth2 in
software.  eth2 has NO ip and is connected via loopback cable to eth3.
eth3 has an IP 10.1.1.3.  As far as the networking protocol stacks are
concerned, eth0 is connected via loopback cable to eth3.

My primary goal is to enable this bridge to not require so many physical
ethernet ports.  This 'bridge' is actually my network emulator that I sell
for a living, so if I can cram twice as much functionality into the same number of
physical interfaces, I stand to gain.  Since I remove the IP addresses from the bridged interfaces,
I can do the bridging without hacking another hook into the dev.c pkt receive
routines, and since my redirect devices are net_devices sending & receiving
ethernet packets, they just work with my existing code, ethereal, and every
other tool I've tried.  Heck, I could probably run 802.1Q VLANs across them
as well if I wanted :)

>>To be honest, I didn't dig into the actions.  It would be much harder for
>>me to manage things in that manner, whereas virtual interfaces just work
>>for me.
> 
> 
> Understood - just not empathized ;->

Fair enough :)

Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2005-03-31 22:22 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-31 20:41 RFC: Redirect-Device Ben Greear
2005-03-31 21:02 ` David S. Miller
2005-03-31 21:05 ` Stephen Hemminger
2005-03-31 21:45   ` Ben Greear
2005-03-31 21:52     ` David S. Miller
2005-03-31 22:04       ` Ben Greear
2005-03-31 22:21         ` David S. Miller
2005-03-31 22:05       ` Stephen Hemminger
2005-03-31 22:26         ` Ben Greear
2005-03-31 22:33           ` David S. Miller
2005-03-31 22:42             ` Ben Greear
2005-03-31 22:43               ` David S. Miller
2005-03-31 21:13 ` jamal
2005-03-31 21:26   ` Ben Greear
2005-03-31 21:53     ` jamal
2005-03-31 22:22       ` Ben Greear [this message]
2005-03-31 22:35         ` David S. Miller
2005-03-31 22:54           ` Ben Greear
2005-03-31 23:26             ` jamal
2005-03-31 23:56               ` Ben Greear
2005-04-01  0:53                 ` jamal
2005-04-01  9:01                 ` bert hubert
2005-04-01 16:58                   ` Ben Greear
2005-03-31 22:46         ` Thomas Graf
2005-03-31 23:00           ` Ben Greear
2005-03-31 23:20         ` jamal
2005-03-31 23:35           ` Ben Greear
2005-03-31 23:46             ` jamal
2005-04-02  8:41   ` Meelis Roos
2005-04-02 21:08     ` jamal
2005-04-01  5:03 ` Pekka Savola
2005-04-01  5:27   ` Ben Greear
2005-04-01  9:28     ` Pekka Savola
2005-04-01 16:29       ` Ben Greear

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=424C7813.4000101@candelatech.com \
    --to=greearb@candelatech.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 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).