Howto "trunk" with `swconfig`?

What I want, maybe, is an interface-device combo, without untagged (vlan:0) traffic?

What's my issue? (Ignore the time)
(Edit: Yes, of course: Its an old ath79 device using swconfig.)

Mon Sep 23 19:54:21 2024 kern.warn kernel: [ 3293.329954] br-vlan17: received packet on bat0.17 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:21 2024 kern.warn kernel: [ 3293.341012] br-vlan64: received packet on bat0.64 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:21 2024 kern.warn kernel: [ 3293.352065] br-vlan16: received packet on bat0.16 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:21 2024 kern.warn kernel: [ 3293.363124] br-vlan49: received packet on bat0.49 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:21 2024 kern.warn kernel: [ 3293.374183] br-vlan56: received packet on bat0.56 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:21 2024 kern.warn kernel: [ 3293.385239] br-vlan76: received packet on bat0.76 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:21 2024 kern.warn kernel: [ 3293.396295] br-vlan71: received packet on bat0.71 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:31 2024 kern.warn kernel: [ 3303.536541] br-vlan65: received packet on bat0.65 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:31 2024 kern.warn kernel: [ 3303.547703] br-vlan24: received packet on bat0.24 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:31 2024 kern.warn kernel: [ 3303.558770] br-vlan77: received packet on bat0.77 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:31 2024 kern.warn kernel: [ 3303.569835] br-vlan17: received packet on bat0.17 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:31 2024 kern.warn kernel: [ 3303.580869] br-vlan64: received packet on bat0.64 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:31 2024 kern.warn kernel: [ 3303.591893] br-vlan16: received packet on bat0.16 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:31 2024 kern.warn kernel: [ 3303.602913] br-vlan49: received packet on bat0.49 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:31 2024 kern.warn kernel: [ 3303.613935] br-vlan56: received packet on bat0.56 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:31 2024 kern.warn kernel: [ 3303.624964] br-vlan76: received packet on bat0.76 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:31 2024 kern.warn kernel: [ 3303.635986] br-vlan71: received packet on bat0.71 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:41 2024 kern.warn kernel: [ 3313.776473] br-vlan65: received packet on bat0.65 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:41 2024 kern.warn kernel: [ 3313.787629] br-vlan24: received packet on bat0.24 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:41 2024 kern.warn kernel: [ 3313.798696] br-vlan77: received packet on bat0.77 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:41 2024 kern.warn kernel: [ 3313.809758] br-vlan17: received packet on bat0.17 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:41 2024 kern.warn kernel: [ 3313.820796] br-vlan64: received packet on bat0.64 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:41 2024 kern.warn kernel: [ 3313.831822] br-vlan16: received packet on bat0.16 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:41 2024 kern.warn kernel: [ 3313.842850] br-vlan49: received packet on bat0.49 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:41 2024 kern.warn kernel: [ 3313.853872] br-vlan56: received packet on bat0.56 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:41 2024 kern.warn kernel: [ 3313.864901] br-vlan76: received packet on bat0.76 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
Mon Sep 23 19:54:41 2024 kern.warn kernel: [ 3313.875921] br-vlan71: received packet on bat0.71 with own address as source address (addr:cc:32:e5:fa:e7:37, vlan:0)
# brctl show
bridge name     bridge id               STP enabled     interfaces
br-vlan16               7fff.020010010010       no      eth0.16
                                                        bat0.16
br-vlan17               7fff.020010010011       no      bat0.17
                                                        eth0.17
br-vlan24               7fff.020010010018       no      eth0.24
                                                        bat0.24
br-vlan49               7fff.020010010031       no      bat0.49
                                                        eth0.49
br-vlan56               7fff.020010010038       no      bat0.56
                                                        eth0.56
br-vlan64               7fff.020010010040       no      bat0.64
                                                        eth0.64
br-vlan65               7fff.020010010041       no      bat0.65
                                                        eth0.65
br-vlan71               7fff.020010010047       no      bat0.71
                                                        eth0.71
br-vlan76               7fff.02001001004c       no      bat0.76
                                                        eth0.76
br-vlan77               7fff.02001001004d       no      bat0.77
                                                        eth0.77
br-vlan4094             7fff.020010010ffe       no      eth0.4094

As far as I can tell, eth0 and bat0 are nowwhere used "untagged", but of course the "interface" must be UP, otherwise there couldn't be an sub-interface, right?
My assumption is, because of

config device
    option  name            'bat0'
    option  macaddr         '02:00:10:00:00:01'

config interface            'bat0'
    option  proto           'batadv'
    option  routing_algo    'BATMAN_IV'

config interface            'bat0_mesh0'
    option  proto           'batadv_hardif'
    option  master          'bat0'

config interface            'bat0_mesh1'
    option  proto           'batadv_hardif'
    option  master          'bat0'

config interface            'bat0_eth0'
    option  proto           'batadv_hardif'
    option  master          'bat0'
    option  device          'eth0'

eth0 is directly attached to bat0.

  1. Do have to(?) add each eth0.<N> as list device on config interface 'bat0_eth0'?
  2. Can I prevent untagged (vlan:0) traffic on eth0, or even on bat0, too? Is this even near a sane solution?
  3. What do I miss here?

Thanks.

Looks to be a loop?

No, AFAIC tell, no loop.

No LED takes itself to death, and my layer-2 and layer-3 (seams to) work fine.

Hi, the mac address in the kernel log warnings is the mac of which devices/interfaces ? (check also wireless devices).

Its the hardware address, but I configure every interface staticly

config switch
    option  name            'switch0'
    option  reset           '1'
    option  enable_vlan     '1'

config device
    option  name            'br-vlan'
    option  type            'bridge'
    option  bridge_empty    '1'
    option  macaddr         '02:00:10:01:00:10'
    option  proto           'none'
    option  auto            '1'

# Example VLAN 17
config switch_vlan
    option  device          'switch0'
    option  vlan            '17'
    option  ports           '0t 1t'

config device
    option  name            'br-vlan17'
    option  type            'bridge'
    list    ports           'bat0.17'
    list    ports           'eth0.17'
    option  macaddr         '02:00:10:01:00:11'

config interface            'vlan17'
    option  device          'br-vlan17'
    option  bridge_empty    '1'
    option  igmp_snooping   '1'
    option  proto           'none'

And no, I think I state the macaddr everywhere, and the hardware should nowhere be used.

root@ap-flur:~# grep -r cc:32:e5:fa:e7:37 /etc/
/etc/bat-hosts:cc:32:e5:fa:e7:37   eth0.ap-flur.home.arpa.
grep: /etc/localtime: No such file or directory
root@ap-flur:~#

And wireless

config wifi-device 'radio0'
    option  disabled    '0'
    option  type        'mac80211'
    option  country     'DE'
    option  channel     '36'
    option  hwmode      '11a'
    option  path        'pci0000:00/0000:00:00.0'
    option  htmode      'HT40'  # 'VHT80'

config wifi-iface 'mesh0'
    option  disabled    '0'
    option  device      'radio0'
    option  ifname      'mesh0'
    option  macaddr     '02:00:10:02:00:01'
    option  network     'bat0_mesh0'
    option  mode        'mesh'
    option  mesh_fwding '0'
    option  mesh_id     '.11s-TEST'
    option  encryption  'psk2+ccmp'
    option  key         'XXX'


#######################################################################

config wifi-device 'radio1'
    option  disabled    '0'
    option  type        'mac80211'
    option  country     'DE'
    option  channel     '1'
    option  hwmode      '11g'
    option  path        'platform/ahb/18100000.wmac'
    option  htmode      'HT20'  # 'HT40'

config wifi-iface 'mesh1'
    option  disabled    '0'
    option  device      'radio1'
    option  ifname      'mesh1'
    option  macaddr     '02:00:10:03:00:01'
    option  network     'bat0_mesh1'
    option  mode        'mesh'
    option  mesh_fwding '0'
    option  mesh_id     '.11s-TEST'
    option  encryption  'psk2+ccmp'
    option  key         'XXX'
root@ap-flur:~# batctl n
Warning - mac already known (changing name from 'eth0.sw1.home.arpa.' to 'lan1.sw1.home.arpa.'): a4:2a:95:17:9d:30
[B.A.T.M.A.N. adv 2023.1-openwrt-7, MainIF/MAC: eth0/cc:32:e5:fa:e7:37 (bat0/02:00:10:00:00:01 BATMAN_IV)]
IF             Neighbor              last-seen
        mesh1     mesh1.ap-wz.home.arpa.    0.620s
        mesh0     mesh0.ap-wz.home.arpa.    0.940s
bat0             UNKNOWN        02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
bat0.16@bat0     UP             02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
bat0.17@bat0     UP             02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
bat0.24@bat0     UP             02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
bat0.49@bat0     UP             02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
bat0.56@bat0     UP             02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
bat0.64@bat0     UP             02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
bat0.65@bat0     UP             02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
bat0.71@bat0     UP             02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
bat0.76@bat0     UP             02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
bat0.77@bat0     UP             02:00:10:00:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan16        UP             02:00:10:01:00:10 <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan17        UP             02:00:10:01:00:11 <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan24        UP             02:00:10:01:00:18 <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan4094      UP             02:00:10:01:0f:fe <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan49        UP             02:00:10:01:00:31 <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan56        UP             02:00:10:01:00:38 <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan64        UP             02:00:10:01:00:40 <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan65        UP             02:00:10:01:00:41 <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan71        UP             02:00:10:01:00:47 <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan76        UP             02:00:10:01:00:4c <BROADCAST,MULTICAST,UP,LOWER_UP>
br-vlan77        UP             02:00:10:01:00:4d <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0             UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.16@eth0     UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.17@eth0     UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.24@eth0     UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.4094@eth0   UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.49@eth0     UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.56@eth0     UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.64@eth0     UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.65@eth0     UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.71@eth0     UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.76@eth0     UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
eth0.77@eth0     UP             cc:32:e5:fa:e7:37 <BROADCAST,MULTICAST,UP,LOWER_UP>
lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
mesh0            UP             02:00:10:02:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
mesh1            UP             02:00:10:03:00:01 <BROADCAST,MULTICAST,UP,LOWER_UP>

CC:32:E5 Tp-Link Technologies Co.,Ltd

wow, talk about uncalled for.

Please go away!

Is the issue.

If only the bat0 interface initialized(?),

...

config interface            'bat0_eth0'
    option  proto           'batadv_hardif'
    option  master          'bat0'

it can be used in the config device stanze with list ports 'bat0.${VLANID}, and if an macaddr is set on that bridge-device, every one is happy and the kernel stops complaining.

1 Like