Date: Sun, 18 Apr 2004 01:02:55 -0400 From: "Adam C. Migus" <adam@migus.org> To: Brooks Davis <brooks@one-eyed-alien.net> Cc: current@freebsd.org Subject: Re: VLAN support in rcNG [PATCH] Message-ID: <1082264575.40820bff559cd@webservices.migus.org> In-Reply-To: <20040418035435.GF14645@Odin.AC.HMC.Edu> References: <1082233506.408192a2c476a@webservices.migus.org> <20040417235302.GC3534@Odin.AC.HMC.Edu> <20040417201913.P34536@sasami.jurai.net> <20040418005436.GC14645@Odin.AC.HMC.Edu> <1082258483.4081f43366454@webservices.migus.org> <20040418035435.GF14645@Odin.AC.HMC.Edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Brooks Davis <brooks@one-eyed-alien.net>: > On Sat, Apr 17, 2004 at 11:21:23PM -0400, Adam C. Migus wrote: > > Quoting Brooks Davis <brooks@one-eyed-alien.net>: > > > > > On Sat, Apr 17, 2004 at 08:20:17PM -0400, Matthew N. Dodd wrote: > > > > On Sat, 17 Apr 2004, Brooks Davis wrote: > > > > > It works by doing a major overhaul of the device cloning > support > > > so you > > > > > can create interfaces of the form <etherif>.<vlantag> and get > an > > > vlan > > > > > interface with the appropriate parent and tag. > > > > > > > > Please make this behavior optional. > > > > > > The entire patch has exactly one change which is visiable to the > > > userland unless the user changes their behavior. That change is > > > that > > > when you do "ifconfig stf create" ifconfig does not output > "stf0" > > > and > > > the interface created is named "sft" instead of "stf0". This is > a > > > result of a minor change that allows you to create "6to4" a more > > > aptly named interface. This change is mostly an example of how > to > > > write > > > new style interface cloners that's easier to understand then the > > > vlan > > > version which was the motivation for this overhaul. > > > > > > The vlan change allows vlan interfaces to work exactly like they > did > > > before. It just adds some sugar so that the following sets of > > > commands > > > are equivalent: > > > > > > ifconfig xl0.2 > > > > > > vlanif=`ifconfig vlan create` > > > ifconfig $vlanif name xl0.2 > > > ifconfig xl0.2 vlandev xl0 vlantag 2 > > > > > > -- Brooks > > > > > > -- > > > Any statement of the form "X is the one, true Y" is FALSE. > > > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 > 1AD4 > > > > > > > So it sounds like I say: > > > > cloned_interfaces="xl0.2" > > > > and get myself the interface I want, on the right vlan but what > happens > > when I want to say: > > > > ifconfig_xl0.2="DHCP" > > > > That `.' is going to cause some problems isn't it? > > Yah, that's a definite issue. I could add another seperator fairly > easy, care to suggest one? > > > I asked earlier for reasons like this and compatability in general > if > > there would be a way to create vlan interfaces named "vlan2" for > > example. > > > > The trouble with this naming convention is it doesn't imply it's > > physical device in it's name but the name doesn't contain a `.' > which > > in things like sh(1) can cause problems. > > > > My patch may be a little more cumbersome, requiring explicit naming > of > > the device but it does eliminiate ambiquity and permit that naming > > scheme with the ability to do DHCP and not trip over some other > things > > in rcNG. > > I don't have any strong objections to your patch. > > -- Brooks > > -- > Any statement of the form "X is the one, true Y" is FALSE. > PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 > The software that I've seen that accepts `<interface>.<tag>' but can't deal with it internally usually uses an `_' and it's pretty standard however that's not going to work too well here either without complicating parsing inside rcNG which is one of the reasons I avoided the whole issue by going with the `vlan<tag>' naming scheme on the my other boxes and specifying the physical device. Having said that and glancing at my keyboard I'm not sure I can think of other delimiter that's not going to offend someone, if not sh(1). So I guess in summary I'm suggesting if the complexity of dealing with: ifconfig_xl0_2="DHCP" # -> ifconfig xl0.2 vlandev xl0 vlantag 2 in rcNG is worth it then I think that's the only way this type naming scheme is going to work. I'd be happy to write the parsing for it if you like. But also, given there's that other defacto-standard naming scheme of `vlan<tag>' it would be nice to support it and the only way to do it, since specifiying the physical device explicitly is required, is something like my patch, on the surface. I couldn't comment much more without seeing your code which I'd like to do if possible but all the same I'm guessing that it would be fairly trivial to allow: cloned_interfaces="vlan2" # -> ifconfig <ifn>.2 vlandev <ifn> vlantag 2 cloned_interface_vlan2_dev="xl0" # -> <ifn> required above Hmmm, this thread is making me wonder if it's time to think about some kind of more functional, general abstraction for cloned interfaces in rcNG which allows all the fun things people would want to do with them, like DHCP just for starters, now. After-all whether or not you do want to honor the `vlan<tag>' naming scheme this already looks like it has to potential to get a little mucky too me... :-) -- Adam C. Migus -- http://people.migus.org/~adam/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1082264575.40820bff559cd>