Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95121 - baselayout- 1.11.10-r7 doesn't support vlan type DEV_PLUS_VID_NO_PAD with config_ethx.x= syntax
Summary: baselayout- 1.11.10-r7 doesn't support vlan type DEV_PLUS_VID_NO_PAD with con...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High major
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-05 06:02 UTC by Jonathan Wheeler
Modified: 2005-06-28 03:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/conf.d/net example (net,17.67 KB, text/plain)
2005-06-05 06:05 UTC, Jonathan Wheeler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Wheeler 2005-06-05 06:02:45 UTC
baselayout-1.9.4-r6 (and presumably earlier) doesn't suppor using
DEV_PLUS_VID_NO_PAD Vlans, ie eth3.5, rather then the default of
VLAN_PLUS_VID_NO_PAD, ie vlan5.
I much prefer the DEV_PLUS method, as I can have overlapping vlans, and it's
just much clearer which interface is handling the vlan.
When I use the line:
config_eth3.5=("10.23.40.100 netmask 255.255.255.0") the following happens:
spike net.modules.d # /etc/init.d/net.eth3 restart
 * Caching service dependencies ...
/etc/conf.d/net: line 259: syntax error near unexpected token `"10.23.40.100
netmask 255.255.255.0"'

However if I use the old style of iface_eth3_5 - it works.
Which then lead me to try config_eth3_5=... which also works.

For an average user such as myself - it took me 4 hours to get to this point.
Could you please include this is the documentation (I never found any), and also
in the config examples in net.example.

Simply understanding that an underscore was needed to represent ethX.X as ethX_X
would have solved my problem instantly.

Reproducible: Always
Steps to Reproduce:
1. Setup your config with multiple vlans on an interface, Here is my conf.d/net
file:

vlans_eth0="10 20 50"
vlans_eth3="5 7"

vconfig_eth3=( "set_name_type DEV_PLUS_VID_NO_PAD" )

config_eth3.5=("10.23.40.100 netmask 255.255.255.0")
iface_eth3_7=("10.23.25.100 netmask 255.255.255.0")

2. You should see that eth3.5 doesn't work, but eth3.7 does
Actual Results:  
spike net.modules.d # /etc/init.d/net.eth3 restart
 * Caching service dependencies ...
/etc/conf.d/net: line 259: syntax error near unexpected token `"10.23.40.100
netmask 255.255.255.0"'
/etc/conf.d/net: line 259: `config_"eth3.5"=("10.23.40.100 netmask 255.255.255.0")'

Expected Results:  
Set the IP address on the eth3.5 interface
Comment 1 Jonathan Wheeler 2005-06-05 06:05:50 UTC
Created attachment 60646 [details]
/etc/conf.d/net example

You'll see a number of commented out lines as I've been fiddling trying to get
this working. The uncommented lines are of course the important ones showing
the nonworking config (with regard to eth3.5 at least. eth3.7 is working as per
the bug.)
Comment 2 SpanKY gentoo-dev 2005-06-05 21:11:20 UTC
use baselayout-1.11.x ... if that doesnt work properly, re-open with a patch for
that version
Comment 3 Jonathan Wheeler 2005-06-06 01:46:07 UTC
My Apologies,

I was in fact using 1.11.10-r7. 1.9.4-r6 was the unmasked version I first
started with.

When you say with a patch, are you suggesting that I have to fix this problem?
I'd love to, really, but this isn't within my abilities I'm sorry.
Comment 4 Jonathan Wheeler 2005-06-06 02:43:42 UTC
Results of further testing:

config_ethX_X Works.

config_ethX.X Generates errors on use, and doesn't work

iface_ethX_X doesn't generate an error, but isn't actually recognised as
configation for ethX_X, thus also doesn't work.

I would simply like an example of config_ethX_X to be added to the net.example
file to make this easily for other people to figure out.


Currently the example file from line 239 is:

# You can also configure the VLAN - see for vconfig man page for more details
#vconfig_eth0=( "set_name_type VLAN_PLUS_VID_NO_PAD" )
#vconfig_vlan1=( "set_flag 1" "set_egress_map 2 6" )
#config_vlan1=( "172.16.3.1 netmask 255.255.254.0" )
#config_vlan2=( "172.16.2.1 netmask 255.255.254.0" )

I would suggest ammending to:
# You can also configure the VLAN - see for vconfig man page for more details
#vconfig_eth0=( "set_name_type VLAN_PLUS_VID_NO_PAD" )
#vconfig_vlan1=( "set_flag 1" "set_egress_map 2 6" )
#config_vlan1=( "172.16.3.1 netmask 255.255.254.0" )
#config_vlan2=( "172.16.2.1 netmask 255.255.254.0" )
# Alternatively if your prefer DEV_PLUS_VID_NO_PAD style vlans (ie eth0.1)
#vconfig_eth0=( "set_name_type DEV_PLUS_VID_NO_PAD" )
#config_eth0_1=( "172.16.3.1 netmask 255.255.254.0" )
#config_eth0_2=( "172.16.2.1 netmask 255.255.254.0" )

Even better - if you can fix the script to allow ethX.X - this would make things
a little more logical for entering the configuration.

Thanks,
Jonathan.
Comment 5 Roy Marples (RETIRED) gentoo-dev 2005-06-06 05:35:51 UTC
There's a bit of documentation that I'm working on that explains how we name our
variables.

Basically any character that is not in the English alphabet or a numeric has to
be changed to a _
eth0.1 becomes eth0_1

This is a limitation with BASH and cannot be easily overcome - hence eth0.1 can
never work
Comment 6 Jonathan Wheeler 2005-06-06 05:43:14 UTC
(In reply to comment #5)
> There's a bit of documentation that I'm working on that explains how we name our
> variables.
> 
> Basically any character that is not in the English alphabet or a numeric has to
> be changed to a _
> eth0.1 becomes eth0_1
> 
> This is a limitation with BASH and cannot be easily overcome - hence eth0.1 can
> never work

Fair enough then :)
As I mentioned, just adding an example of this style of vlans will keep me
happy, and hopefully help someone else who hits the same problem.
You can close this if you like.

Cheers,
Jonathan.