I'm experimenting a bit with vnet and jails and wanted to create a situation where I have two bridges and a bunch of epair devices as members. To keep things clear, I'd like to rename all interfaces to have a meaningful name.
As an example, I'd like to do something like this:
Of course, this does not work. The epair interface are created and renamed properly, and the bridges are assigned their primary IP addresses and the members are added. However, the line starting with `ifconfig_bridge0_alias0` obviously is not processed correctly. By the time aliases are added, the interface is already renamed. So logically, it should be `ifconfig_ext_bridge_alias0`, but that won't be processed since `ext_bridge` is not in the `network_interfaces` variable.
I could maybe do something like this:
But the documentation (man rc.conf) says setting network_interfaces to anything other than `AUTO` is deprecated. I'd prefer not to rely on deprecated functionality (plus, there seems to be some issue with epair1b and epair2b, which don't get renamed).
Any way to accomplish this in a neat way?
As an example, I'd like to do something like this:
Code:
hostname="vnettest"
cloned_interfaces="epair0 epair1 epair2 bridge0 bridge1"
ifconfig_em0="up"
ifconfig_epair0a="name web_ext_host up"
ifconfig_epair0b="name web_ext_jail up"
ifconfig_epair1a="name web_int_host up"
ifconfig epair1b="name web_int_jail up"
ifconfig_epair2a="name crm_int_host up"
ifconfig epair2b="name crm_int_jail up"
ifconfig_bridge0="inet 10.0.2.15 netmask 0xffffff00 addm web_ext_host addm em0 up name ext_bridge"
ifconfig_bridge0_alias0="inet 10.0.2.16 netmask 0xffffff00"
ifconfig_bridge1="inet 10.1.0.1 netmask 0xffffff00 addm crm_int_host addm web_int_host up name int_bridge"
default_gateway="10.0.2.2"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
sshd_enable="YES"
I could maybe do something like this:
Code:
hostname="vnettest"
network_interfaces="epair0 epair1 epair2 ext_bridge int_bridge em0 lo0"
cloned_interfaces="epair0 epair1 epair2 bridge0 bridge1"
create_args_bridge0="name ext_bridge"
create_args_bridge1="name int_bridge"
ifconfig_em0="up"
ifconfig_epair0a="name web_ext_host up"
ifconfig_epair0b="name web_ext_jail up"
ifconfig_epair1a="name web_int_host up"
ifconfig epair1b="name web_int_jail up"
ifconfig_epair2a="name crm_int_host up"
ifconfig epair2b="name crm_int_jail up"
ifconfig_ext_bridge="inet 10.0.2.15 netmask 0xffffff00 addm web_ext_host addm em0 up"
ifconfig_ext_bridge_alias0="inet 10.0.2.16 netmask 0xffffff00"
ifconfig_int_bridge="inet 10.1.0.1 netmask 0xffffff00 addm crm_int_host addm web_int_host up"
default_gateway="10.0.2.2"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
sshd_enable="YES"
But the documentation (man rc.conf) says setting network_interfaces to anything other than `AUTO` is deprecated. I'd prefer not to rely on deprecated functionality (plus, there seems to be some issue with epair1b and epair2b, which don't get renamed).
Any way to accomplish this in a neat way?