Making my own switch
I've been trying to turn an old computer into a switch for a setup like this:
The wire coming in from the network is from a router, so I just wanted to use the computer as a switch for 3 other machines I have running. I have 3 NIC cards installed (in addition to the on board Ethernet adapter) on the computer I'd like to use as the switch. I've been trying to do this with the computer running Debian Etch by using iptables, but I can't seem to get it working. Any ideas?
Do the 3 computers "in the back" have IP's on the same network as the "switch" machine?
If so, you don't need any iptables - just enable IP forwarding.
If they are on a different network, then you'll need to enable masquerading via iptables (and still enable IP forwarding.)
I was hoping to get it set up just as if I had an actual switch coming from the router. I wanted the machines on the other side of the computer that I want to act as a switch to get their IPs from the router.
Hmmm....DHCP requests/acks are broadcast packets. I am not sure if enabling IP forwarding will include this traffic.
You need to look up "ip forwarding" in Linux and see if it includes *all* traffic - TCP, UDP, broadcast, etc.
Ive found a lot on how to make your own firewalls and routers, but nothing on switches.