Same local IP + same MAC for 4 clients - shouldn't the switch/router freak out?

EnthusiastXYZ

Limp Gawd
Joined
Jun 26, 2020
Messages
221
If I assign same static local IP + same MAC to 4 PC's and connect them to the same router (UniFi Dream Machine), where each PC gets its own physical port and there are no other switches and/or devices, then all 4 PC's connect to the router and function without an issue. The router detects physical connection for each of the 4 physical ports, but all 4 PC's connect and work just fine simultaneously using identical static local IP and MAC address.

Is this normal? Shouldn't routers forbid such configuration and prevent them from working? This isn't MITM case because there are no devices between any of the PC's and the router.
 
This way you probably are replicating the way old network hubs worked where all packets were sent to all ports, creating incredible mess and slowing down the network. Switches were invented to avoid such packet collisions.
 
Router has nothing to do with this, it does not care. What switch does depends on its software. As said before, technically old network hubs worked like this, but this means deliberately slowing down your network connection by saturating it with packets which belong to the other devices.
 
Every router has a built-in switch. I was basically trying to figure out whether modern consumer routers, such as UniFi Dream Machine, are supposed prevent same local + same MAC duplication on the network. In this case all 4 PC's are connected to the same br0 interface.
 
Every router has a built-in switch.
Really? Mine hasn't. Router and switch are separate units by functionality, even if they are built into same box. Sometimes even wireless access point is in the same box, creating a monster term "wireless router". Which is a complete nonsense, router and wifi even do not work on the same OSI layer.
OTOH, if you are trying to prove Murphy's Law is correct then you have done it.
It is impossible to make anything foolproof because fools are so ingenious.
 
Last edited:
So switches/routers allow such setups?
It's not a matter of "allow". Obviously you can go to any end device and make it present itself however you want, as you've done. If you neglect to run NAC/PNAC (802.1x) then anything can happen at the layer you're messing with. I'm not even sure why you're doing this, but, to each their own.
If you look at your switch stats, surely you'd see APR issues and duplicate IP warnings/errors.

Refer to the OSI model and brush up on the fundamentals.
 
The only way I could see something like this working without issues is because each port is its own vlan/network. Otherwise, there's some sort of non-standard 'magic' going on that's making it work. Who knows, maybe that's how the hackers that get all the ubiquiti data do it...
 
It's not a matter of "allow". Obviously you can go to any end device and make it present itself however you want, as you've done. If you neglect to run NAC/PNAC (802.1x) then anything can happen at the layer you're messing with. I'm not even sure why you're doing this, but, to each their own.
If you look at your switch stats, surely you'd see APR issues and duplicate IP warnings/errors.

Refer to the OSI model and brush up on the fundamentals.
I configured my network that way as a test to see what happens - theory VS. practice concept. Depending on who you ask, it is not supposed to be possible without major issues, but it appears to be quite possible. There are no errors in IFCONFIG stats for any of the Ethernet ports. There is no packet loss. I assigned static local IP + static ARP in router and on each PC. I can't find any error messages in logs or anywhere else. All 4 PC's are on the same subnet without VLAN's...

Are there some other common Linux/Debian commands to check for switch stats and/or errors?
 
Last edited:
If you're not seeing at the very least duplicate IP warnings and errors, you're definitely not looking in the right places and/or don't know what you're doing.
 
More true words have never been typed than the ones above here ..................................................................................................^^^^^^^^^^^^^^^^
We know this because he/she/it expects Ethernet errors from layer 3.
 
I could see this working with the right NAT setup and individual interfaces on the switch, but I wouldn't expect it to work if the ports are operating as a switch. A normal switch is going to try to learn which mac address is on which port, and send packets addressed to a mac it knows about to only one port. If you've got four ports using the same source address, then whichever port sent the most recent outbound packet would get the return packets... and that's not going to work great.
 
I could see this working with the right NAT setup and individual interfaces on the switch, but I wouldn't expect it to work if the ports are operating as a switch. A normal switch is going to try to learn which mac address is on which port, and send packets addressed to a mac it knows about to only one port. If you've got four ports using the same source address, then whichever port sent the most recent outbound packet would get the return packets... and that's not going to work great.
My thoughts exactly. Even if not operating as a switch, but a hub brings even more of a disaster scenario. Something doesn't add up.
 
Back
Top