Using VMWare Pro, I have two nodes with Centos 7 installed - one connected to my router with two network cards. The other is another node I want to connect to the internet on a different subnet. It looks like this:
192.168.1.1 - internet router
|
192.168.1.108 - (eno16777736) should route to the internet router
192.168.120.131 - (eno33554960) for subnet to pass traffic to 108
|
192.168.120.134 - Node on subnet
Lets call the one with two NICS "Gateway". Currently Gateway has ip forwarding enabled. iptables/firewalld/selinux are disabled currently to troubleshoot why this wasn't routing.
I was able to isolate it to the Gateway:
ping -I eno33554960
returns Destination Host Unreachable whereas ping -I eno16777736
reaches the server since it's on the same subnet as the internet router.
I thought CentOS sets up the route across NICs automatically, but I could be wrong....here's the route table in Gateway:
default via 192.168.1.1 dev eno167777336 proto static metric 100
192.168.1.0/24 dev eno16777736 proto kernel scope link src 192.168.1.108 metric 100
192.168.120.0/24 dev eno33554960 proto kernel scope link src 192.168.120.131 metric 100
I'm also wondering if it could be the VM setup. NIC 1(internet subnet) is setup as Bridged (no replicate) and NIC 2 (the private subnet) is setup as VMNet2(Host-only) which was setup in the Virtual Network Editor. "Connect a host virtual adapter" and "use local dhcp" are checked for this network.