Seems to me that problem is not on ESXi itself, but network configuration. From your description of a problem it's impossible to understand what's going on, more info needed, such as
1. How IP assigned on network and ESXi
2. Netmasks and gateways configuration
3. Network topology - routers, switches etc
4. VLANs if any