Solved Renaming cloned interfaces in rc.conf + bridging

Hi all,
I am wondering if it is possible to reliably rename cloned interfaces and bridge them in rc.conf?
I'd like to create a bridge, change its name, create one or more epairs, rename them and add them to the bridge.
The problem is, within the bridge ifconfig command I don't know if the epairs have the names before or after they have been renamed. How do I know in which order the ifconfig commands are going to be executed?

For example, should I add to the bridge the names before renaming:
Bash:
cloned_interfaces="bridge0 epair0"
ifconfig_bridge0="name br.001 addm epair0a"
ifconfig_epair0a="name vx.001.001"
ifconfig_epair0b="name vn.001.001"

or should I use the names after renaming:
Bash:
cloned_interfaces="bridge0 epair0"
ifconfig_bridge0="name br.001 addm vx.001.001"
ifconfig_epair0a="name vx.001.001"
ifconfig_epair0b="name vn.001.001"

Does the order of the lines in rc.conf have any significance? I would like to keep the solution independent of the line order.
 
Hi again,
I have just been helped in the IRC channel #FreeBSD.
What I need can be done by using autobridge in rc.conf:
Bash:
cloned_interfaces="bridge1 epair0"

ifconfig_bridge1_name="br_001"
ifconfig_epair0a_name="vx_001_002"
ifconfig_epair0b_name="vn_001_002"

ifconfig_br_001="up"
ifconfig_vx_001_002="up"
ifconfig_vn_001_002="up"

autobridge_interfaces="br_001"
autobridge_br_001="vx_001_002"

Also it's worth to note that the interface names should conform to shell variable name convention so that they can be used on the left hand side in rc.conf.
 
Back
Top