I'v two identical network devices that have hardcoded same ip address but different mac adressess. Both of them are connected to different nic on my windows machine. Both of them listen same udp port, accept udp messages only from preconfigured source address and reply to preconfigured destination ip:port address. How can i manage this devices simultaneously? If it possible to handle this on linux with like that iptables or ip routing?
I'v tried to use raw sockets to build and send ethernet packet. For this i assign different ip address to each nic. And give predefined ip address on ethernet packet when sending it with raw socket. But packet didn't send. It' seems windows blocking the ip packet if the source ip is not real. I'v also tried build and send raw udp-ip-ethernet packet with npcap. But it didn't work also.
You can't give two network devices the same IP address. That's akin to having two houses with the exact same postal mailing address and expecting mail to be delivered to the correct house. I think you need to start with what are you trying to do. If I had to guess, you want to have two NICs, so one isn't a single failure point? If so, what you are looking for in Windows is NIC Teaming. In Windows server, you enable this in server manager, in Windows 10/11 via PowerShell. Here is a link explaining both: https://woshub.com/configure-nic-teaming-windows/