ESXi 5.1 – Regain Access to Host After Setting Wrong Default Gateway

I’ll admit – I’ve done this once or twice. Each time causes me some grief while trying to get things set up correctly.

Here’s how to fix this issue as long as you have access to the Direct Console UI or ESXi Shell.


[text]
esxcli network ip route ipv4 remove -g w.x.y.z -n default
esxcli network ip route ipv4 add -g a.b.c.d -n default
[/text]
This assumes that w.x.y.z is the old, incorrect gateway, that you might have set in the vSphere client, and a.b.c.d is the new gateway.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright VirtJunkie.com © 2024