VMware Cloud Community
sajer137
Contributor
Contributor

Adding seperate gateway for seperate vSwitch

I have two physical NICs and and two vSwitches.  NIC0 is assigned to vSwitch0 and NIC1 is assigned to vSwitch1.  I have Management on vSwitch0 and vMotion on vSwitch1.  Management uses a gateway of 10.50.32.1 and vMotion needs a gateway of 10.50.35.1

vSwitch0 was created and configured first so the default gateway for vSwitch1 is initially 10.50.32.1, however when I chnage the gateway for vSwitch1 from 10.50.32.1 to 10.50.35.1 the gateway is changed for both vSwitches.  Is it possible to have two separate gateways for vSwitches on separate physical NICs?

I've attempted to add a custom TCP/IP stack, however I'm unable to modify the gateway, as it is greyed out on the webconsole.  I've also attempted to add a static route with the 10.50.35.1 gateway, however I receive the error "Duplicate route to network 10.50.35.1/24 found.  Please delete the old route first."  I assume this is due to the route for that network already exisiting, however it is required to exisit before I can even attempt this command.  What am I missing?

Thanks!

0 Kudos
1 Reply
a_p_
Leadership
Leadership

You can only assign a single default gateway address on an ESXi host. This is usually used for the "Management Network" (not for a vSwitch) which requires routing in most cases. The vMotion port groups should run on the same (dedicated, non-routed) subnet for all hosts, so there's no gateway required.

André

0 Kudos