Command-line Interface becomes always easy for System Administrators to do their day-to-day job and system configurations tasks. The default gateway for VMware vSphere ESXi can be easily changed through the command line, as shown below:
Change the Default Gateway for VMware ESXi
- Login to VMware vSphere ESXi host as a superuser or root.
- Run the command esxcfg-route to display the default gateway which is 10.65.26.4.
[root@dbappweb_esxi:~] esxcfg-route VMkernel default gateway is 10.65.26.4
- To change the default gateway from 10.65.26.4 to 10.65.26.25 run the below command.
[root@dbappweb_esxi:~] esxcfg-route 10.65.26.25 VMkernel default gateway set to 10.65.26.25
- Verify the default gateway, now it has been changed to 10.65.26.25.
[root@dbappweb_esxi:~] esxcfg-route VMkernel default gateway is 10.65.26.25
Last Updated: August 20, 2020
Related Posts
- Install VMware tools on RHEL through command line
- Failed to start the virtual machine. Module DiskEarly power on failed.
- VMware ESXi Host Upgrade from Version 5.5 to 6.5
- Change Guest OS Version of a VM on VMware ESXi
- Upgrade VM Compatibility Level of Virtual Machines in VMware ESXi
- How to find system info, processor info, cache info, memory info etc from ESXi host CLI
- How to Find IP Address and Route Details in VMware ESXi