etcTHE APPLIED SOLUTION After going through a series of iterations, starting with a Cisco based approach, I ended up with the solution outlined below.
Rather than use IPTables, I used nft, its modern replacement, running on a single Linux box. The rules here don't allow scripts to be posted so I will describe what was done. There are several parts to the solution shown in the diagram.
TO DOPART A What I haven't doneI set up a filter so that only traffic within the IP range of the connected devices was allowed in.
PART B nft is actually test thissetup to direct specific IP addresses to specific ports. To do that I need They act like VLANS but they are not, because all the IP addresses are in the same domain. The packets are DNATed to get at least one quad Gb NICroute them correctly. An packet from the network is sent to the correct port and write the IPtable commandsdestination IP is changed to setupmatch the ruleshost. I have read enough about IPtables
PART C Part C needs to knowdifferentiate between traffic to the above stepsneighbour of a pair of hosts, or out to the rest of the network.
Note there is no requirement for comms across different pairs of host. There is only a requirement for comms between the two hosts that make up a pair. The setup below will workallow for comms between pairs of hosts. I need
nft is setup so that any traffic with a destination IP of it's neighbour is steered to figure out the precise commands needed to makecorrect eth port and vice versa. For example, if a packet from host 172.30.21.50 (source) comes in from eth0, and has a destination IP of 172.30.21.60 (its neighbour), then nft sends it happenout through port eth1. No NATing is required.
It will take me at leastIf a couplepacket comes in from the network with a destination IP of months172.30.22.010, then it is DNATed to get172.30.21.50 with the hardwaresource untouched (ip xxx.xxx.xxx.xxx) and testsent out eth0 port.
The reply to that packet coming back in eth0 port with have a prototypedest IP of xxx. Until thenxxx.xxx.xxx, this answer will remain incompleteand a source of 172. There should be enough information here30.21.50. This is SNATed to allow someone else172.30.22.010 and sent out to solve their problemthe network. The network thinks it is communicating with IPtablesa host on IP 172.30.22.010.
IPtables is very flexiblePart C differentiates between external traffic and traffic between pairs. From outside, so if your problem is noteach host looks like it has its own IP address. Each host can communicate with its neighbour without knowing that there are multiple pairs of hosts with the same as mine, it should be easyIP addresses. All of this is done with a single Linux box with one ethernet port per host.
Bitcoin Switch This solution is limited by the number of available ports on the Linux box. The work around is to adaptuse machine designed for bit coin mining. These have many more pci-express connectors than a standard MoBo. Each connector can take a 4-way network card. It isn't hard to get thefind a mobo with more than 15 pci-e interfaces. That makes a single Linux box with 60 or more ports a practical solution you are looking for.
IThe throughput of a single Linux box based on a bit coin MoBo will update this answer after I have tested the prototypenot match a purpose build Cisco switch/router but it works for a lab test environment (my application). It is a low cost and efficient solution in terms of:
- energy consumption,
- space,
- single box solution,
- $$ cost.
It is a much better solution than Cisco can provide.