Re: Using a switch fabric to emulate multiple NICs

Peter Stuge <[email protected]>
Newsgroups gmane.linux.drivers.vlan
Message-ID <[email protected]>
On Fri, Jul 22, 2005 at 10:25:02AM +0100, Alex Zeffertt wrote:
> > How about just using user-space tools to rename the interface? 
> 
> I thought about that.  My device driver could register eth0.  Then
> I could use iproute2 to rename eth0, and all the vlan devices
> eth0.10, eth0.11,..., eth0.19:

I suggest using udev instead, just add xx-ifnames.rules (where xx is
a two-digit number) to /etc/udev/rules.d (at least on Gentoo) with:

KERNEL="vlan*", SYSFS{address}="<mac_address_here>", NAME="eth0"
..
KERNEL="vlan*", SYSFS{address}="<mac_address_here>", NAME="eth9"


[..]
> This is an implementation detail that I want to hide and make it
> look like I've just got 10 NICs.

Perhaps you should work towards making this a separate kernel driver
but if possible of course also try to re-use the VLAN code without
having to duplicate it. That way you can handle ioctl()s on your own,
control interface naming, and even hide the "master" interface, which
probably is useless for applications anyway?

Just my EUR0.02. :)


//Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.