Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#4049 - Stop network configuration after defining a network bridge #9039

Closed
openwrt-bot opened this issue Sep 22, 2021 · 2 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

zokl:

I ran into a problem with the order of placement of the bridge definition between interfaces. The network configuration execution stops after the network bridge definition. Anything that is not executed after that. The following is an example of placing routing entries before and after the network bridge definition.

config interface 'loopback' option device 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd58:e16c:06bf::/48'

config interface 'mgmt'
option enabled '1'
option proto 'static'
list ipaddr '172.16.10.2/24'
option device 'br-mgmt'

config device 'br_mgmt'
option name 'br-mgmt'
option type 'bridge'
list ports 'eth0'
list ports 'eth1'
list ports 'eth2

config route 'mgmt1'
option interface 'mgmt'
option gateway '172.16.10.1'
option target '172.16.12.0/24'

config route 'mgmt2'
option interface 'mgmt'
option gateway '172.16.10.1'
option target '172.16.11.0/28'

Routing table output

root@FTW2:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.10.0 0.0.0.0 255.255.255.0 U 0 0 0 br-mgmt

Good possition

config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fd58:e16c:06bf::/48'

config interface 'mgmt'
option enabled '1'
option proto 'static'
list ipaddr '172.16.10.2/24'
option device 'br-mgmt'

config route 'mgmt1'
option interface 'mgmt'
option gateway '172.16.10.1'
option target '172.16.12.0/24'

config route 'mgmt2'
option interface 'mgmt'
option gateway '172.16.10.1'
option target '172.16.11.0/28'

config device 'br_mgmt'
option name 'br-mgmt'
option type 'bridge'
list ports 'eth0'
list ports 'eth1'
list ports 'eth2

Routing table output

root@FTW2:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.10.0 0.0.0.0 255.255.255.0 U 0 0 0 br-mgmt
172.16.11.0 172.16.10.1 255.255.255.240 UG 0 0 0 br-mgmt
172.16.12.0 172.16.10.1 255.255.255.0 UG 0 0 0 br-mgmt

@openwrt-bot
Copy link
Author

jow-:

Your list ports 'eth2 line lacks a closing quote. You can verify the syntax of /etc/config/network using the command "uci show network >/dev/null". In case of syntax error it should report the offending line and offset.

@openwrt-bot
Copy link
Author

zokl:

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant