This is in a VMware virtualized environment, which has no virtual router (at least mine doesn’t), so everything is connected to a vSwitch dedicated to these nine VMs. I do not want to connect this to any physical equipment, if at all possible.
I have eight Windows 7 machines, each set up very basically. I have one CentOS 5.8 (the ISO I had on hand -- I can upgrade if necessary) server with eight network cards installed, also set up very basically. Its only purpose is to be a router -- this arrangement will not communicate outside of the vSwitch it is connected to.
Each Windows machine is in a different subnet. For example, PC1 is in 192.168.1.0/24 and has an address of 192.168.1.50 and a gateway address of 192.168.1.254 – which is the network address assigned to eth0 on the CentOS server. PC2 is on 192.168.2.0/24 with the same IPs arrangement on the PC and the CentOS server (.50 on the PC, .254 on eth1). PC3 is on 192.168.3.0/24 – and so on so that there are eight subnets.
CentOS’s firewall is disabled because it really isn’t needed (I think) as I’m not talking to the outside world.
I have tried enabling the firewall and entering in (for each interface):
iptables –A FORWARD –i eth0 –j ACCEPT
iptables –A FORWARD –o eth0 –j ACCEPT
I also flushed and tried this:
iptables -A FORWARD -j ACCEPT
These did not work – so I turned the firewall back off:
net.ipv4.ip_forward is set to “1” (no quotes) in /etc/sysctl.conf and sysctl –p was executed. /sbin/sysctl net.ipv4.ip_forward displays a "1".
Each interface displays a “1” when I cat /proc/sys/net/ipv4/conf/eth{x}/forwarding (where {x} is an interface number 0 through 7).
Each PC can ping itself at its .50 address. The server can ping itself at all .254 addresses. Each PC can ping its default gateway address at the proper .254 address for its subnet.
As you may have guessed... The PCs cannot ping one another. It appears that the packets aren't being allowed to pass through the server. At this point, I just need pings to work -- later I may need other traffic types and protocols.
Help!?
Here's the result of the route command:
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.7.0 * 255.255.255.0 U 1 0 0 eth6
192.168.6.0 * 255.255.255.0 U 1 0 0 eth5
192.168.5.0 * 255.255.255.0 U 1 0 0 eth4
192.168.4.0 * 255.255.255.0 U 1 0 0 eth3
192.168.3.0 * 255.255.255.0 U 1 0 0 eth2
192.168.2.0 * 255.255.255.0 U 1 0 0 eth1
192.168.1.0 * 255.255.255.0 U 1 0 0 eth0
192.168.8.0 * 255.255.255.0 U 1 0 0 eth7
default 192.168.1.254 0.0.0.0 UG 0 0 0 eth0