I am transitioning my home lab's network to use VLANs. I have one dedicated machine with FreeBSD 15.1 which shall serve as a router on a stick and do the inter-vlan routing. It shall use the new vlan-filtering bridge as described in here. It shall access the internet through my other router 192.168.50.1.
So I put this into its rc.conf:
Yet when the machine boots, I am getting these error messages:
And when I log in to check ifconfig, I see no bridge0 device. Only the re0 and lo0 interfaces are present, re0 has no assigned IPv4 address (this is expected because I want the IPv4s to be assigned statically on the bridge0.20, bridge0.30, bridge0.40, bridge0.50 as I defined in the rc.conf).
When I then try to set the things up manually in the console, I can do the following:
which works, the last route add default then says: `add net default: gateway 192.168.50.1 fib 0: route already in table.
`netstat -4rn` then shows:
there is some minor residual problems with this, as this does not yet give me the connectivity I need to reach internet or the other machines in the home lab, but I will deal with that later. Currently I don't understand why this bridge device and these static adresses on its member interfaces cannot be created during boot according to my rc.conf
So I put this into its rc.conf:
Code:
local_unbound_enable="YES"
cloned_interfaces="bridge0 bridge0.20 bridge0.30 bridge0.40 bridge0.50"
ifconfig_bridge0="create vlanfilter"
ifconfig_bridge0_addm_re0="tagged 20,30,40,50"
ifconfig_bridge0_20="inet 192.168.20.10/24 up"
ifconfig_bridge0_30="inet 192.168.30.1/24 up"
ifconfig_bridge0_40="inet 192.168.40.1/24 up"
ifconfig_bridge0_50="inet 192.168.50.10/24 up"
defaultrouter="192.168.50.1"
gateway_enable="YES"
Yet when the machine boots, I am getting these error messages:
Code:
route message indicates error: File exists
add host 127.0.0.1: gateway lo0 fib 0: route already in table
route message indicates error: Invalid argument
add net default: gateway 192.168.50.1 fib 0: Invalid argument
Additional inet routing options: gateway="YES"
route message indicates error: File exists
add host ::1: gateway lo0 fib 0: route already in table
...
Starting local unbound.
Waiting for nameserver to start... good
And when I log in to check ifconfig, I see no bridge0 device. Only the re0 and lo0 interfaces are present, re0 has no assigned IPv4 address (this is expected because I want the IPv4s to be assigned statically on the bridge0.20, bridge0.30, bridge0.40, bridge0.50 as I defined in the rc.conf).
When I then try to set the things up manually in the console, I can do the following:
Code:
ifconfig bridge0 create vlanfilter
ifconfig bridge0 addm re0 tagged 20,30,40,50
ifconfig bridge0.20 inet 192.168.20.10/24 up
ifconfig bridge0.30 inet 192.168.30.1/24 up
ifconfig bridge0.40 inet 192.168.40.1/24 up
ifconfig bridge0.50 inet 192.168.50.10/24 up
route add default 192.168.50.1
which works, the last route add default then says: `add net default: gateway 192.168.50.1 fib 0: route already in table.
`netstat -4rn` then shows:
Code:
Routing tables
Internet:
Destination Gateway Flags Netif Expire
deault 192.168.50.1 UGS bridge0.50
127.0.0.1 link#2 UH lo0
192.168.20.0/24 link#4 U bridge0.20
192.168.20.10 link#2 UHS lo0
192.168.30.0/24 link#5 U bridge0.30
192.168.30.1 link#2 UHS lo0
192.168.40.0/24 link#6 U bridge0.40
192.168.40.1 link#2 UHS lo0
192.168.50.0/24 link#7 U bridge0.50
192.168.50.10 link#2 UHS lo0
there is some minor residual problems with this, as this does not yet give me the connectivity I need to reach internet or the other machines in the home lab, but I will deal with that later. Currently I don't understand why this bridge device and these static adresses on its member interfaces cannot be created during boot according to my rc.conf