VMware vSphere

 View Only
  • 1.  how to set correct route ESXI virtual machine

    Posted Oct 05, 2020 12:05 PM

    I have a VmWare ESXI server on Hetzner with IP 176.XX.XX.117, it look to gateway in Hetzner switch 176.XX.XX.97. Also I have IP range is 188.XX.XX.224/27 for my Virtual Machne.

    I set route in my ESXI server -  esxcli network ip route ipv4 add --gateway=176.XX.XX.97 --network=188.XX.XX.224/27 and expect that my VM will have access to interter with addr (for first VM) - 188.XX.XX.225, netmask 255.255.255.224, broadcast 188.XX.XX.XX.255, and geteway 176.XX.XX.117 or directly to 176.XX.XX.97.

    But no, my VM has no access to inet. What wrong, what I need to add?



  • 2.  RE: how to set correct route ESXI virtual machine

    Posted Oct 05, 2020 12:19 PM

    Routes on the esxi server has nothing to do with the guest os. You need to make sure the VM is on a portgroup that's connected to a network card on the esxi server that has access to the internet. Please share screenshots of the esxi switch configuration to help further.



  • 3.  RE: how to set correct route ESXI virtual machine

    Posted Oct 05, 2020 02:43 PM
      |   view attached

    this is my vitrual hub



  • 4.  RE: how to set correct route ESXI virtual machine

    Posted Oct 05, 2020 12:21 PM

    Hi,

    from the virtual machine do you ping the gateway?

    ARomeo



  • 5.  RE: how to set correct route ESXI virtual machine

    Posted Oct 05, 2020 02:44 PM

    of course, no



  • 6.  RE: how to set correct route ESXI virtual machine

    Posted Oct 05, 2020 02:29 PM

    Hey AlexEv123

    You are getting confused here as the ESXi network for the Management VMkernel interface has nothing to do with your Virtual Machine network as you are showing us. This is for sure a network connectivity issues so I would recommend you to check the next:

    1. If you are using a portgroup with a VLAN tagged make sure that VLAN is tagged where the ESXi is connected and that the switch port is in Trunk mode allowing that VLAN.
    2. In case you are not using any VLAN in your environment make sure your portgroup uses "none" VLAN.
    3. Make sure that in your VM Portgroup you have at least one uplink as active and verify that the uplink has at least one vmnic associated to it.
    4. Make sure that you are not restricting the flow using a Firewall.
    5. If you are using SNAT to let your VMs browse the internet, make sure that range is included in the rules.
    6. Make sure you can reach the gateway.
    7. If the gateway is not the last-hop-router please make sure your routes are well configured on your L3 devices, not only to reach the Internet but to go back to the platform.

    Those are really basic Steps that always solve most of the issues as it seems it is a pure networking issue. Also pay attention here:

    "my VM will have access to interter with addr (for first VM) - 188.XX.XX.225, netmask 255.255.255.224, broadcast 188.XX.XX.XX.255, and geteway 176.XX.XX.117"

    Maybe it is a misstypo but if I interpret that, i am assuming that you are using a gateway that is outside your L2 subnet and that should not hapen.



  • 7.  RE: how to set correct route ESXI virtual machine

    Posted Oct 05, 2020 02:51 PM

    thank you, I don't use any VLAN Id, I want to add correct route to access my subnet 188.XX.XX.224/27 through main server IP 176.XX.XX.117 or directly to datasenter switch 176.XX.XX.97

    I think this route in ESXI host can solve problem

    esxcli network ip route ipv4 add --gateway=176.XX.XX.97 --network=188.XX.XX.224/27

    but no, virtual machines has no access to inet



  • 8.  RE: how to set correct route ESXI virtual machine
    Best Answer

    Posted Oct 05, 2020 04:51 PM

    You don't do this with a esxi host, if there is no vlan, then make sure you can plug something else into the switch port. ESXi virtual switches are basically Layer 2 switches, there are no routes

    https://www.aussiebroadband.com.au/blog/difference-layer-3-layer-2-networks/#:~:text=A%20Layer%202%20switch%20only,area%…

    what your changing a vmkernel adapter, which is only or esxi management or esxi special functions.



  • 9.  RE: how to set correct route ESXI virtual machine

    Posted Oct 05, 2020 11:04 PM
      |   view attached

    Thank you, I made a router



  • 10.  RE: how to set correct route ESXI virtual machine

    Broadcom Employee
    Posted Oct 06, 2020 05:41 AM

    Moderator: Please do not start additional threads on the same issue.

    The second thread you created has been deleted.



  • 11.  RE: how to set correct route ESXI virtual machine

    Posted Oct 06, 2020 09:29 AM

    now I receive second addr from provider and create router, so I have two addr from my provider 176.XX.XX.117 and 176.XX.XX.115, with gateway 176.XX.XX.97 and broadcast 176.XX.XX.127

    On the IP 176.XX.XX.115 I have created router, one interface of it has VLAN=0 and connected to virtual switch going to provider. 176.XX.XX.117 I have assign to ESXI host.

    From this router I can see and ping ESXI host, namely ping from 176.XX.XX.115 to 176.XX.XX.117 is working, but ping from 176.XX.XX.97 and other internet is not working.

    Why 176.XX.XX.115 don't see 176.XX.XX.97?  VlanID=0, virtual router is the same. What can be wrong?