This is an unusual configuration because it replaces what can be achieved by means of a 10-dollar switch. But of course, if a 10-dollar switch can do it, a fortiori a pc can do it. There must be a gazillion ways to do it, this is just a simple one.
Let us suppose your router gives addresses in the 192.168.1.21-50 range, and let us call eth0 park's interface with the router, eth1 that with kenmore and eth2 that with chiswick.
1) Let park get its IP address via DHCP from the router.
2) Let us give static IP addresses to kenmore and chiswick. For instance kenmore 192.168.1.5 and chiswick 192.168.1.10. Please note that both are outside the range used by your router, so that there be no conflicts.
3) Depending on the OS on kenmore/chiswick, you may need to set up a routing table on them. In Linux, you should have
sudo route add default gw 192.168.1.1
and similarly on Mac, but on Windows I think this is automatic.
4) On park: first, let us allow IPv4 forwarding: as sudo edit /etc/sysctl.conf and change this line
#net.ipv4.ip_forward=0
to
net.ipv4.ip_forward=1
Save the file, issue the command:
sudo sysctl -p
5) Second, on park, let us add these two routes to the routing table:
sudo route add -host 192.168.1.5 dev eth1
sudo route add -host 192.168.1.10 dev eth2
Now you are good to go.
ryan@chiswick
, it would pass tochiswick
. Similarly forkenmore
.