On Mon, May 14, 2018 at 1:01 PM, Aham Brahmasmi <aham.brahma...@gmx.com> wrote: > Thank you Koshibe-san for your reply. > >> I've actually held back on that diff since it's a bit insufficient by itself. > > Ok. > >> Actually, you said that you had just em0 on that switch. Can you try >> adding a local port (addlocal instead of add) alongside em0? It will >> be a vether(4) interface that needs to be given em0's current address, >> in its place. > > Should I be doing the following? And if yes, what address should em0 > have? > > $ cat /etc/hostname.vether0 > inet 1.2.3.4 255.255.255.0 > $ cat /etc/hostname.em0 > inet ?.?.?.? 255.255.255.0 > $ doas ifconfig switch0 create > $ doas ifconfig switch0 add em0 > $ doas ifconfig switch0 addlocal vether0 > $ doas ifconfig switch0 up > > Here, 1.2.3.4 is the external public IP address of the machine > originally assigned to em0.
em0 shouldn't have an address, and you'll also want to explicitly enable vether0. Otherwise that looks fine. >> > There is a continuous stream of messages when running "switchd -dvv": >> > ... >> >> I can't say what they are without the full output, but you will tend >> to see broadcasts (periodic or otherwise) like your second example >> even on your bridge. From a second look at your earlier logs, it seems >> the 1->1 'loops' are generated by the switch seeing VLAN traffic in >> other parts of the network. > > Ok. Would sharing the full output of "switchd -dvv" help? I wouldn't worry much about it, unless adding the local port doesn't work for you. > Interestingly, while searching for addlocal, I encountered a > presentation on switch [1]. On page 13 of that pdf, there is mention of > the switch sharing the STP code with bridge. Would it be correct to > assume that there would be no loops if there was STP in the switch? Even with a bridge, you'd need to enable STP and set priority values on the ports for it to work, so you're correct - if there were any loops, the bridge probably wouldn't have worked either. But you've also seen that, for switch(4), the STP-related options aren't available in ifconfig, and as far as I can tell switchd doesn't do topology/loop detection (and probably won't want to rely on (R)STP to do so). So, the code might be shared, but is likely not used. > Regards, > ab > [1] - https://www.openbsd.org/papers/bsdcan2016-switchd.pdf > ---------|---------|---------|---------|---------|---------|---------|--