Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 439938

Summary: sys-apps/openrc-0.11.2 does not allow vlans and bridges to be used together
Product: Gentoo Hosted Projects Reporter: Matthew Thode ( prometheanfire ) <prometheanfire>
Component: netifrcAssignee: netifrc Team <netifrc>
Status: CONFIRMED ---    
Severity: major CC: axiator, rwhite
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: netifrc:DOC
Package list:
Runtime testing required: ---
Attachments: config that works

Description Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2012-10-28 05:43:46 UTC
this is the desired setup

eth1 -> br0 -> (vlans split out here) net.br1

eth1  is external physical interface
br0   is the bridged trunk (so I can attach tap devices and connect them to VMs as the trunk)
br0.2 is the bridge for vlan2 (which I can attach VMs to via tap interfaces)

I've noticed that I can't use this config (notice the vconfig_br0 line is commented out in this one, meaning the interface created by vconfig should be named br0.1).
This config also does not work because vconfig creates interfaces with a '.' meaning that 'config_br0.1' will not work.


bridge_br0="eth1"
config_br0="null"
brctl_br0="setfd 0 sethello 0 stp off"
rc_need_br0="net.eth1"
#vconfig_br0="set_name_type VLAN_PLUS_VID_NO_PAD"
vlans_br0="1"

config_br0.1="null"
rc_net_br0.1_need="net.br0"


This config (the line is uncommented meaning vconfig should create an interface named vlan1, this does not happen)
This config will not work because even with the vconfig line uncomented (the interface created should be named vlan1) the interface is still named br0.1


bridge_br0="eth1"
config_br0="null"
brctl_br0="setfd 0 sethello 0 stp off"
rc_need_br0="net.eth1"
vconfig_br0="set_name_type VLAN_PLUS_VID_NO_PAD"
vlans_br0="1"

config_vlan1="null"
rc_net_vlan1_need="net.br0"


the best solution to this would be to allow interface names with dots in them (as vconfig is set up to do by default).  A stopgap is to figure out why config2 does not work (why doesn't it create the vlan1 interface instead of br0.1)

Reproducible: Always
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2012-10-28 05:46:29 UTC
here is the output of trying to start net.br0.1, just to be clear about the variable assignment error.

/etc/init.d/../conf.d/net: line 23: config_br0.1=null: command not found
Comment 2 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2012-10-28 05:49:18 UTC
broken in stable as well btw :D
Comment 3 William Hubbs gentoo-dev 2012-10-28 19:16:12 UTC
@robbat2:
I spoke with Matthew about this bug. He sited the handbook [1] as why he
thought this configuration should work. This is definitely out of date,
and we keep the information up to date in
/usr/share/doc/openrc*/net.example.

What do you think we should do wrt this handbook section since we update
this ourselves in the OpenRC distribution? Should we write a man page
which we install for oldnet?

[1] http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=3
Comment 4 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2012-10-28 21:25:30 UTC
Created attachment 327642 [details]
config that works
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-10-30 17:25:42 UTC
The handbook explicitly covers that '.' in an interface name must be converted to an underscore.

"Important: For using some bridge setups, you may need to consult the variable name documentation."

And that's a link to this: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=2#variable_name

So, you didn't read the handbook enough.

That said, I think we need to get the manpages online, and link to them from the handbook, instead of maintaining two separate copies of the documentation.

I've CC'd the docs team for their input on handling this best.
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2012-10-30 17:56:57 UTC
read the page, but missed this line.

The downside of all this is that Gentoo uses bash variables for networking - and bash cannot use anything outside of English alpha-numerics. To get around this limitation we change every character that is not an English alpha-numeric into a _ character.


was searching for '.' my fault :D
Comment 7 William Hubbs gentoo-dev 2012-10-31 14:46:16 UTC
(In reply to comment #5)
> That said, I think we need to get the manpages online, and link to them from
> the handbook, instead of maintaining two separate copies of the
> documentation.
> 
> I've CC'd the docs team for their input on handling this best.

That still seems to be maintaining two separate copies of the documentation (the local man pages and the online ones).

What do people think about having the handbook refer people to the appropriate man pages on their systems?
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-10-31 17:32:11 UTC
(In reply to comment #7)
> What do people think about having the handbook refer people to the
> appropriate man pages on their systems?

I want an online copy of the manpage, built from the source tree, to be linked from the handbook, so it can be linked to directly online, and easily viewed from other systems.
Comment 9 Sven Vermeulen (RETIRED) gentoo-dev 2012-10-31 21:23:46 UTC
Whats the primary source of the manual page (assuming you don't write nroff directly)? Docbook?
Comment 11 William Hubbs gentoo-dev 2012-11-01 00:57:36 UTC
(In reply to comment #10)
> It's not manpage yet.
> It's just this file
> http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=blob;f=doc/net.
> example.Linux.in;h=70ae4e92d432766aecaec1d037a881cb146ba4c9;hb=HEAD

@robbat2:
Shouldn't we also include net.example.BSD.in and find the differences between them etc if we are going to come up with an oldnet guide?
Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-11-01 21:26:52 UTC
The BSD one was mostly a subset last I checked.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2012-11-06 14:51:31 UTC
*** Bug 441990 has been marked as a duplicate of this bug. ***
Comment 14 nm (RETIRED) gentoo-dev 2016-02-06 06:00:39 UTC
nothing to do with the docs-team, as it's about upstream changes for an obsolete version; removing us from CC.
Comment 15 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-02-06 06:08:55 UTC
I think this is fixed, aka config works?