Interfaces won't "go" until they're assigned an address (again; on the CLI)

When I finally made sense of the VLANs and bridges, got some test interfaces working, I decided to start fresh but either I forgot what I had done, or something is wrong with my router because none of the interfaces will respond on their statically assigned addresses.

However, I got an emergency interface (y'know…because I'm a newbie) and using that I logged in to the router, checked around to find nothing unusual (I think) except for the lack of addresses that should've been configured. So, I issued an ip a add… command and that interface worked again. Same with the next one, and the next one, and so on.

There's also duplicates; they appears as soon as the interface gets its address, but I assume that's because of the misconfig.

This a is tiny small part of the config, the rest is a copy of these sections, I'm not adding it to keep it short.

# /etc/config/network

config interface 'Management'
	option device 'eth1'
	option proto 'static'
	option ipaddr '10.9.0.251'
	option netmask '255.255.255.0'
	option broadcast '10.9.0.255'
	list ip6addr 'xxxx:xxx:xxxx:xxx::xx/120'
	option delegate '0'
	option defaultroute '0'
	option metric '200'
…
config device
  option type 'bridge'
  option name 'mainbridge'
  list ports 'eth0'
  option stp '1'
…
config bridge-vlan
  option device 'mainbridge'
  option vlan '9'
  list ports 'eth0:t'
…
config interface 'z0900'
  option proto 'static'
  option device 'mainbridge.9'
  option ipaddr '10.9.0.2'
  option netmask '255.255.255.0'
  option broadcast '10.9.0.255'
  list ip6addr 'xxxx:xxx:xxxx:xxx::/120'
  option ip6prefix 'xxxx:xxx:xxxx:xxx::/120'

While closing a ton of browser tabs, I believe I caught a glimpse of something that said order was important, I'm not sure, it was a private session I think because I couldn't find it again in the history.

Regardless, the only interface I could move, I did, and it didn't make any difference. "Management" is eth1, above of the main interface, eth0, a bridge-based route-on-a-stick-type interface.

It's either:

- eth0
-- eth0.1
-- eth0.2
-- eth0.…
- eth1

or:

- eth1
- eth0
-- eth0.1
-- eth0.2
-- eth0.…

Appreciate your help. :slight_smile:

—————————————————————————————————————
[SETUP] OpenWRT v22.03.0-rc6 is running on a vSphere VM hw. v15. All vNICs are VMXNET3. eth0 is a trunk with all VLANs, eth1 is only VLAN 9 for recovery/lockout access.
[OBSERVATIONS] Other routers that work similarly — i.e; bridge VLAN filtering e.g; Mikrotik CHR, VyOS — work fine, as well as others that don't rely on bridges such as pfSense/OPNsense. It doesn't seem to be a hardware problem.

You can't have two interfaces with overlapping IP subnets -- 10.9.0.0/24 in this case.

It isn't necessary to specify broadcast, and CIDR notation can be used instead of separate netmask, e.g.

   option ipaddr '10.9.0.2/24'
2 Likes

The way to do this is include eth1 in a bridge instead of having a separate layer 3 interface for it. If it's a direct port device (usually x86) don't use bridge-vlans at all, instead use multiple bridges. If it's a DSA device include eth1 in mainbridge and also add it untagged to the VLAN9 bridge-vlan.