Bug 256906 - Network bridging settings are not fully applied from "rc .conf"
Summary: Network bridging settings are not fully applied from "rc .conf"
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 13.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-30 14:31 UTC by Zoomion
Modified: 2021-06-30 17:39 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zoomion 2021-06-30 14:31:32 UTC
I warn you right away that the network card, I-350T, is in good working order and works without errors in bridge mode!

In the beginning, I even assembled my kernel and checked all the settings ... Then I decided that an error might have crept in when assembling the driver or something ...
I installed a readable system and first of all began to check the bridge settings !:

4-port network card ...
Clean installation of the system!
Bridge settings:
ifconfig bridge create
ifconfig bridge0 addm igb0 addm igb1 addm igb2 addm igb3 up
ifconfig igb0 up
ifconfig igb1 up
ifconfig igb2 up
ifconfig igb3 up
ifconfig bridge0 inet 192.168.1.1/24

The bridge is working, the network is pinging ... everything is fine!
I enter this configuration into "rc.conf":
cloned_interfaces="bridge0"
ifconfig_bridge0="addm igb0 addm igb1 addm igb2 addm igb3 up"
ifconfig_igb0="up"
ifconfig_igb1="up"
ifconfig_igb2="up"
ifconfig_igb3="up"
ifconfig_bridge0="inet 192.168.1.1 netmask 255.255.255.0"

After rebooting the system, I see:
All igb0-igb3 UP interfaces...
bridge0 UP
There are NO connected interfaces to the bridge "bridge0"!
If you add the required interface to the bridge, the network will work!
ifconfig bridge0 addm igb0 up
ifconfig igb0 up

I tried to change the settings to rearrange them ... - either a bridge with all interfaces or only a bridge with an IP address!

Tried adding additional settings to "rc.conf":
if_bridge_load="YES"
bridgestp_load="YES"
firewall_enable="YES"
firewall_type="open"
gateway_enable="YES"
,but that doesn't solve the problem!
Comment 1 Marek Zarychta 2021-06-30 14:45:37 UTC
(In reply to Zoomion from comment #0)
>Tried adding additional settings to "rc.conf":
>if_bridge_load="YES"
>bridgestp_load="YES"

Please place those in /boot/loader.conf. If helped, please consider closing this PR.
Comment 2 Marek Zarychta 2021-06-30 14:52:34 UTC
(In reply to Marek Zarychta from comment #1)
The error is here:
>ifconfig_bridge0="addm igb0 addm igb1 addm igb2 addm igb3 up"
>ifconfig_bridge0="inet 192.168.1.1 netmask 255.255.255.0"

Second line overrides the first one, try to combine them
 
ifconfig_bridge0="inet 192.168.1.1 netmask 255.255.255.0 addm igb0 addm igb1 addm igb2 addm igb3 up"
Comment 3 Marek Zarychta 2021-06-30 14:52:55 UTC
It's not a bug
Comment 4 Zoomion 2021-06-30 15:14:27 UTC
(In reply to Marek Zarychta from comment #2)
Tried it like this:
ifconfig_bridge0 = "addm igb0 addm igb1 addm igb2 addm igb3 up inet 192.168.1.1 сетевая маска 255.255.255.0"

does not work!

I'll try both options in the evening.  Thank you.
Comment 5 Marek Zarychta 2021-06-30 15:16:49 UTC
(In reply to Zoomion from comment #4)
Try this one
ifconfig_bridge0="inet 192.168.1.1/24 addm igb0 addm igb1 addm igb2 addm igb3 up"
Comment 6 Zoomion 2021-06-30 15:30:29 UTC
(In reply to Marek Zarychta from comment #5)
I also tried the shortened version, did not try to swap places - IP/24 abbm...
Comment 7 Zoomion 2021-06-30 15:32:24 UTC
(In reply to Zoomion from comment #6)
I'll try to add filter loading in boot.loader ...
Comment 8 Zoomion 2021-06-30 15:46:06 UTC
(In reply to Marek Zarychta from comment #1)
These lines are probably not needed, since the bridge is enabled by default in the kernel.  But you are right, they need to be placed in boot.loader
Comment 9 Zoomion 2021-06-30 17:33:45 UTC
Problem solved!
Indeed, if you bring the configuration line, in "rc.conf", to the form:
...
cloned_interfaces="bridge0"
ifconfig_bridge0="inet 192.168.17.1/24 addm igb0 addm igb1 addm igb2 addm igb3 up"
ifconfig_igb0="up"
ifconfig_igb1="up"
ifconfig_igb2="up"
ifconfig_igb3="up"
....
, then the network bridge and the connected interfaces will work correctly!

It is necessary to indicate this case in the manuals so that beginners do not go down the wrong path!
Thank you for your help and quick response !!!
Thank you Marek Zarychta!
Comment 10 Marek Zarychta 2021-06-30 17:36:02 UTC
If the problem is solved, then please consider closing this PR.
Comment 11 Zoomion 2021-06-30 17:38:48 UTC
I think this is a bug, but not a software bug, but a bug in the documentation! This needs to be fixed!
Thanks again!