Turning a router's switch into hub by MAC Flooding

in my town, Ethernet hubs are not sold anymore off the shelf.
So I was thinking I can put a script into my Openwrt router, making a MAC Flooding so the router's Switch would turn into a hub.
¿Any ideas ?
thank you

Ethernet hubs are, for all intents and purposes, obsolete technology. They used to be popular because they were cheaper, but they come with significant drawbacks. Nowadays, switches are so cheap that practically noone bothers with even producing a hub.

What exactly are you trying to achieve with a hub that you can't achieve with a switch?


The modern way to monitor packets is to set up a mirror port, which is supported on many devices under OpenWrt. A mirror port will output a copy of all packets sent and/or received on one of the other ports.

1 Like

The link you provide shows no such instructions nor offers such a solution as you described. I'm not sure that you'll successfully flood a modern switch with too many MACs. For example a dumb 8-port gigabit switch can hold ~8k entries. In addition, your OpenWrt is not a operating as a dumb switch - it's managed by the Linux kernel.

Also, I'm not sure that you can "flood" MACs on one port - and somehow by that action, make the traffic go to all ports.

This link seems to have more information on how to alter the ARP cache:

Although, it doesn't appear that your device will exhibit the behavior of a hub once the ARP cache becomes full.

1 Like

I wish to do just that: mirroring.
But I needed mirroring at Level 2 .
¿Any good HowTo's? Many are about level 3 mirroring with iptables.

Not sure what you're talking about, OpenWrt mirroring is Layer 2. I've never heard Layer 3 port mirroring; I've especially never heard of using iptables.


See: https://openwrt.org/docs/guide-user/base-system/basic-networking#config_switch


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.