View previous topic :: View next topic |
Author |
Message |
ruff n00b
Joined: 13 May 2005 Posts: 22
|
Posted: Tue Nov 22, 2005 11:47 am Post subject: a bug in /lib/rcscripts/net.modules.d/vlan. [SOLVED] |
|
|
i'm trying to setup vlans on my box
Code: |
vlans_eth1="10 12"
vconfig_eth1=( "set_name_type VLAN_PLUS_VID_NO_PAD" )
vconfig_vlan10=( "set_flag 1" )
vconfig_vlan12=( "set_flag 1" )
config_vlan10=( "xx.xx.xx.xx/24" )
config_vlan12=( "yy.yy.yy.yy/24" )
|
and '/etc/init.d/net.vlan10 start' fails with error
Code: |
* vconfig set_flag vlan10 1
* ERROR: trying to set flag on device -:vlan10:- error: Invalid argument
|
inestigating /lib/rcscripts/net.modules.d/vlan i've found that vconfig commands are executed in vlan_pre_start
function, but actual vlan interface is added in vlan_post_start.
so, how to specify vconfig option to vlan interface?
by the way - initially i was trying to use . name notation (ex. eth1.10, eth1_10 in conf.d/net, as in net.example)
starting /etc/init.d/net.eth1_10 fails with
Code: |
* vconfig set_flag eth1_10 1
* ERROR: trying to set flag on device -:eth1_10:- error: Invalid argument
|
so, underscore is not translated to dot notation.
/etc/init.d/net.eth1.10 fails as it is trying to configure interface 10, so it takes trailing part after last dot.
Last edited by ruff on Tue Nov 22, 2005 3:13 pm; edited 3 times in total |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
ruff n00b
Joined: 13 May 2005 Posts: 22
|
Posted: Tue Nov 22, 2005 12:09 pm Post subject: |
|
|
ok
so should i use manual configuration until baselayout update? |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
ruff n00b
Joined: 13 May 2005 Posts: 22
|
Posted: Tue Nov 22, 2005 12:32 pm Post subject: |
|
|
thanx, will wait |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Tue Nov 22, 2005 1:30 pm Post subject: Re: a bug in /lib/rcscripts/net.modules.d/vlan. Will be [SOL |
|
|
ruff wrote: |
by the way - initially i was trying to use . name notation (ex. eth1.10, eth1_10 in conf.d/net, as in net.example)
starting /etc/init.d/net.eth1_10 fails with
Code: |
* vconfig set_flag eth1_10 1
* ERROR: trying to set flag on device -:eth1_10:- error: Invalid argument
|
|
Yes, that won't work because you don't create init.d scripts for your vlan interfaces (unlike other interfaces types where you do).
And if you did, it would be net.eth1.10 as we only use the _ translation for variable names _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
ruff n00b
Joined: 13 May 2005 Posts: 22
|
Posted: Tue Nov 22, 2005 2:17 pm Post subject: Re: a bug in /lib/rcscripts/net.modules.d/vlan. Will be [SOL |
|
|
UberLord wrote: | Yes, that won't work because you don't create init.d scripts for your vlan interfaces (unlike other interfaces types where you do).
And if you did, it would be net.eth1.10 as we only use the _ translation for variable names |
But i did! And it tells me
Code: |
root@relay init.d # /etc/init.d/net.eth1.10 start
* Caching service dependencies ... [ ok ]
* Starting 10
* Cannot default to dhcp as there is no dhcp module loaded
* No configuration for 10 [ !! ]
root@relay init.d #
|
is i said befor - it seems only trailing part, after last period, treated as interface name |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
ruff n00b
Joined: 13 May 2005 Posts: 22
|
Posted: Tue Nov 22, 2005 2:46 pm Post subject: |
|
|
ahh... how? what init scripts? i've made symlink to net.lo with name net.eth1.10, i havn't found anything else in net.example/handbook concirning vlans. Where can i find info about it? |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
ruff n00b
Joined: 13 May 2005 Posts: 22
|
Posted: Tue Nov 22, 2005 2:57 pm Post subject: |
|
|
aha, got it.
but not good %)
Code: |
root@relay init.d # /etc/init.d/net.eth1 start
* Caching service dependencies ... [ ok ]
* Starting eth1
* Cannot default to dhcp as there is no dhcp module loaded
* No configuration for eth1 [ !! ]
root@relay init.d #
|
btw - i have not smoked already about a month - filling good %) |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
ruff n00b
Joined: 13 May 2005 Posts: 22
|
Posted: Tue Nov 22, 2005 3:12 pm Post subject: |
|
|
Wow! It works %)
Code: |
root@relay conf.d # /etc/init.d/net.eth1 start
* Starting eth1
* Bringing up eth1 [ ok ]
* Adding VLAN 10 to eth1 [ ok ]
* Bringing up eth1.10
* xxx.xxx.xxx.xxx [ ok ]
* Adding VLAN 12 to eth1 [ ok ]
* Bringing up eth1.12
* yyy.yyy.yyy.yyy [ ok ]
root@relay conf.d #
|
Thanx, so it would be nice to add this to net.examlpe i think |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
ruff n00b
Joined: 13 May 2005 Posts: 22
|
Posted: Tue Nov 22, 2005 3:34 pm Post subject: |
|
|
i think
Code: |
240a241,243
> # Tell init script not to handle with interface configuration
> #config_eth0=( "null" )
>
251a255,256
> # After all make init script for real (physical) interface.
>
|
should be sufficient. As i know, when using vlans, ethernet interface should be only in up state,
and without any ipaddress assigned, so config_<dev>=( "null" ) might be default for this case. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
|