Hello ,
I believe the issues you are facing are two:
vSwitch and Portgroup:
One the way you are setting the vSwitch is letting it choose one vmnic as Active (by default) and because of your restart, it could be possible that the vmnic2 took that position. Even if you have the 2 vmnic as Active, that is not the proper configuraiton.
IP Assignment:
Make sure that not both of the IP ranges that you have are giving IPs with the Gateway IP on the configuration because if that is the case, you will end having duplicate default routes and the Ubuntu box will not know to where send the traffic.
If In understood well, the scenario you are trying to achieve is to have an IP from ranges 192.168.1.x for the management, I am assuming that this network is purely L2 and you do not need to access other subnets from this IP. What you should ensure is that the default gateway is only from network 172.21.6.x
Solutions to this issue:
vSwitch and Portgroup:
- Create a separate vSwitch and move the vmnic for Internet to there.
- Create a portgroup on that vSwitch.
- Connect the second vNIC of the Ubuntu box to that portgroup.
IP Assignment:
Only if you have the duplicate gateway IP issue, make sure only the DHCP from the Internet subnet gives you the gateway.
Let me know how it goes.
Regards!