Have the following:
2 network segments
physical switchport 1 - pNIC 1 - Network: 134.244.186.128/26 - VLAN 128 - Gateway: 134.244.186.129 (This network is open to our office)
physical switchport 2 - pNIC 2 - Network: 134.244.186.192/26 - VLAN 192 - Gateway: 134.244.186.193 (This network is behind an authenticated firewall)
Want to have 2 vm networks thus i've created:
vmnic0 -> vswitch0 -> pg0 -> vmk0 - IP 134.244.186.140
vmnic1 -> vswitch1 -> pg1 -> vmk2 - IP 134.244.186.195
Since the vmnic1 will need to route through th 193 gateway, and vsphere client auto-assigns 129 as the default gateway, i believe i need to create a static route using:
esxcfg-route -a 134.244.186.192/26 134.244.186.193
However when i went and looked at esxcfg-route i saw this:
~ # esxcfg-route -l
VMkernel Routes:
Network Netmask Gateway Interface
134.244.186.128 255.255.255.192 Local Subnet vmk0
134.244.186.192 255.255.255.192 Local Subnet vmk2
default 0.0.0.0 134.244.186.129 vmk0
I'm thinking VMware may have outsmarted me here... when it says "local subnet" does it somehow know about the gateway for the given subnet? I would have thought it would try and use .129 even for the .192 network, and that won't work...
So do i or don't i need the additional route?
Thanks for any help
Is there a specific reason you've added to vmkernel ports?
I would suggest just having a single vmkernel port for management in vSwitch0.
Your vSwitch1 would then just have a virtual machine port group for VMs that need to communicate on the 134.244.186.192/26 subnet. The advantage to ESXi over some solutions is that you don't require an IP precense for the host on each subnet / vSwitch or physical NIC that you have to deploy. It makes things more secure as you reduce the IP precense of the host.