OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version openwrt-21.02
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Zbyněk Kocur - 22.09.2021
Last edited by Jo-Philipp Wich - 22.09.2021

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

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
Closed by  Jo-Philipp Wich
22.09.2021 13:52
Reason for closing:  Not a bug
Additional comments about closing:  

Configuration has syntax error

Admin
Jo-Philipp Wich commented on 22.09.2021 13:52

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.

Zbyněk Kocur commented on 22.09.2021 13:56

Thank you.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing